@import url('/fonts.css');
:root {
  --bg: #0b0d10;
  --panel: #15191f;
  --panel2: #1d222a;
  --text: #f7f8fa;
  --muted: #9ea7b3;
  --line: #2c333d;
  --accent: #377CC7;
  --danger: #ff6b6b;
  --ok: #65d68a;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 18px; border-bottom:1px solid var(--line); background:#101318; position:sticky; top:0; z-index:20; }
.brand { font-weight:700; }
.manage-brand-line{display:flex;align-items:center;gap:10px;min-width:0;}
.manager-presence-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:4px 9px;background:var(--accent);color:#fff;font-size:11px;font-weight:800;line-height:1.2;letter-spacing:.06em;white-space:nowrap;}
.manager-presence-badge.hidden{display:none!important;}
.muted { color:var(--muted); }
.app { padding:18px; max-width:1500px; margin:0 auto; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:16px; }
.card h2,.card h3 { margin:0 0 12px; }
.btn { border:1px solid var(--line); color:var(--text); background:var(--panel2); border-radius:9px; padding:10px 14px; }
.btn:hover { border-color:#55606e; }
.btn.primary { background:var(--accent); color:#fff; border-color:var(--accent); font-weight:700; }
.btn.danger { color:#fff; background:#4b2227; border-color:#77353d; }
.btn.small { padding:6px 9px; font-size:14px; }
.controls { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
input[type=text], input[type=password], input[type=datetime-local], input[type=number], textarea, select {
  width:100%;
  background:#0d1014;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:9px;
  padding:10px 12px;
}
select { color-scheme:dark; }
select option { background:#0d1014; color:var(--text); }
textarea { min-height:100px; resize:vertical; }
label { display:block; color:var(--muted); font-size:14px; margin-bottom:7px; }
.field { margin-bottom:14px; }
.field:last-child { margin-bottom:0; }
.status { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:14px; }
.dot { width:9px; height:9px; border-radius:999px; background:var(--danger); display:inline-block; }
.dot.ok { background:var(--ok); }
.preview { position:relative; background:#000; aspect-ratio:16/9; border-radius:12px; overflow:hidden; display:flex; align-items:center; justify-content:center; border:1px solid var(--line); }
.preview img,.preview video { width:100%; height:100%; object-fit:contain; }
.preview .special { text-align:center; padding:6%; width:100%; }
.preview .special .big { font-size:clamp(28px,5vw,66px); font-weight:800; }
.preview .special .sub { margin-top:12px; color:#cdd2d8; }
.preview .question-text { font-size:clamp(22px,3.4vw,50px); font-weight:700; line-height:1.18; }
.slide-label { font-size:13px; color:var(--muted); margin-bottom:8px; text-transform:uppercase; letter-spacing:.08em; }
.question-list { display:flex; flex-direction:column; gap:8px; }
.question { display:flex; gap:3px; align-items:flex-start; border:1px solid var(--line); background:#10141a; border-radius:10px; padding:11px 7px; }
.question.active { border-color:var(--accent); background:#11263b; }
.question.answered { opacity:.55; }
.question-main { flex:1; cursor:pointer; line-height:1.35; }
.question-actions { display:flex; gap:6px; }
.slide-row { display:grid; grid-template-columns:56px 120px minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); }
.slide-row:last-child { border-bottom:0; }
.thumb { position:relative; width:120px; aspect-ratio:16/9; background:#000; border-radius:7px; overflow:hidden; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:12px; }
.thumb img,.thumb video { width:100%; height:100%; object-fit:contain; }
.login-wrap { max-width:420px; margin:14vh auto; padding:18px; }
.login-wrap h1 { margin-top:0; }
.fullscreen-viewer { position:fixed; inset:0; overflow:hidden; background:#000; }
.viewer-stage { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:#000; }
.viewer-stage > img,.viewer-stage > video { width:100%; height:100%; object-fit:contain; }
.viewer-special { width:100%; height:100%; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:7vw; background:radial-gradient(circle at 50% 38%, #1c2633 0%, #0b0d10 58%, #050607 100%); }
.viewer-special .eyebrow { text-transform:uppercase; letter-spacing:.22em; color:#b7c1cc; font-size:clamp(14px,1.7vw,28px); margin-bottom:2.5vh; }
.viewer-special .count { font-size:clamp(76px,15vw,240px); font-weight:800; line-height:.9; font-variant-numeric:tabular-nums; }
.viewer-special .subtitle { margin-top:3vh; color:#c9d0d8; font-size:clamp(20px,2.5vw,42px); }
.viewer-special .qa-mark { font-size:clamp(80px,16vw,240px); line-height:.8; font-weight:800; opacity:.22; }
.viewer-special .qa-question { max-width:1400px; font-size:clamp(38px,5.5vw,92px); font-weight:750; line-height:1.13; }
.viewer-status { position:absolute; left:16px; bottom:14px; background:rgba(0,0,0,.55); color:#bfc7d1; border-radius:999px; padding:7px 11px; font-size:13px; z-index:10; transition:opacity .3s; }
.viewer-status.hidden { opacity:0; }
.navlinks { display:flex; gap:12px; flex-wrap:wrap; }
.navlinks a { text-decoration:none; color:#cad2dc; }
.manager-logout-link{
  appearance:none;
  border:0;
  background:none;
  color:#cad2dc;
  font:inherit;
  padding:0;
  cursor:pointer;
}
.manager-logout-link:hover{color:#fff;text-decoration:underline;}
.manager-logout-link:disabled{opacity:.55;cursor:default;text-decoration:none;}
@media (max-width:900px) { .grid2,.grid3 { grid-template-columns:1fr; } .slide-row { grid-template-columns:40px 86px minmax(0,1fr); } .slide-row .row-actions { grid-column:1/-1; } .thumb { width:86px; } }

.control-statusbar { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.connection-count { display:inline-flex; min-width:22px; height:22px; align-items:center; justify-content:center; margin-left:6px; padding:0 6px; border-radius:999px; background:#0d1014; color:var(--muted); font-size:12px; }
.modal-backdrop { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(0,0,0,.72); }
.modal,.modal-panel { max-height:calc(100vh - 48px); overflow:auto; border:1px solid var(--line); border-radius:14px; padding:18px; }
.modal { width:min(680px,100%); background:var(--panel); }
.modal-panel { width:min(620px,100%); background:#0b0e12; box-shadow:0 24px 80px rgba(0,0,0,.45); }
.modal-header,.modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.modal-header h2,.modal-head h2 { margin:0; }
.modal-close-icon {
  appearance:none;
  border:1px solid var(--line);
  border-radius:8px;
  width:32px;
  height:32px;
  flex:0 0 32px;
  display:inline-grid;
  place-items:center;
  padding:0;
  background:#151a22;
  color:var(--text);
  font:inherit;
  font-size:22px;
  font-weight:400;
  line-height:1;
  cursor:pointer;
}
.modal-close-icon:hover { background:#1d2430; border-color:#465365; }
.modal-close-icon:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.connection-list { display:flex; flex-direction:column; }
.connection-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); color:var(--text); }
.connection-row:last-child { border-bottom:0; }

.manage-tabs { display:flex; gap:4px; padding:0 18px; border-bottom:1px solid var(--line); background:#101318; }
.manage-tab { appearance:none; border:0; border-bottom:3px solid transparent; background:transparent; color:var(--muted); padding:12px 16px 10px; font-weight:700; cursor:pointer; }
.manage-tab:hover { color:var(--text); }
.manage-tab.active { color:var(--text); border-bottom-color:var(--accent); }
.manage-tabpanel { display:none; }
.manage-tabpanel.active { display:block; }
.color-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; margin-top:16px; }
.color-field { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0; padding:9px 10px; border:1px solid var(--line); border-radius:9px; background:#10141a; color:var(--text); }
.color-field input[type=color] { width:46px; height:32px; padding:0; border:1px solid var(--line); border-radius:6px; background:transparent; cursor:pointer; }
.settings-preview { min-height:260px; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:30px; border-radius:12px; overflow:hidden; background:radial-gradient(circle at 50% 38%,#1c2633 0%,#050607 100%); }
.settings-preview .eyebrow { text-transform:uppercase; letter-spacing:.18em; font-size:14px; margin-bottom:16px; }
.settings-preview .count { font-size:64px; line-height:1; font-weight:800; font-variant-numeric:tabular-nums; }
.settings-preview .subtitle { margin-top:16px; font-size:18px; }
.settings-preview .qa-mark { font-size:82px; line-height:.8; font-weight:800; opacity:.28; margin-bottom:18px; }
@media (max-width:650px) { .color-grid { grid-template-columns:1fr; } }

/* Fixed 16:9 dynamic slide canvas and layout editor */
.fullscreen-viewer { display:flex; align-items:center; justify-content:center; }
.viewer-stage { position:relative; inset:auto; width:min(100vw,177.777778vh); height:min(100vh,56.25vw); aspect-ratio:16/9; flex:0 0 auto; container-type:inline-size; overflow:hidden; }
.viewer-stage > img,.viewer-stage > video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.special-canvas { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; container-type:inline-size; background-position:center; background-size:cover; background-repeat:no-repeat; }
.special-el { position:absolute; transform:translate(-50%,-50%); width:max-content; max-width:88%; text-align:center; line-height:1.08; white-space:normal; }
.special-heading { text-transform:uppercase; letter-spacing:.18em; font-weight:600; }
.special-timer { font-weight:800; font-variant-numeric:tabular-nums; line-height:.9; }
.special-subtitle { font-weight:400; }
.special-mark { font-weight:800; line-height:.8; opacity:.28; }
.special-question { font-weight:750; line-height:1.13; width:84%; }
.preview .special-canvas { position:absolute; inset:0; }
.settings-stack { display:grid; gap:18px; }
.layout-preview { position:relative; width:100%; aspect-ratio:16/9; background:#000; border:1px solid var(--line); border-radius:12px; overflow:hidden; container-type:inline-size; margin:12px 0 16px; }
.layout-preview .special-canvas { position:absolute; inset:0; }
.background-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 18px; align-items:end; margin-bottom:14px; }
.background-controls input[type=file] { max-width:100%; }
.layout-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }
.element-editor { border:1px solid var(--line); border-radius:10px; padding:12px; background:#10141a; }
.element-editor-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.inline-check { display:flex; align-items:center; gap:7px; margin:0; color:var(--text); }
.element-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.element-grid label { margin:0; }
.element-grid input[type=number] { width:100%; margin-top:5px; background:#0d1014; color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 9px; }
.sticky-save { position:sticky; bottom:0; margin-top:18px; padding:12px 0; background:linear-gradient(transparent,var(--bg) 30%); }
@media(max-width:900px){.layout-controls{grid-template-columns:1fr}.background-controls{grid-template-columns:1fr}.element-grid{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:600px){.element-grid{grid-template-columns:1fr}.special-heading{letter-spacing:.1em}}

/* Countdown MP3 + live audio visualizer */
.audio-settings { display:grid; gap:12px; margin:16px 0; padding:14px; border:1px solid var(--line); border-radius:10px; background:#10141a; }
.visualizer-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.visualizer-grid label { margin:0; }
.visualizer-grid input[type=number] { width:100%; margin-top:5px; background:#0d1014; color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 9px; }
.audio-visualizer { position:absolute; transform:translate(-50%,-50%); display:block; pointer-events:none; }

.countdown-contrast-overlay { position:absolute; transform:translate(-50%,-50%); z-index:1; pointer-events:none; }
.countdown-overlay .special-el,.countdown-overlay .audio-visualizer,.countdown-overlay .countdown-join-qr { z-index:2; }
.settings-screen-preview .countdown-contrast-overlay.editor-clickable { pointer-events:auto; }

.preview-audio-bars { display:flex; align-items:flex-end; justify-content:space-between; gap:1.2%; }
.preview-audio-bars i { display:block; flex:1 1 0; min-width:1px; height:35%; background:currentColor; border-radius:999px 999px 2px 2px; animation:previewAudioBar 1.05s ease-in-out infinite alternate; animation-delay:calc(var(--i) * -0.055s); opacity:.9; }
.preview-audio-bars i:nth-child(3n) { animation-duration:.73s; }
.preview-audio-bars i:nth-child(4n) { animation-duration:1.31s; }
@keyframes previewAudioBar { 0%{height:12%} 35%{height:82%} 68%{height:38%} 100%{height:96%} }
.audio-unlock { position:absolute; z-index:30; left:50%; bottom:28px; transform:translateX(-50%); background:rgba(10,13,17,.9); border:1px solid rgba(255,255,255,.25); color:#fff; padding:12px 18px; border-radius:10px; font:inherit; cursor:pointer; }
.audio-unlock.hidden { display:none; }
@media(max-width:700px){.visualizer-grid{grid-template-columns:1fr 1fr}}
@media(max-width:500px){.visualizer-grid{grid-template-columns:1fr}}

/* Presenter layout: dominant current slide, compact next slide */
.presenter-app { max-width:1600px; }
.presenter-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(260px,1fr); gap:18px; align-items:start; }
.presenter-nav { margin-top:18px; display:grid; grid-template-columns:minmax(120px,1fr) auto minmax(120px,1fr) auto; gap:12px; align-items:center; }
.presenter-nav-btn:first-child { justify-self:start; }
.presenter-nav-btn:nth-of-type(2) { justify-self:end; }
.presenter-counter { min-width:110px; text-align:center; font-size:20px; font-weight:700; font-variant-numeric:tabular-nums; }
.arrow-toggle { min-width:72px; transition:opacity .15s ease,border-color .15s ease; }
.arrow-toggle.active { opacity:1; border-color:#55606e; }
.arrow-toggle.inactive { opacity:.45; }
.presenter-hint { margin-top:12px; min-height:20px; }
@media(max-width:900px){
  .presenter-grid { grid-template-columns:1fr; }
  .presenter-nav { grid-template-columns:1fr auto 1fr; }
  .arrow-toggle { grid-column:1/-1; justify-self:end; }
}

/* Webinar control refactor */
.hidden { display:none !important; }
button:disabled { opacity:.45; cursor:not-allowed; }
.compact-grid { margin-bottom:6px; }
.viewer-layer { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; }
.viewer-layer > img,.viewer-layer > video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.slide-image-composition{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;}
.slide-image-composition .slide-image-background{position:absolute;inset:-6%;width:112%;height:112%;object-fit:cover;transform:scale(1.04);}
.slide-image-composition .slide-image-foreground{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;}
.slides-settings-preview{position:absolute;inset:0;overflow:hidden;}
.slides-settings-bg{position:absolute;inset:-6%;width:112%;height:112%;object-fit:cover;transform:scale(1.04);}
.slides-settings-foreground{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:75%;height:100%;display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,#f2f4f7,#cfd5dc);color:#1f2730;box-shadow:0 0 0 1px rgba(0,0,0,.12);font-weight:800;font-size:3.4cqw;text-align:center;}
.slides-settings-foreground small{display:block;font-size:1.4cqw;font-weight:600;opacity:.55;margin-top:1.2cqw;}
.slides-settings-bg-art{position:absolute;inset:0;background:linear-gradient(145deg,#f2f4f7,#cfd5dc);color:#1f2730;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:5cqw;}
.overlay-layer { z-index:5; opacity:1; will-change:opacity; }
.empty-stage { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#9ea7b3; background:#000; }
.question.selected { border-color:var(--accent); background:#11263b; }
.moderator-top { display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,1fr); gap:18px; align-items:stretch; }
.moderator-top .card { height:100%; }
.show-nav { margin-top:18px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; }
.show-nav button:first-child { justify-self:start; }
.show-nav button:last-child { justify-self:end; }
.section-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.mode-badge { border:1px solid var(--line); background:#0d1014; color:var(--muted); border-radius:999px; padding:6px 10px; font-size:12px; letter-spacing:.08em; }
.show-buttons { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.selected-question { min-height:76px; padding:12px; border:1px solid var(--line); border-radius:10px; background:#10141a; line-height:1.4; }
.cue-status { margin-top:18px; text-align:center; padding:14px; border:1px solid var(--line); border-radius:12px; background:#0d1014; }
.cue-number { font-size:72px; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; }
.presenter-cue { margin-top:14px; padding:14px; text-align:center; border:1px solid var(--line); border-radius:12px; background:#10141a; letter-spacing:.1em; }
.presenter-cue strong { display:block; margin-top:6px; font-size:64px; line-height:1; color:var(--text); font-variant-numeric:tabular-nums; }
.links-list { display:grid; gap:12px; }
.link-row { display:grid; grid-template-columns:100px minmax(0,1fr) auto; gap:10px; align-items:center; }
.link-row label { margin:0; color:var(--text); font-weight:600; }
.link-row input { width:100%; background:#0d1014; color:var(--muted); border:1px solid var(--line); border-radius:9px; padding:10px 12px; }
@media(max-width:900px){.moderator-top{grid-template-columns:1fr}.link-row{grid-template-columns:1fr}.link-row .btn{justify-self:start}}

/* Presenter mirrors the live Q&A layer over the current-slide preview. */
.presenter-qa-overlay { position:absolute; inset:0; z-index:5; }
.presenter-qa-overlay .special-canvas { position:absolute; inset:0; }

/* Presenter fixed 16:9 stage: the complete interface scales as one composition. */
.presenter-body {
  width:100vw;
  height:100vh;
  min-height:0;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#050607;
}
.presenter-fit {
  position:relative;
  flex:0 0 auto;
  overflow:hidden;
}
.presenter-stage {
  position:absolute;
  inset:0 auto auto 0;
  width:1600px;
  height:900px;
  overflow:hidden;
  transform-origin:top left;
  background:var(--bg);
}
.presenter-stage .presenter-topbar {
  position:relative;
  height:72px;
  padding:14px 24px;
}
.presenter-stage-content {
  height:828px;
  padding:22px 26px 24px;
  display:flex;
  flex-direction:column;
}
.presenter-stage-grid {
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(0,1fr);
  gap:24px;
  align-items:start;
}
.presenter-stage-grid section { min-width:0; }
.presenter-current-preview,
.presenter-next-preview { width:100%; }
.presenter-current-panel .slide-label,
.presenter-next-panel .slide-label {
  font-size:14px;
  margin-bottom:9px;
}
.presenter-side-status {
  margin-top:16px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
}
.presenter-mode-badge {
  display:block;
  width:100%;
  text-align:center;
  padding:9px 12px;
  font-size:13px;
}
.presenter-stage .presenter-cue {
  margin-top:0;
  padding:14px;
}
.presenter-stage .presenter-cue strong {
  font-size:72px;
}
.presenter-stage-nav {
  flex:0 0 auto;
  margin-top:20px;
  min-height:76px;
  display:grid;
  grid-template-columns:1fr auto 1fr auto;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
}
.presenter-stage-nav .presenter-nav-btn:first-child { justify-self:start; }
.presenter-stage-nav .presenter-nav-btn:nth-of-type(2) { justify-self:end; }
.presenter-stage-nav .presenter-counter {
  min-width:130px;
  font-size:22px;
}
.presenter-stage-nav .btn {
  min-height:46px;
  padding:11px 18px;
  font-size:16px;
}
.presenter-stage-nav .arrow-toggle { min-width:78px; }


/* Embedded audience-output monitor used by Presenter and Moderator. */
.viewer-iframe-wrap { position:relative; background:#000; }
.viewer-iframe { position:absolute; inset:0; width:100%; height:100%; border:0; background:#000; }
.embedded-viewer .viewer-status { display:none !important; }
.embedded-viewer .audio-unlock { font-size:12px; padding:7px 10px; top:12px; bottom:auto; border-radius:999px; }
.embedded-viewer.presenter-video-active .audio-unlock:not(.hidden) { opacity:0; pointer-events:none; transition:opacity .16s ease; }
.embedded-viewer.presenter-video-active:hover .audio-unlock:not(.hidden) { opacity:1; pointer-events:auto; }
.moderator-preview-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.moderator-preview-head .slide-label { margin-bottom:0; }
.moderator-audio-toggle { flex:0 0 auto; }

/* Make video thumbnails/previews unmistakable. */
.video-preview-badge { position:absolute; inset:50% auto auto 50%; transform:translate(-50%,-50%); display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:rgba(0,0,0,.72); color:#fff; font-weight:800; font-size:13px; letter-spacing:.08em; pointer-events:none; }
.video-play-triangle { width:0; height:0; border-top:7px solid transparent; border-bottom:7px solid transparent; border-left:11px solid currentColor; }

/* Manager slide selection + keyboard ordering. */
.slide-selectable { cursor:pointer; padding-left:10px; padding-right:10px; border-radius:9px; }
.slide-selectable:hover { background:#11161d; }
.slide-selectable.selected { background:#11263b; outline:1px solid var(--accent); }


/* Program-master video progress shown on Presenter, Moderator and Control. */
.video-progress { position:absolute; left:10px; right:10px; bottom:10px; z-index:8; padding:8px 10px 7px; border-radius:9px; background:rgba(0,0,0,.74); color:#fff; pointer-events:none; }
.video-progress-track { height:7px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.24); }
.video-progress-fill { width:0; height:100%; border-radius:inherit; background:currentColor; transition:width 1s linear; }
.video-progress-time { margin-top:5px; text-align:right; font-size:12px; font-variant-numeric:tabular-nums; line-height:1; }
.video-progress.buffering .video-progress-fill { opacity:.55; }
.viewer-video-progress { position:absolute; inset:0; z-index:7; pointer-events:none; }
.viewer-video-progress .video-progress { left:14px; right:14px; bottom:14px; padding:9px 11px 8px; }
.viewer-video-progress .video-progress-track { height:9px; }
.viewer-video-progress .video-progress-time { font-size:15px; margin-top:6px; }

/* Video previews outside Viewer/Presenter never request the MP4. */
.video-placeholder {
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:18px;
  background:#000;
  color:#fff;
  font-weight:800;
  letter-spacing:.12em;
  font-size:18px;
  text-align:center;
  pointer-events:none;
}
.video-placeholder-main { display:flex; align-items:center; justify-content:center; gap:12px; }
.video-placeholder-title { max-width:88%; color:#c9d0d8; font-weight:500; font-size:15px; line-height:1.25; letter-spacing:0; overflow-wrap:anywhere; }
.video-placeholder-compact { gap:5px; padding:6px; font-size:11px; }
.video-placeholder-compact .video-placeholder-main { gap:6px; }


/* Compact connection access on Control */
.control-top-actions { display:flex; align-items:center; gap:14px; }
.connections-button { white-space:nowrap; display:inline-flex; align-items:center; gap:4px; }
.connections-modal .connection-row { padding:14px 0; }

/* Moderator: current output + composer left, large question queue right */
.moderator-workspace { display:grid; grid-template-columns:minmax(300px,.85fr) minmax(460px,1.65fr); gap:18px; align-items:start; }
.moderator-left-column { display:grid; gap:18px; min-width:0; }
.moderator-questions-card { min-width:0; min-height:100%; }
.moderator-questions-card .question-list { margin-top:14px; }
@media(max-width:900px){
  .control-top-actions { align-items:flex-end; flex-direction:column; gap:8px; }
  .moderator-workspace { grid-template-columns:1fr; }
}

/* Moderator question counters */
.section-title-row { display:flex; align-items:center; gap:10px; justify-content:space-between; }
.section-title-row h2 { margin:0; }
.question-count-badge { display:inline-flex; min-width:28px; height:28px; padding:0 9px; align-items:center; justify-content:center; border-radius:999px; background:var(--accent); color:white; font-weight:800; font-size:13px; }

/* Q&A settings preview state switch */
.preview-state-tabs{display:flex;gap:6px;margin:12px 0 8px}
.preview-state-tab{border:1px solid var(--border);background:var(--panel-soft);color:var(--text);padding:7px 12px;border-radius:8px;cursor:pointer;font:inherit}
.preview-state-tab.active{background:var(--accent);color:#fff;border-color:var(--accent)}

/* Settings screen editor: direct selection inside 16:9 preview */
.settings-editor-card { padding:0; overflow:visible; }
.settings-subtabs { margin-bottom:14px; }
.screen-editor-tabs { display:flex; flex-wrap:wrap; gap:6px; }
.screen-editor-tab { appearance:none; border:1px solid var(--line); border-radius:9px; background:#10141a; color:var(--muted); padding:9px 13px; font:inherit; font-weight:750; cursor:pointer; }
.screen-editor-tab:hover { color:var(--text); }
.screen-editor-tab.active { color:#fff; background:var(--accent); border-color:var(--accent); }
.settings-save-footer { display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:0 18px 18px; min-height:42px; }
.screen-editor-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(330px,1fr); gap:20px; padding:18px; align-items:start; }
.screen-editor-left { min-width:0; }
.screen-properties-panel { position:sticky; top:76px; min-width:0; border:1px solid var(--line); border-radius:12px; background:#10141a; padding:14px; max-height:calc(100vh - 96px); overflow:auto; }
.settings-screen-preview { margin:0 0 14px; }
.settings-screen-preview .special-canvas { cursor:default; }
.settings-screen-preview .editor-clickable { cursor:pointer; outline:2px solid transparent; outline-offset:4px; transition:outline-color .12s ease, box-shadow .12s ease; }
.settings-screen-preview .editor-clickable:hover { outline-color:rgba(92,178,255,.45); }
.settings-screen-preview .editor-clickable.selected { outline-color:#62b7ff; box-shadow:0 0 0 5px rgba(98,183,255,.13); }
.settings-screen-preview .editor-canvas.background-selected { box-shadow:inset 0 0 0 3px #62b7ff; }
.settings-screen-preview .audio-visualizer.editor-clickable { pointer-events:auto; }
.screen-content-panel { border:1px solid var(--line); border-radius:12px; padding:14px; background:#10141a; }
.screen-content-panel h3,.property-group h3 { margin:0 0 12px; }
.editor-content-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; }
.editor-content-wide { grid-column:1/-1; }
.editor-content-grid textarea { width:100%; resize:vertical; min-height:76px; }
.editor-checkbox { align-self:end; min-height:42px; padding:8px 0; }
.selected-label { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:10px; }
.selected-label strong { font-size:18px; }
.element-quick-select { display:flex; flex-wrap:wrap; gap:6px; padding-bottom:12px; margin-bottom:12px; border-bottom:1px solid var(--line); }
.element-chip { appearance:none; border:1px solid var(--line); background:#0d1014; color:var(--muted); border-radius:999px; padding:6px 9px; font:inherit; font-size:12px; cursor:pointer; }
.element-chip.active { color:#fff; border-color:#62b7ff; background:rgba(98,183,255,.16); }
.property-group { display:grid; gap:10px; }
.property-group + .property-group { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.property-show { margin-bottom:2px; }
.property-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 10px; }
.property-grid label { margin:0; color:var(--muted); font-size:13px; }
.property-grid input[type=number],.property-grid input[type=text] { width:100%; margin-top:5px; background:#0d1014; color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 9px; }
.property-grid input[type=color] { display:block; width:100%; height:38px; margin-top:5px; padding:2px; border:1px solid var(--line); border-radius:8px; background:#0d1014; cursor:pointer; }
.compact-actions { flex-wrap:wrap; }
.countdown-audio-panel { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.audio-compact .field { margin-bottom:0; }
@media(max-width:1050px){
  .screen-editor-layout { grid-template-columns:minmax(0,1fr) minmax(300px,.85fr); }
}
@media(max-width:820px){
  .screen-editor-layout { grid-template-columns:1fr; }
  .screen-properties-panel { position:static; max-height:none; }
}
@media(max-width:560px){
  .editor-content-grid,.property-grid { grid-template-columns:1fr; }
  .editor-content-wide { grid-column:auto; }
}

/* Settings preview: keep countdown overlay below all editable foreground elements */
.settings-screen-preview .countdown-contrast-overlay { z-index:1; }
.settings-screen-preview .special-el,
.settings-screen-preview .audio-visualizer,
.settings-screen-preview .countdown-join-qr { z-index:2; }

/* Question-screen text box controls */
.question-box-controls { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.question-box-controls h4 { margin:0 0 10px; font-size:13px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; }


/* Question-screen speech bubble pointer */
.special-question.question-bubble-pointer { overflow:visible; }
.special-question.question-bubble-pointer::after {
  content:'';
  position:absolute;
  left:50%;
  bottom:calc(var(--bubble-pointer-size) * -0.36);
  width:var(--bubble-pointer-size);
  height:var(--bubble-pointer-size);
  transform:translateX(-50%) rotate(45deg);
  transform-origin:center;
  box-sizing:border-box;
  background:var(--bubble-bg, transparent);
  border-right:var(--bubble-border-width, 0) solid var(--bubble-border-color, transparent);
  border-bottom:var(--bubble-border-width, 0) solid var(--bubble-border-color, transparent);
  pointer-events:none;
  z-index:1;
}
.special-question.question-bubble-pointer { isolation:isolate; }
.special-question.question-bubble-pointer::after { z-index:-1; }
.settings-screen-preview .special-question.question-bubble-pointer::after { z-index:-1; }


/* Moderator queue controls */
.moderator-question-title { display:flex; align-items:center; gap:10px; }
.moderator-hide-done { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:14px; white-space:nowrap; cursor:pointer; }
.moderator-hide-done input { margin:0; }

/* Compact Moderator: question intake + queue only */
@media(max-width:600px){
  body:has(.moderator-workspace) > .topbar {
    display:flex;
    padding:9px 10px;
    min-height:48px;
  }
  body:has(.moderator-workspace) > .topbar .brand { font-size:14px; }
  body:has(.moderator-workspace) > .topbar #title {
    font-size:11px;
    max-width:55vw;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  body:has(.moderator-workspace) > .topbar .operator-connection-warning {
    margin-left:auto;
    padding:5px 7px;
    font-size:12px;
  }
  body:has(.moderator-workspace) > .app { padding:0; margin:0; max-width:none; }
  .moderator-workspace { display:block; padding:0; gap:0; }
  .moderator-left-column { display:block; }
  .moderator-left-column > section:first-child { border-radius:0; border-left:0; border-right:0; border-top:0; margin:0; }
  .moderator-left-column > section:not(:first-child) { display:none; }
  .moderator-questions-card { border-radius:0; border-left:0; border-right:0; margin:0; }
  .moderator-question-help { display:none; }
  .moderator-questions-card .section-title-row { align-items:center; }
}


/* V21.12 Control ordering and compact layout */
@media (max-width: 600px) {
  .control-page .topbar .navlinks { display:none !important; }
  .control-page .control-preview-grid { display:none !important; }
  .control-page .control-panels { grid-template-columns:1fr !important; }
  .control-page .app { padding-left:0; padding-right:0; }
  .control-page .show-nav,
  .control-page .control-panels > .card { border-radius:0; border-left:0; border-right:0; }
}

.control-qa-title-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.control-qa-title-row h2 { margin:0; }
.control-qa-title-row .btn { margin-left:auto; }


/* Downstream key / PNG overlays */
.downstream-body{margin:0;background:transparent!important;overflow:hidden;width:100vw;height:100vh;}
.downstream-stage{position:relative;width:100vw;height:100vh;background:transparent;overflow:hidden;}
.downstream-png-layer,.downstream-countdown-layer{position:absolute;inset:0;pointer-events:none;}
.downstream-png-layer{z-index:10;}.downstream-countdown-layer{z-index:100;transition:opacity .04s linear;container-type:inline-size;}
.downstream-png{position:absolute;transform-origin:center center;max-width:none;max-height:none;}
.overlay-control-list{display:flex;flex-wrap:wrap;gap:8px;}.overlay-toggle{white-space:nowrap;}
.overlay-editor-canvas{position:relative;aspect-ratio:16/9;width:100%;overflow:hidden;background-color:#30343a;background-image:linear-gradient(45deg,#3b4047 25%,transparent 25%),linear-gradient(-45deg,#3b4047 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#3b4047 75%),linear-gradient(-45deg,transparent 75%,#3b4047 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0;}
.manage-overlay-preview-img{position:absolute;transform:translate(-50%,-50%) scale(calc(var(--overlay-scale) * var(--preview-factor, .35)));transform-origin:center;max-width:none;max-height:none;outline:2px solid transparent;cursor:pointer;}
.manage-overlay-preview-img.selected{outline-color:#4da3ff;outline-offset:4px;}
.overlay-safe-label{position:absolute;left:8px;bottom:6px;font-size:12px;color:#fff;background:rgba(0,0,0,.55);padding:3px 6px;border-radius:4px;}
.presenter-countdown-preview{position:absolute;inset:0;z-index:5;container-type:inline-size;}.presenter-countdown-preview.hidden{display:none;}


/* OBS downstream key must remain genuinely transparent when no full-screen layer is active. */
html.downstream-html,
body.downstream-body {
    background: transparent !important;
    background-color: transparent !important;
}

/* V28.3 dedicated PNG overlay editor */
.overlay-only-properties .property-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
@media(max-width:700px){.overlay-only-properties .property-grid{grid-template-columns:1fr;}}


/* Match dropdowns in the settings/property editor to the existing dark inputs. */
.property-grid select {
  display: block;
  width: 100%;
  margin-top: 5px;
  background: #0d1014;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  font: inherit;
  color-scheme: dark;
}

.property-grid select option {
  background: #0d1014;
  color: var(--text);
}


/* Local OBS scene control */
.obs-heading{display:flex;align-items:center;gap:12px;}
.obs-heading h2{margin:0;}
.obs-status{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);}
.obs-status .dot{width:8px;height:8px;border-radius:50%;background:#777;display:inline-block;}
.obs-status.connected .dot{background:#37c96b;}
.obs-status.connecting .dot{background:#e5b341;}
.obs-status.error .dot{background:#e85d5d;}
.obs-scene-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px;}
.obs-scene-button{min-height:44px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.obs-settings-modal{width:min(760px,calc(100vw - 28px));max-height:88vh;overflow:auto;}
.obs-settings-section+.obs-settings-section{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);}
.obs-settings-section h3{margin-top:0;}
.obs-connection-grid{grid-template-columns:1fr 140px;}
.obs-password-field{grid-column:1/-1;}
.obs-button-editor{display:flex;flex-direction:column;gap:10px;margin-top:10px;}
.obs-button-row{display:flex;gap:10px;align-items:flex-end;padding:12px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.02);}
.obs-button-fields{display:grid;grid-template-columns:minmax(140px,.8fr) minmax(180px,1.2fr);gap:10px;flex:1;}
.obs-button-fields label{font-size:13px;color:var(--muted);}
.obs-button-fields input,.obs-button-fields select{display:block;width:100%;margin-top:5px;background:#0d1014;color:var(--text);border:1px solid var(--line);border-radius:8px;padding:8px 9px;font:inherit;color-scheme:dark;}
.obs-button-fields select option{background:#0d1014;color:var(--text);}
.obs-button-actions{display:flex;gap:6px;}
.obs-help{margin-top:10px;font-size:12px;}
@media(max-width:600px){
  .obs-scene-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
  .obs-scene-button{padding-left:6px;padding-right:6px;font-size:12px;}
  .obs-button-row{align-items:stretch;flex-direction:column;}
  .obs-button-fields{grid-template-columns:1fr;}
  .obs-button-actions{justify-content:flex-end;}
  .obs-connection-grid{grid-template-columns:1fr;}
  .obs-password-field{grid-column:auto;}
}


/* V32 Control: collapsible blocks + combined Live output */
.collapse-card-head{align-items:center;}
.collapse-card-head h2,.live-output-subhead h3{margin:0;}
.collapse-head-actions{display:flex;align-items:center;gap:10px;}
.collapse-dot{
  width:12px;height:12px;min-width:12px;padding:0;border:0;border-radius:50%;
  background:#37c96b;box-shadow:0 0 0 2px rgba(55,201,107,.12);cursor:pointer;
}
.collapse-dot:hover{transform:scale(1.15);}
.collapse-dot.collapsed{background:#6d7480;box-shadow:none;}
.collapsible-control-card.collapsed .collapse-card-body{display:none;}
.collapsible-control-card.collapsed{padding-bottom:14px;}
.live-output-body{display:flex;flex-direction:column;gap:16px;margin-top:12px;}
.live-output-section+.live-output-section{padding-top:14px;border-top:1px solid var(--line);}
.live-output-subhead{align-items:center;}
.live-output-label{text-transform:uppercase;letter-spacing:.06em;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:8px;}
.live-output-card .obs-scene-grid{margin-top:10px;}
.live-output-card .overlay-control-list{margin-top:0;}
@media(max-width:600px){
  .live-output-body{gap:14px;}
  .live-output-section+.live-output-section{padding-top:12px;}
}

/* V32 lightweight operational countdowns */
.lightweight-countdown-wrap{width:100%;margin-bottom:12px;}
.lightweight-countdown{width:100%;min-height:44px;box-sizing:border-box;border-radius:9px;background:#6f4bd8;color:#fff;display:flex;align-items:center;justify-content:center;gap:10px;padding:7px 14px;font-variant-numeric:tabular-nums;}
.lightweight-countdown-label{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;opacity:.82;}
.lightweight-countdown-time{font-size:22px;line-height:1;font-weight:800;}
.presenter-light-countdown{margin-top:8px;margin-bottom:0;}
.presenter-light-countdown .lightweight-countdown{min-height:38px;padding:6px 10px;}
.presenter-light-countdown .lightweight-countdown-time{font-size:20px;}
.qa-offline-preview{width:100%;height:100%;min-height:120px;display:flex;align-items:center;justify-content:center;background:#0b0d10;color:var(--muted);font-weight:700;}
@media(max-width:600px){.lightweight-countdown-wrap{margin-bottom:8px}.lightweight-countdown{min-height:38px;border-radius:7px;padding:5px 10px}.lightweight-countdown-time{font-size:19px}.lightweight-countdown-label{font-size:10px}}


/* V33 local presentation media synchronization */
.sync-app{max-width:1000px;}
.sync-storage{margin-top:8px;}
.sync-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0;}
.sync-summary>div{border:1px solid var(--line);border-radius:10px;padding:14px;background:rgba(255,255,255,.02);display:flex;flex-direction:column;gap:4px;}
.sync-summary strong{font-size:22px;}
.sync-summary span{font-size:12px;color:var(--muted);}
.sync-actions{margin-top:10px;}
.sync-progress{margin-top:16px;}
.sync-progress-track{height:9px;border-radius:99px;background:#11151a;overflow:hidden;border:1px solid var(--line);}
.sync-progress-fill{height:100%;width:0;background:#4da3ff;transition:width .18s linear;}
.sync-progress .muted{margin-top:7px;}
.sync-asset-list{display:flex;flex-direction:column;gap:8px;}
.sync-asset-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.015);}
.sync-asset-main{min-width:0;display:flex;flex-direction:column;gap:3px;}
.sync-asset-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sync-file-status{white-space:nowrap;font-size:12px;font-weight:700;color:#e5b341;}
.sync-asset-row.ready .sync-file-status{color:#37c96b;}
.sync-asset-row.missing-server .sync-file-status{color:#e85d5d;}
.mode-badge.sync-ok{background:rgba(55,201,107,.13);border-color:rgba(55,201,107,.35);color:#79e89b;}
@media(max-width:600px){
  .sync-summary{grid-template-columns:1fr;}
  .sync-asset-row{align-items:flex-start;flex-direction:column;}
}

/* V34 synced media management */
.sync-link-line{display:flex;gap:8px}.sync-link-line input{flex:1;min-width:0}
.synced-device-list{display:flex;flex-direction:column;gap:10px}
.synced-device-row{border:1px solid var(--line);border-radius:10px;padding:13px;background:rgba(255,255,255,.015)}
.synced-device-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.synced-device-meta{display:flex;flex-wrap:wrap;gap:16px;margin:10px 0;color:var(--muted);font-size:12px}
.synced-device-meta strong{color:var(--text)}
.sync-file-status.complete{color:#37c96b}
.sync-device-name{margin:12px 0 4px}
@media(max-width:600px){.sync-link-line{align-items:stretch}.synced-device-head{flex-direction:column}.synced-device-meta{gap:8px 14px}}

/* V34.1 Moderator: countdown is outside the workspace grid */
.moderator-top-countdown{
  width:min(100% - 32px, 1500px);
  margin:14px auto 10px;
}
.moderator-top-countdown .lightweight-countdown{
  width:100%;
}
@media(max-width:600px){
  .moderator-top-countdown{
    width:100%;
    margin:0 0 8px;
  }
  .moderator-top-countdown .lightweight-countdown{
    border-radius:0;
  }
}


/* Presenter wall clock */
.presenter-topbar{
  position:relative;
}
.presenter-header-left{
  min-width:0;
}
.presenter-header-right{
  margin-left:auto;
}
.presenter-clock{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  font-size:30px;
  line-height:1;
  font-weight:300;
  letter-spacing:.03em;
  font-variant-numeric:tabular-nums;
  opacity:.56;
  white-space:nowrap;
  pointer-events:none;
}


/* V35 Presenter waiting countdown: more visible at a glance */
.presenter-light-countdown .lightweight-countdown{
  min-height:58px;
  padding:10px 14px;
  border-radius:10px;
}
.presenter-light-countdown .lightweight-countdown-label{
  font-size:14px;
}
.presenter-light-countdown .lightweight-countdown-time{
  font-size:32px;
  font-weight:800;
}

/* V35 Moderator / Presenter interface text settings */
.interface-text-preview{
  width:100%;
  min-height:180px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#0d1014;
}
.interface-text-preview strong{font-size:28px}
.interface-text-preview span{color:var(--muted)}
.interface-text-settings{display:grid;gap:14px}
.interface-text-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 12px;
}
.interface-text-grid label{margin:0}
.interface-text-grid input{
  display:block;
  width:100%;
  margin-top:5px;
  background:#0d1014;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:8px;
  padding:9px 10px;
}
@media(max-width:700px){
  .interface-text-grid{grid-template-columns:1fr}
}


/* V35.1 compact Moderator / Presenter text settings */
.settings-editor-card.interface-text-mode .screen-editor-layout{
  display:block;
  padding:18px;
}
.settings-editor-card.interface-text-mode .screen-editor-left{
  width:100%;
}
.settings-editor-card.interface-text-mode #settingsPreview{
  display:none;
}
.settings-editor-card.interface-text-mode .screen-properties-panel{
  display:none;
}
.settings-editor-card.interface-text-mode #screenContentPanel{
  width:100%;
  border:0;
  padding:0;
  background:transparent;
}
.compact-interface-text-settings{
  width:100%;
  border:1px solid var(--line);
  border-radius:12px;
  background:#10141a;
  padding:16px;
}
.interface-text-title-row{
  margin-bottom:14px;
}
.compact-interface-text-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px 14px;
}
@media(max-width:1100px){
  .compact-interface-text-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:650px){
  .settings-editor-card.interface-text-mode .screen-editor-layout{
    padding:12px;
  }
  .compact-interface-text-grid{
    grid-template-columns:1fr;
  }
}


/* V36 Audience configuration */
.presentation-settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px;align-items:start}
.presentation-settings-grid>.field{min-width:0;margin:0}
.presentation-audience-heading{margin-top:28px}
.presentation-video-field{grid-column:1/-1}
.manager-audience-status{display:none}
.audience-config-status{margin-top:4px}
@media(max-width:1050px){.presentation-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.presentation-video-field{grid-column:1/-1}}
@media(max-width:700px){.presentation-settings-grid{grid-template-columns:1fr}.presentation-video-field{grid-column:auto}}

/* V36 Moderator question / audience inbox tabs */
.moderator-question-tabs{display:flex;gap:6px;margin-bottom:14px;border-bottom:1px solid var(--line)}
.moderator-question-tab{display:flex;align-items:center;gap:8px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--muted);padding:8px 10px 10px;font:inherit;font-weight:700}
.moderator-question-tab.active{color:var(--text);border-bottom-color:var(--accent)}
.moderator-question-tab .question-count-badge{min-width:24px;height:24px;padding:0 7px;font-size:12px}
.moderator-list-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.audience-question-list{display:flex;flex-direction:column;gap:8px}
.audience-question-item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--line);background:#10141a;border-radius:10px;padding:12px}
.audience-question-item.handled{opacity:.55}
.audience-question-copy{min-width:0;flex:1}
.audience-question-meta{font-size:12px;color:var(--muted);margin-bottom:5px}
.audience-question-text{line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.audience-status{display:inline-flex;align-items:center;min-height:32px;padding:0 9px;border-radius:8px;border:1px solid var(--line);font-size:12px;font-weight:700}
.audience-status.added{color:#79e89b;border-color:rgba(55,201,107,.35)}
.audience-status.rejected{color:#ff9a9a;border-color:rgba(232,93,93,.35)}

/* V36 Audience pages */
.audience-body{margin:0;min-height:100vh;background:var(--bg);color:var(--text)}
.audience-boot-splash{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;background:var(--bg);opacity:1;visibility:visible;transition:opacity .12s ease,visibility 0s linear .12s}
.audience-boot-splash img{display:block;width:110px;max-width:32vw;height:auto}
.audience-boot-splash.is-ready{opacity:0;visibility:hidden;pointer-events:none}
.audience-shell{min-height:100vh}
.audience-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;border-bottom:1px solid var(--line);background:#101318}
.audience-header>div:first-child{display:flex;flex-direction:column;gap:2px}
.audience-header span{font-size:12px;color:var(--muted)}
.audience-connection{font-size:12px;color:var(--muted)}
.audience-connection.connected{color:var(--ok)}
.audience-main{width:min(720px,100%);margin:0 auto;padding:20px}
.audience-card h1{margin:0 0 8px;font-size:24px}
.audience-card textarea{min-height:140px}
.audience-consent{display:flex;align-items:flex-start;gap:9px;margin:8px 0 16px;color:var(--text);line-height:1.35}
.audience-consent input{margin-top:3px}
.audience-wide-button{width:100%}
.audience-profile-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px}
.audience-profile-row>div{display:flex;flex-direction:column;gap:3px}
.audience-message{min-height:20px;margin-top:8px}
.audience-history-section{margin-top:20px}
.audience-history-section h2{font-size:17px;margin:0 0 10px}
.audience-history{display:flex;flex-direction:column;gap:8px}
.audience-history-item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:#10141a}
.audience-history-item span{flex:0 0 auto;font-size:11px;color:var(--muted)}
.audience-unavailable{width:min(560px,calc(100% - 32px));margin:18vh auto 0;padding:24px;border:1px solid var(--line);border-radius:14px;background:var(--panel);text-align:center}
.watch-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(320px,.7fr);gap:18px;width:min(1500px,100%);margin:0 auto;padding:18px}
.watch-video-card{min-width:0}
.watch-video{position:relative;width:100%;aspect-ratio:16/9;background:#000;border:1px solid var(--line);border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.watch-player{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#000}.watch-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}.watch-poster{position:absolute;inset:0;z-index:2;background:#0d1014 center/cover no-repeat;transition:opacity .18s ease}.watch-poster.no-image{background-image:linear-gradient(135deg,#151a21,#090b0e)!important}.watch-poster-empty{position:absolute;inset:0}
.watch-question-column{min-width:0}
.watch-question-column .audience-history-section{padding:14px}
@media(max-width:900px){.watch-layout{grid-template-columns:1fr}.watch-question-column{display:flex;flex-direction:column}.watch-question-column .audience-history-section{order:3}}
@media(max-width:600px){
  .audience-header{padding:11px 12px}
  .audience-main{padding:12px}
  .watch-layout{padding:10px;gap:12px}
  .audience-card{border-radius:10px;padding:14px}
  .audience-card h1{font-size:21px}
  .audience-card textarea{min-height:120px}
  .audience-question-item{flex-direction:column}
  .audience-question-item .question-actions{width:100%;justify-content:flex-end}
}


/* V37 Audience link / QR output */
.audience-link-output{container-type:inline-size;overflow:hidden}
.audience-link-output .audience-link-title{font-weight:800;line-height:1.05;white-space:normal;max-width:90%}
.audience-link-output .audience-link-subtitle{font-weight:500;line-height:1.15;white-space:normal;max-width:90%}
.audience-link-output .audience-link-url{font-weight:500;line-height:1.15;white-space:normal;overflow-wrap:anywhere;max-width:92%}
.audience-link-qr{position:absolute;transform:translate(-50%,-50%);height:auto;aspect-ratio:1/1;object-fit:contain;background:#fff;border-radius:1.5%;padding:.6%;box-sizing:border-box}

/* Audience link settings editor */
.settings-editor-card.audience-link-mode .settings-screen-preview{container-type:inline-size}
.audience-link-editor-preview{position:absolute;inset:0;overflow:hidden;container-type:inline-size}
.audience-link-editor-text{position:absolute;transform:translate(-50%,-50%);text-align:center;line-height:1.12;max-width:92%;white-space:normal;overflow-wrap:anywhere}
.audience-link-editor-title{font-weight:800}
.audience-link-editor-subtitle{font-weight:500}
.audience-link-editor-url{font-weight:500}
.audience-link-editor-qr{position:absolute;transform:translate(-50%,-50%);height:auto;aspect-ratio:1/1;object-fit:contain;background:#fff;padding:.6%;box-sizing:border-box}
.audience-link-editor-qr-placeholder{position:absolute;transform:translate(-50%,-50%);aspect-ratio:1/1;display:grid;place-items:center;background:#fff;color:#111;font-weight:900;font-size:4cqw}
.audience-link-note{margin:14px 0 0}
.screen-content-panel-inner h3{margin-top:0}
.screen-content-panel-inner input[type=color]{display:block;width:100%;height:40px;margin-top:5px;padding:2px;border:1px solid var(--line);border-radius:8px;background:#0d1014}

/* Control: Q&A and QR are peer special-output controls */
.live-special-buttons{align-items:center}


/* V37.2 Watch page desktop layout
   Keep mobile behavior unchanged; maximize desktop video and prevent page scroll. */
@media(min-width:901px){
  .audience-body[data-audience-mode="watch"]{
    height:100vh;
    overflow:hidden;
  }

  .audience-body[data-audience-mode="watch"] .audience-shell{
    height:100vh;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  .audience-body[data-audience-mode="watch"] .audience-header{
    flex:0 0 auto;
  }

  .audience-body[data-audience-mode="watch"] .watch-layout{
    flex:1 1 auto;
    min-height:0;
    width:100%;
    max-width:none;
    margin:0;
    padding:14px;
    gap:14px;
    grid-template-columns:minmax(0,1fr) clamp(340px,27vw,440px);
    overflow:hidden;
  }

  .audience-body[data-audience-mode="watch"] .watch-video-card{
    min-width:0;
    min-height:0;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
  }

  .audience-body[data-audience-mode="watch"] .watch-video{
    width:100%;
    height:100%;
    max-width:100%;
    max-height:100%;
    aspect-ratio:16/9;
    border-radius:12px;
  }

  /* Preserve 16:9 while fitting entirely inside the available left area. */
  @supports (width:min(100%, 1px)){
    .audience-body[data-audience-mode="watch"] .watch-video{
      width:min(100%, calc((100vh - 94px) * 16 / 9));
      height:auto;
      max-height:100%;
    }
  }

  .audience-body[data-audience-mode="watch"] .watch-question-column{
    min-height:0;
    height:100%;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  .audience-body[data-audience-mode="watch"] .watch-question-column > .audience-card{
    flex:0 0 auto;
  }

  .audience-body[data-audience-mode="watch"] .watch-question-column .audience-history-section{
    flex:1 1 auto;
    min-height:0;
    margin-top:14px;
    padding:14px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  .audience-body[data-audience-mode="watch"] .watch-question-column .audience-history-section h2{
    flex:0 0 auto;
  }

  .audience-body[data-audience-mode="watch"] .watch-question-column .audience-history{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding-right:4px;
  }
}


/* V39 Manage: presentation left, contact + upload stacked right */
.manager-right-stack{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:18px;min-width:0}
.contact-config-card textarea{min-height:118px;resize:vertical}
.contact-tag-help{margin:-4px 0 12px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}
.contact-color-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:10px 0}
.contact-color-grid label{font-size:12px;color:var(--muted)}
.contact-color-grid input[type=color]{display:block;width:100%;height:36px;margin-top:5px;padding:2px;border:1px solid var(--line);border-radius:8px;background:#0d1014}
.contact-preview{min-height:58px;border:1px solid var(--line);border-radius:10px;padding:12px;line-height:1.4;overflow-wrap:anywhere}
.contact-preview a{color:var(--contact-link);font-weight:650}

/* V39 live audience contact block */
.audience-contact-wrap{margin:14px 0 4px;overflow:hidden}
.audience-contact-content{border-radius:10px;padding:14px 16px;line-height:1.45;overflow-wrap:anywhere;box-shadow:0 8px 24px rgba(0,0,0,.14)}
.audience-contact-content a{color:var(--contact-link);font-weight:700;text-decoration:underline;text-underline-offset:2px}
.audience-contact-visible{animation:audienceContactIn .3s ease both}
@keyframes audienceContactIn{from{opacity:0;transform:translateY(-7px)}to{opacity:1;transform:translateY(0)}}

@media(max-width:900px){
  .manager-right-stack{grid-template-rows:auto auto}
  .contact-color-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .watch-question-column .audience-contact-wrap{order:2}
  .watch-question-column .audience-history-section{order:3}
}
@media(max-width:600px){
  .contact-color-grid{grid-template-columns:1fr 1fr 1fr}
}


/* V39.1 contact save / copy */
.contact-preview-name,
.audience-contact-name{
  font-weight:800;
  margin-bottom:6px;
}
.audience-contact-text{line-height:1.45}
.audience-contact-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.audience-contact-actions .btn{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.22);
  color:inherit;
}
.audience-contact-actions .btn:hover{
  background:rgba(255,255,255,.14);
}


/* V39.2 contact action pills */
.audience-contact-actions{
  align-items:center;
}
.audience-contact-actions .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 14px;
  border:0;
  border-radius:999px;
  background:var(--contact-link);
  color:var(--contact-background);
  font-weight:750;
  line-height:1;
  box-shadow:none;
}
.audience-contact-actions .btn:hover,
.audience-contact-actions .btn:focus-visible{
  background:var(--contact-link);
  color:var(--contact-background);
  filter:brightness(1.06);
}
.audience-contact-actions .btn:active{
  transform:translateY(1px);
}


/* V42 Polls */
.poll-control-section{display:flex;flex-direction:column;gap:8px}.poll-control-select{width:100%;background:#0d1014;color:var(--text);border:1px solid var(--line);border-radius:9px;padding:9px 10px}.poll-control-status{min-height:18px}.poll-control-actions{display:flex;flex-wrap:wrap;gap:7px}.polls-editor{display:flex;flex-direction:column;gap:14px}.poll-editor-card{border:1px solid var(--line);border-radius:12px;background:#10141a;padding:14px}.poll-editor-card h3{margin:0}.poll-editor-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:10px}.poll-editor-grid label,.poll-question-label{font-size:12px;color:var(--muted)}.poll-editor-grid input,.poll-editor-grid select,.poll-question-label textarea,.poll-option-edit input{display:block;width:100%;margin-top:5px}.poll-question-label{display:block;margin:12px 0}.poll-options-editor{display:flex;flex-direction:column;gap:7px;margin-bottom:10px}.poll-option-edit{display:grid;grid-template-columns:28px minmax(0,1fr) 30px auto auto;gap:8px;align-items:center}.poll-option-edit>span{color:var(--muted);text-align:center}.poll-results-output{container-type:inline-size;overflow:hidden}.poll-results-heading,.poll-results-question,.poll-results-responses{transform:translate(-50%,-50%);text-align:center;max-width:92%}.poll-results-question{font-weight:750;line-height:1.12}.poll-results-list{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:calc(var(--poll-gap,22)/19.2 * 1cqw)}.poll-result-row{display:flex;flex-direction:column;gap:calc(7/19.2 * 1cqw)}.poll-result-label{display:flex;justify-content:space-between;gap:20px;line-height:1.15}.poll-result-label strong{white-space:nowrap}.poll-result-track{width:100%;border-radius:999px;overflow:hidden}.poll-result-fill{height:100%;border-radius:999px;transition:width .8s cubic-bezier(.22,.61,.36,1)}.presenter-poll-status{margin-top:8px;font-size:17px;color:var(--muted);text-align:center}.audience-poll-bar{width:100%;border:0;border-radius:10px;background:#6f59dc;color:white;padding:11px 13px;margin:0 0 14px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:12px;font:inherit;cursor:pointer}.audience-poll-bar>span:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}.audience-poll-bar>span:first-child span{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.audience-poll-bar-action{flex:0 0 auto;font-weight:750;font-size:12px}.audience-poll-modal{position:fixed;inset:0;z-index:1000;background:rgba(5,7,10,.94);display:grid;place-items:center;padding:18px}.audience-poll-card{position:relative;width:min(680px,100%);max-height:calc(100vh - 36px);overflow:auto;background:#151a21;border:1px solid var(--line);border-radius:16px;padding:24px}.audience-poll-card h1{font-size:clamp(25px,5vw,42px);line-height:1.12;margin:7px 38px 8px 0}.audience-poll-close{position:absolute;right:14px;top:12px;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:#0e1217;color:var(--text);font-size:23px}.audience-poll-options{display:flex;flex-direction:column;gap:9px;margin:20px 0}.audience-poll-option{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid var(--line);border-radius:10px;background:#10141a;font-size:18px}.audience-poll-option input{width:19px;height:19px;flex:0 0 auto}.poll-results-mode .settings-screen-preview{container-type:inline-size}@media(max-width:900px){.poll-editor-grid{grid-template-columns:1fr 1fr}.audience-poll-card{padding:20px}}@media(max-width:600px){.poll-editor-grid{grid-template-columns:1fr}.audience-poll-modal{padding:0}.audience-poll-card{width:100%;height:100%;max-height:none;border-radius:0;border:0;padding:20px 16px}.audience-poll-option{font-size:17px}}

/* V42.1 Poll results settings: compact three-column property layout */
.poll-results-mode .poll-results-property-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1150px){.poll-results-mode .poll-results-property-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.poll-results-mode .poll-results-property-grid{grid-template-columns:1fr}}



}


/* V42.3 Poll manager UI cleanup */
.poll-editor-card{
  background:#10141a;
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px;
}

.poll-editor-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:10px;
}

.poll-editor-grid label,
.poll-question-label{
  font-size:12px;
  color:var(--muted);
}

/* Make every editable poll control use the same visual language */
.poll-editor-grid input,
.poll-editor-grid select,
.poll-question-label textarea,
.poll-option-input{
  box-sizing:border-box;
  width:100%;
  margin-top:5px;
  min-height:38px;
  padding:8px 11px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#0d1014;
  color:var(--text);
  -webkit-text-fill-color:var(--text);
  font:inherit;
  color-scheme:dark;
  outline:none;
}

.poll-editor-grid select{
  appearance:auto;
}

.poll-question-label textarea{
  min-height:96px;
  resize:vertical;
  line-height:1.4;
}

.poll-editor-grid input:focus,
.poll-editor-grid select:focus,
.poll-question-label textarea:focus,
.poll-option-input:focus{
  border-color:var(--accent);
}

/* Answer rows */
.poll-options-editor{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:10px;
}

.poll-option-edit{
  display:grid;
  grid-template-columns:26px minmax(0,1fr) auto auto;
  gap:9px;
  align-items:center;
}

.poll-option-edit>span:first-child{
  color:var(--muted);
  text-align:center;
}

.poll-option-input{
  margin-top:0;
  min-height:38px;
}

/* Result fill is painted directly into the input background.
   Two adjacent stops create a hard percentage breakpoint. */
.poll-option-input.has-result{
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb,var(--accent) 30%,#0d1014) 0%,
      color-mix(in srgb,var(--accent) 30%,#0d1014) var(--poll-option-pct),
      #0d1014 var(--poll-option-pct),
      #0d1014 100%
    );
}

.poll-option-percentage{
  min-width:44px;
  text-align:right;
  font-size:12px;
  font-weight:750;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}

/* Locked poll: retain normal readable styling instead of browser disabled grey */
.poll-editor-locked input:disabled,
.poll-editor-locked select:disabled,
.poll-editor-locked textarea:disabled{
  opacity:1;
  color:var(--text);
  -webkit-text-fill-color:var(--text);
  cursor:default;
  border-color:var(--line);
}

.poll-editor-locked select:disabled{
  background:#0d1014;
}

.poll-editor-footer{
  align-items:center;
}

@supports not (background:color-mix(in srgb, red 10%, black)){
  .poll-option-input.has-result{
    background:
      linear-gradient(
        90deg,
        #263c58 0%,
        #263c58 var(--poll-option-pct),
        #0d1014 var(--poll-option-pct),
        #0d1014 100%
      );
  }
}

@media(max-width:900px){
  .poll-editor-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
  .poll-editor-grid{grid-template-columns:1fr}
}

/* V45 audience reach indicator */
.live-output-online{font-size:.72em;font-weight:500;color:var(--muted);white-space:nowrap}

/* V47 webinar lifecycle */
.webinar-session-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.webinar-session-stats>div{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#0d1014}.webinar-session-stats strong{display:block;font-size:20px}.webinar-session-stats span{display:block;margin-top:3px;font-size:11px;color:var(--muted)}.audience-ended{width:min(680px,calc(100% - 28px));margin:auto;padding:32px;text-align:center}.audience-ended h1{font-size:clamp(30px,6vw,54px);margin:0 0 10px}.audience-ended>p{font-size:17px;margin:0 0 20px}.audience-ended .audience-contact-wrap{text-align:left;max-width:600px;margin:22px auto}@media(max-width:800px){.webinar-session-stats{grid-template-columns:1fr 1fr}}

/* V48 audience privacy header */
.audience-header{align-items:stretch;flex-direction:column;gap:6px}
.audience-header>strong{display:block}
.audience-header-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%}
.audience-privacy-link{margin-left:auto;font-size:12px;color:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.audience-privacy-link:hover{opacity:.82}
.audience-privacy-modal{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:18px}
.audience-privacy-modal.hidden{display:none}
.audience-privacy-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.62)}
.audience-privacy-dialog{position:relative;z-index:1;width:min(680px,100%);max-height:min(78vh,760px);overflow:auto;background:#171b22;color:#f7f8fa;border:1px solid rgba(255,255,255,.13);border-radius:14px;padding:24px 26px;box-shadow:0 18px 70px rgba(0,0,0,.45)}
.audience-privacy-dialog h2{margin:0 38px 16px 0;font-size:22px}
.audience-privacy-text{white-space:pre-wrap;line-height:1.55;font-size:14px}
.audience-privacy-close{position:absolute;right:12px;top:9px;border:0;background:transparent;color:inherit;font-size:28px;line-height:1;cursor:pointer;padding:4px 8px}


/* V48.1 mobile audience spacing cleanup */
.audience-message:empty{
  display:none;
}
.audience-history-section.card{
  padding:14px;
  border-radius:10px;
  background:var(--panel);
  border:1px solid var(--line);
}
@media(max-width:600px){
  /* Use nearly the full phone width; card internals keep their own padding. */
  .audience-main{
    width:100%;
    max-width:none;
    margin:0;
    padding:4px;
    box-sizing:border-box;
  }
  .audience-question-only .audience-main{
    padding:4px;
  }
  .audience-question-only .audience-card,
  .audience-question-only .audience-history-section{
    width:100%;
    box-sizing:border-box;
  }
  .audience-history-section{
    margin-top:4px;
  }
  .audience-history-section.card{
    padding:14px;
  }

  /* On the mobile Watch page the video keeps its small edge margin,
     while question/history cards use the full question-column width. */
  .watch-layout{
    padding:4px;
    gap:6px;
  }
  .watch-question-column{
    gap:4px;
  }
  .watch-question-column .audience-history-section{
    padding:14px;
  }
}


/* V48.2 Show control countdown-time shortcut */
.show-clock-button{
  width:28px;height:28px;display:inline-grid;place-items:center;
  padding:0;border:1px solid var(--line);border-radius:7px;
  background:#151a21;color:var(--muted);font-size:18px;line-height:1;cursor:pointer;
}
.show-clock-button:hover{color:var(--text);border-color:#485263}
.countdown-time-popover{
  position:absolute;z-index:250;width:min(330px,calc(100vw - 24px));
  right:22px;margin-top:-8px;padding:14px;
  border:1px solid var(--line);border-radius:11px;background:#151a21;
  box-shadow:0 14px 40px rgba(0,0,0,.42);
}
.countdown-time-popover.hidden{display:none}
.countdown-time-popover-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:11px}
.countdown-time-close{border:0;background:transparent;color:var(--muted);font-size:22px;cursor:pointer;padding:0 3px}
.countdown-time-popover label{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:12px}
.countdown-time-popover input{
  min-height:38px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;
  background:#0d1014;color:var(--text);color-scheme:dark;
}
.countdown-time-popover .controls{margin-top:11px;justify-content:flex-end}


/* V53 public audience join page */
.join-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:var(--bg)}
.join-wrap{width:min(460px,100%)}
.join-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:26px}
.join-card h1{margin:0 0 7px;font-size:28px}
.join-card>p{margin:0 0 24px}
.join-code-input{
  width:100%;min-height:56px;padding:10px 14px!important;
  text-align:center;font-size:27px;font-weight:750;letter-spacing:.08em;
  text-transform:lowercase;
}
.join-button{width:100%;margin-top:12px;min-height:46px}
.join-message{min-height:20px;margin-top:12px;text-align:center;font-size:13px}
@media(max-width:600px){
  .join-page{padding:8px}
  .join-card{padding:22px 16px;border-radius:13px}
  .join-code-input{font-size:24px}
}


/* V53.2 viewer reconnect indicator
   Normal connection/reconnection state is invisible after initial load.
   A persistent disconnect shows only this small operator-visible dot. */
.viewer-disconnect-dot{
  position:fixed;
  left:10px;
  bottom:10px;
  z-index:1000;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#ff3b3b;
  box-shadow:0 0 0 2px rgba(0,0,0,.42),0 0 8px rgba(255,59,59,.55);
  pointer-events:none;
}
.viewer-disconnect-dot.hidden{display:none}
.embedded-viewer .viewer-disconnect-dot{display:none}


/* V53.3 Control connection health */
.control-connection-warning{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 9px;
  border:1px solid rgba(255,74,74,.45);
  border-radius:8px;
  background:rgba(111,24,30,.42);
  color:#ff9b9b;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.control-connection-warning.hidden{display:none}
.control-disconnect-dot{
  display:inline-block;
  flex:0 0 auto;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#ff3b3b;
  box-shadow:0 0 7px rgba(255,59,59,.55);
}
.connection-stale-message{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px;
  border:1px solid rgba(255,74,74,.25);
  border-radius:9px;
  background:rgba(92,24,29,.18);
}
.connection-stale-message .control-disconnect-dot{margin-top:4px}


/* V53.4 Moderator / Presenter connection health */
.operator-connection-warning,
.presenter-connection-warning{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 9px;
  border:1px solid rgba(255,74,74,.45);
  border-radius:8px;
  background:rgba(111,24,30,.42);
  color:#ff9b9b;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.operator-connection-warning.hidden,
.presenter-connection-warning.hidden{display:none}
.moderator-disconnected #addQuestion,
.moderator-disconnected [data-q],
.moderator-disconnected [data-done],
.moderator-disconnected [data-del],
.moderator-disconnected [data-audience-add],
.moderator-disconnected [data-audience-reject]{
  opacity:.48;
  cursor:not-allowed;
}


/* V53.6 countdown audience join elements */
.countdown-join-qr{
  position:absolute;
  z-index:2;
  transform:translate(-50%,-50%);
  height:auto;
  aspect-ratio:1/1;
  object-fit:contain;
  background:#fff;
  border-radius:2%;
  padding:.45%;
  box-sizing:border-box;
}
.countdown-join-info{
  transform:translate(-50%,-50%);
  text-align:center;
  line-height:1.08;
  white-space:nowrap;
}
.countdown-join-info strong,
.countdown-join-info span{display:block}
.countdown-join-info strong{font-weight:800}
.countdown-join-info span{margin-top:.18em;font-size:.72em;font-weight:650}


/* V08 fresh install: five project slots + account */
.project-slots-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
.project-slot-card{
  border:1px solid var(--line);
  border-radius:12px;
  background:#10141a;
  padding:13px;
  min-width:0;
}
.project-slot-card.active{
  border-color:var(--accent);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 45%,transparent);
}
.project-slot-number{
  font-size:10px;
  letter-spacing:.12em;
  color:var(--muted);
  margin-bottom:8px;
}
.project-slot-name{
  width:100%;
  font-weight:750;
  margin-bottom:7px;
}
.project-slot-title{
  color:var(--muted);
  font-size:12px;
  min-height:34px;
  overflow:hidden;
}
.project-slot-meta{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
  margin:10px 0;
  font-size:11px;
  color:var(--muted);
}
.project-status{
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:999px;
  padding:3px 6px;
  font-size:9px;
  font-weight:800;
  letter-spacing:.06em;
}
.project-status.live{
  color:#a7f3c0;
  border-color:#27653e;
  background:#102a1b;
}
.project-slot-actions{min-height:32px;display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.active-project-label{
  font-size:10px;
  font-weight:850;
  letter-spacing:.1em;
  color:var(--accent);
}
.project-slot-help{margin-top:14px;line-height:1.45}
.account-card{max-width:620px}
.webinar-session-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1100px){.project-slots-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){
  .project-slots-grid{grid-template-columns:1fr}
  .project-slot-card{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px}
  .project-slot-number,.project-slot-name,.project-slot-title{grid-column:1}
  .project-slot-meta{grid-column:1}
  .project-slot-actions{grid-column:2;grid-row:1/5;align-self:center}
}


/* V08.1 global privacy block */
.global-privacy-card{
  width:100%;
  margin-top:18px;
}
.global-privacy-card textarea{
  min-height:320px;
  line-height:1.5;
  resize:vertical;
}


/* V08.2 audience lobby + sound check */
.global-sound-check{
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid var(--line);
}
.global-sound-check h3{margin:0 0 6px}
.audience-lobby{
  margin:12px auto 0;
  width:min(960px,calc(100% - 24px));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 16px;
}
.audience-question-only .audience-lobby{
  max-width:720px;
}
.audience-lobby-copy{
  display:flex;
  align-items:center;
  gap:18px;
  min-width:0;
  flex:1;
}
.audience-lobby-status{
  font-weight:750;
  white-space:nowrap;
}
.audience-lobby-countdown-wrap{
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:128px;
}
.audience-lobby-countdown{
  font-variant-numeric:tabular-nums;
  font-size:22px;
  line-height:1.05;
}
.audience-lobby-hint{min-width:0}
.audience-sound-check{
  flex:0 0 auto;
  white-space:nowrap;
}
.audience-lobby-live{
  justify-content:flex-end;
  padding-top:8px;
  padding-bottom:8px;
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}
.audience-question-locked textarea{
  opacity:.58;
}
.audience-question-locked .audience-wide-button{
  opacity:.52;
  cursor:not-allowed;
}
.join-message{
  min-height:24px;
  line-height:1.4;
}
@media(max-width:700px){
  .audience-lobby{
    margin-top:0;
    width:100%;
    border-left:0;
    border-right:0;
    border-radius:0;
    align-items:flex-start;
  }
  .audience-lobby-copy{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
  }
  .audience-lobby-countdown-wrap{
    flex-direction:row;
    align-items:baseline;
    gap:8px;
  }
  .audience-lobby-countdown{font-size:18px}
  .audience-sound-check{margin-left:auto}
}


/* V08.3 simplified audience pre-live header/lobby */
.audience-header-meta{
  display:flex;
  align-items:center;
  gap:12px;
}
.audience-header-action{
  appearance:none;
  border:0;
  background:transparent;
  color:inherit;
  padding:0;
  font:inherit;
  cursor:pointer;
  opacity:.86;
}
.audience-header-action:hover{opacity:1;text-decoration:underline}
.audience-lobby{
  margin:12px auto 0;
  width:min(960px,calc(100% - 24px));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:18px 16px;
}
.audience-question-only .audience-lobby{max-width:720px}
.audience-lobby-status{
  font-weight:750;
  white-space:normal;
}
.audience-lobby-countdown-wrap{
  margin-left:auto;
  min-width:150px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  text-align:right;
  gap:1px;
}
.audience-lobby-countdown{
  font-variant-numeric:tabular-nums;
  font-size:22px;
  line-height:1.05;
}
@media(max-width:560px){
  .audience-header-meta{gap:8px}
  .audience-header-action{font-size:14px}
  .audience-lobby{
    width:100%;
    margin-top:0;
    border-left:0;
    border-right:0;
    border-radius:0;
    gap:12px;
  }
  .audience-lobby-countdown-wrap{min-width:125px}
  .audience-lobby-countdown{font-size:18px}
}


/* V08.4 audience alignment and header sound controls */
.audience-header{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.audience-header-left,
.audience-header-right{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.audience-header-left{align-items:flex-start}
.audience-header-right{
  align-items:flex-end;
  margin-left:auto;
}
.audience-header-action,
.audience-privacy-link{
  font-size:12px;
  line-height:1.2;
}
.audience-privacy-link{margin-left:0}
.audience-question-only .audience-lobby{
  width:min(680px,calc(100% - 40px));
  max-width:680px;
  box-sizing:border-box;
}
@media(max-width:600px){
  .audience-question-only .audience-lobby{
    width:100%;
    max-width:none;
  }
}


/* V08.5 countdown follows question-column flow; sound check is a real button */
.audience-header-action{
  appearance:none;
  border:1px solid var(--line);
  border-radius:8px;
  background:#171c24;
  color:var(--text);
  padding:6px 10px;
  font:inherit;
  font-size:13px;
  line-height:1.2;
  cursor:pointer;
  text-decoration:none;
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .12s ease;
}
.audience-header-action:hover{
  text-decoration:none;
  border-color:#5a6575;
  background:#1d2430;
}
.audience-header-action:active{transform:translateY(1px)}
.audience-header-action.sound-check-active{
  background:#eef9ff;
  color:#0b1117;
  border-color:#9de2ff;
  box-shadow:0 0 0 2px rgba(157,226,255,.18),0 0 16px rgba(157,226,255,.55);
}
.audience-lobby{
  width:100%;
  max-width:none;
  box-sizing:border-box;
  margin:0 0 18px;
  padding:12px 14px;
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:8px;
  text-align:center;
}
.audience-lobby-countdown{
  font-size:inherit;
  line-height:inherit;
  font-variant-numeric:tabular-nums;
}
.watch-question-column .audience-lobby{
  flex:0 0 auto;
  margin:0 0 14px;
}
@media(max-width:900px){
  .watch-question-column .audience-lobby{order:0}
}
@media(max-width:600px){
  .audience-lobby{
    width:100%;
    margin:0 0 4px;
    border-left:1px solid var(--line);
    border-right:1px solid var(--line);
    border-radius:10px;
  }
  .watch-question-column .audience-lobby{margin-bottom:4px}
}


/* V08.6 unified /connect audience page */
.audience-body[data-audience-mode="questions"] .watch-layout{
  display:block;
  width:min(720px,100%);
  height:auto;
  margin:0 auto;
  padding:20px;
  overflow:visible;
}
.audience-body[data-audience-mode="questions"] .watch-question-column{
  width:100%;
  height:auto;
  overflow:visible;
}
.audience-body[data-audience-mode="questions"] .watch-video-card{
  display:none !important;
}
@media(max-width:600px){
  .audience-body[data-audience-mode="questions"] .watch-layout{
    width:100%;
    padding:4px;
    box-sizing:border-box;
  }
}


/* V08.7 one authoritative question-column width */
.audience-body[data-audience-page="connect"] .watch-question-column{
  box-sizing:border-box;
}
.audience-body[data-audience-page="connect"] .watch-question-column > .audience-lobby,
.audience-body[data-audience-page="connect"] .watch-question-column > .audience-card,
.audience-body[data-audience-page="connect"] .watch-question-column > .audience-contact-wrap,
.audience-body[data-audience-page="connect"] .watch-question-column > .audience-history-section{
  width:100%;
  max-width:none;
  box-sizing:border-box;
}

/* Questions-only: the column itself determines the desktop width. */
.audience-body[data-audience-mode="questions"] .watch-layout{
  width:100%;
  max-width:none;
  padding:20px;
  box-sizing:border-box;
}
.audience-body[data-audience-mode="questions"] .watch-question-column{
  width:min(680px,100%);
  max-width:680px;
  margin:0 auto;
}

/* Watch mode: the grid determines column width; its contents remain 100%. */
.audience-body[data-audience-mode="watch"] .watch-question-column{
  width:100%;
  max-width:none;
}

@media(max-width:600px){
  .audience-body[data-audience-mode="questions"] .watch-layout{
    padding:4px;
  }
  .audience-body[data-audience-mode="questions"] .watch-question-column{
    width:100%;
    max-width:none;
    margin:0;
  }
}

/* V16 countdown alignment + audience messages */
#audienceLiveMessageHost{position:relative;z-index:20}
.audience-live-message-ui{margin:10px auto;width:min(960px,calc(100% - 24px));box-sizing:border-box;padding:12px 16px;border-radius:10px;font-size:clamp(15px,2vw,20px);font-weight:750;line-height:1.35;text-align:center;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.audience-question-only .audience-live-message-ui{max-width:680px}
.audience-message-control-card textarea{resize:vertical}
@media(max-width:600px){.audience-live-message-ui{width:calc(100% - 8px);margin:4px auto;border-radius:8px}}


/* V17 fixed 4TV logo on public join page */
.join-logo{
  display:block;
  width:min(110px,32vw);
  height:auto;
  margin:8px auto 14px;
  object-fit:contain;
}


/* V18: logo sits below the join card, outside the gray form block */
.join-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.join-card{
  width:min(460px,calc(100vw - 32px));
  box-sizing:border-box;
}
.join-logo{
  display:block;
  width:min(110px,32vw);
  height:auto;
  margin:22px auto 0;
  object-fit:contain;
  flex:0 0 auto;
}


/* V19 global/translatable join-page copy */
.join-card{
  text-align:center;
}
.join-card form{
  text-align:center;
}
.join-card form > label{
  display:block;
  text-align:center;
}
.global-join-text-card{
  width:100%;
  margin-top:18px;
}
.global-join-text-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
@media(max-width:700px){
  .global-join-text-grid{grid-template-columns:1fr}
}

/* V20 inactive-project adaptive status checking */
.audience-status-refresh{margin-left:auto;border:0;background:transparent;color:inherit;text-decoration:underline;opacity:.72;cursor:pointer;font:inherit;padding:4px 0}
.audience-status-refresh:hover{opacity:1}
.audience-status-refresh:disabled{opacity:.4;cursor:default}


/* V22 regenerate presentation/audience keys */
.key-regenerate-row{
  display:flex;
  align-items:center;
  gap:7px;
}
.key-regenerate-row input{
  flex:1 1 auto;
  min-width:0;
}
.key-regenerate-button{
  flex:0 0 38px;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:8px;
  background:#171c24;
  color:var(--text);
  font-size:21px;
  line-height:1;
  cursor:pointer;
}
.key-regenerate-button:hover{
  background:#202733;
  border-color:#596474;
}
.key-regenerate-button:active{transform:translateY(1px)}


/* V26 dedicated OBS audience-message overlay */
.message-overlay-body{
  margin:0;
  width:100vw;
  height:100vh;
  overflow:hidden;
  background:transparent !important;
}
.message-overlay-root{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:5vw;
  box-sizing:border-box;
  pointer-events:none;
}
.message-overlay-box{
  max-width:88vw;
  padding:.55em .9em;
  border-radius:.22em;
  font-size:clamp(28px,3.1vw,68px);
  font-weight:750;
  line-height:1.18;
  text-align:center;
  box-shadow:0 .18em .55em rgba(0,0,0,.3);
  white-space:pre-wrap;
}
.message-overlay-disconnect-dot{
  position:fixed;
  left:10px;
  bottom:10px;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#ff3b3b;
  box-shadow:0 0 0 2px rgba(0,0,0,.42),0 0 8px rgba(255,59,59,.55);
}


/* V27 force true transparency for OBS message browser source */
html:has(body.message-overlay-body),
body.message-overlay-body{
  background:rgba(0,0,0,0) !important;
  background-color:rgba(0,0,0,0) !important;
}


/* Moderator question-editing UX */
.question-count-badge{
  transition:opacity .16s ease;
}
.question-count-badge.empty{
  opacity:.5;
}
.question-edit-button{
  min-width:34px;
  font-size:16px;
  line-height:1;
}
.question-edit-modal{
  width:min(560px,calc(100vw - 32px));
}
.question-edit-modal textarea{
  resize:vertical;
  min-height:120px;
}


/* V32: ended-webinar Control workflow */
.ended-webinar-panel { margin-bottom:18px; border-color:#6a5560; background:linear-gradient(180deg,#20171b,#17191f); }
.ended-webinar-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.ended-webinar-heading h2 { margin:2px 0 7px; }
.ended-webinar-heading p { margin:0; max-width:760px; line-height:1.5; }
.ended-webinar-eyebrow { font-size:12px; letter-spacing:.14em; font-weight:800; color:#e6a9b7; }
.ended-webinar-actions { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:18px; }
.ended-action-group { border:1px solid var(--line); border-radius:10px; padding:14px; background:#101318; }
.ended-action-group > strong { display:block; margin-bottom:10px; }
.ended-next-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; }
.ended-next-row select { width:100%; }
.control-webinar-ended .show-clock-button { opacity:.45; }

/* V32: global report archive */
.reports-refresh { min-width:38px; font-size:19px; line-height:1; }
.reports-list { margin-top:14px; overflow-x:auto; }
.reports-table { min-width:820px; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.reports-row { display:grid; grid-template-columns:1.05fr 2.3fr 1.25fr .65fr 1.15fr; gap:14px; align-items:center; padding:11px 13px; border-bottom:1px solid var(--line); }
.reports-row:last-child { border-bottom:0; }
.reports-head { background:#101318; color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
.reports-project-name { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.reports-file-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reports-actions { flex-wrap:nowrap; }
.reports-empty { padding:18px 0; }

@media (max-width:760px){
  .ended-webinar-actions { grid-template-columns:1fr; }
  .ended-webinar-heading { flex-direction:column; }
}

/* V33: style the ended-webinar slot dropdown like the rest of 4TV */
.ended-next-row select {
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:40px;
  padding:9px 38px 9px 11px;
  border:1px solid var(--line);
  border-radius:8px;
  background:
    linear-gradient(45deg,transparent 50%,var(--muted) 50%) calc(100% - 16px) 50%/5px 5px no-repeat,
    linear-gradient(135deg,var(--muted) 50%,transparent 50%) calc(100% - 11px) 50%/5px 5px no-repeat,
    #0d1014;
  color:var(--text);
  font:inherit;
  color-scheme:dark;
  cursor:pointer;
}
.ended-next-row select:hover {
  border-color:#4d5969;
}
.ended-next-row select:focus {
  outline:none;
  border-color:#62b7ff;
  box-shadow:0 0 0 2px rgba(98,183,255,.14);
}
.ended-next-row select:disabled {
  opacity:.55;
  cursor:not-allowed;
}
.ended-next-row select option {
  background:#0d1014;
  color:var(--text);
}


/* V35: optional moderator handoff when Control switches slots */
.ended-moderator-invite {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
  cursor:pointer;
}
.ended-moderator-invite input {
  width:auto;
  margin:0;
  accent-color:#6d5ce7;
}
.moderator-switch-modal {
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
}
.moderator-switch-modal.hidden { display:none !important; }
.moderator-switch-backdrop {
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.78);
  backdrop-filter:blur(2px);
}
.moderator-switch-dialog {
  position:relative;
  z-index:1;
  width:min(460px,calc(100vw - 32px));
  padding:24px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#15181e;
  box-shadow:0 18px 60px rgba(0,0,0,.5);
}
.moderator-switch-close { position:absolute; top:14px; right:14px; }
.moderator-switch-dialog h2 { margin:3px 42px 12px 0; }
.moderator-switch-dialog p { margin:0 0 8px; color:var(--muted); }
.moderator-switch-eyebrow {
  font-size:12px;
  letter-spacing:.14em;
  font-weight:800;
  color:#9cc8ff;
}
.moderator-switch-title {
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#0d1014;
  font-weight:700;
  margin-bottom:18px;
}
.moderator-switch-actions {
  display:flex;
  gap:9px;
  flex-wrap:wrap;
}
.moderator-switch-blocked { overflow:hidden; }


/* V36: OBS Browser Source key sync */
.obs-browser-source-grid {
  grid-template-columns:minmax(180px,.8fr) minmax(240px,1.2fr);
}
.obs-browser-auto { margin:10px 0; }
.obs-browser-refresh { min-width:38px; font-size:18px; line-height:1; }
.obs-browser-source-list {
  display:grid;
  gap:6px;
  margin:10px 0;
  max-height:220px;
  overflow:auto;
}
.obs-browser-source-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#0d1014;
}
.obs-browser-source-main { min-width:0; }
.obs-browser-source-main strong { display:block; font-size:13px; }
.obs-browser-source-url {
  display:block;
  margin-top:2px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:11px;
}
.obs-browser-source-state {
  border-radius:999px;
  padding:3px 7px;
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
}
.obs-browser-source-state.correct { background:rgba(70,190,120,.12); color:#7bd8a0; }
.obs-browser-source-state.wrong { background:rgba(242,184,65,.12); color:#f0c96b; }
.obs-browser-source-state.unavailable { background:rgba(160,170,185,.12); color:#a9b1bd; }
.obs-browser-empty { padding:8px 0; }
.obs-settings-section code { color:#c7d7eb; }
@media (max-width:700px){
  .obs-browser-source-grid { grid-template-columns:1fr; }
}

/* V41 question cooldown + manual participant pause */
.audience-question-pause-message{font-size:12px;line-height:1.35;color:var(--muted);margin:2px 0 7px;text-align:center}
#submitQuestion:disabled{cursor:not-allowed;opacity:.72}
.participant-pause-button{min-width:34px;font-size:17px;line-height:1}
.participant-pause-button.active{font-weight:800}
.participant-pause-modal{max-width:480px}
.participant-pause-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:18px 0}
@media(max-width:520px){.participant-pause-options{grid-template-columns:1fr}}

/* V42 moderator-only participant identifiers */
.audience-participant-code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:700;letter-spacing:.08em;color:var(--text)}

/* V47 audience form compaction */
#currentAudienceName{display:inline}
.audience-identity-name{font-weight:700;color:var(--text);font-style:normal}
.audience-identity-status{font-weight:400;color:var(--muted);font-style:italic}
#currentAudienceConsent.hidden{display:none!important}

/* V50 compact audience header + privacy footer */
.audience-header{
  align-items:center;
}
.audience-header-left{
  flex-direction:row!important;
  align-items:baseline!important;
  gap:8px!important;
  min-width:0;
}
#audienceTitle{
  color:var(--text);
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.audience-connection{
  flex:0 0 auto;
  font-size:12px;
  line-height:1.2;
}
.audience-header-right{
  flex:0 0 118px;
  min-width:118px;
  min-height:30px;
  justify-content:center;
}
.audience-header-right .audience-header-action{
  align-self:flex-end;
}
.audience-privacy-footer{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:28px;
  padding:7px 0 3px;
  text-align:center;
}
.audience-privacy-footer .audience-privacy-link{
  margin:0;
  font-size:12px;
  color:var(--muted);
}
.audience-ended .audience-privacy-footer{
  margin-top:10px;
}
@media(max-width:600px){
  .audience-header-left{gap:6px!important}
  #audienceTitle{font-size:14px}
  .audience-connection{font-size:11px}
  .audience-header-right{
    flex-basis:104px;
    min-width:104px;
  }
}

/* V53 Moderator → Presenter alert */
.moderator-top-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:7px;
}
.presenter-alert-toggle.active{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
}
.presenter-alert-edit{
  min-width:34px;
  padding-left:9px;
  padding-right:9px;
}
.presenter-alert-modal textarea{
  min-height:150px;
  resize:vertical;
}
.presenter-next-panel{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.presenter-alert-panel{
  flex:1 1 auto;
  min-height:0;
  margin-top:14px;
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel);
  overflow:auto;
}
.presenter-alert-message{
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:var(--text);
  font-size:16px;
  line-height:1.45;
}

/* V54 public-output font library */
.font-library-preview{width:100%;min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:30px;text-align:center;background:radial-gradient(circle at 50% 35%,#263446 0%,#090b0e 72%)}
.font-library-kicker{font-size:12px;letter-spacing:.14em;color:var(--muted);font-weight:800}
.font-library-hero{font-size:clamp(26px,4vw,54px);font-weight:700}
.font-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.font-library-card{padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.font-library-name{font-size:12px;color:var(--muted);margin-bottom:8px}
.font-library-sample{font-size:23px;line-height:1.25}
.font-library-source-note{margin-top:18px}
.font-library-source-note code{color:var(--text)}
@media(max-width:800px){.font-library-grid{grid-template-columns:1fr}}


/* V58 Poster settings */
.settings-editor-card.poster-mode .settings-screen-preview{background:#090b0e}
.poster-settings-preview{position:absolute;inset:0;background:#090b0e;display:grid;place-items:center;overflow:hidden}
.poster-settings-preview img{width:100%;height:100%;display:block}
.poster-settings-empty{max-width:70%;text-align:center;color:var(--muted);display:flex;flex-direction:column;gap:8px}
.poster-settings-empty strong{color:var(--text);font-size:20px}

/* V59 Moderator visitor count + compact intake */
.moderator-header-copy{min-width:0;}
.moderator-header-meta{display:flex;align-items:center;gap:9px;min-width:0;}
.moderator-header-meta #title{min-width:0;}
.moderator-visitor-count{flex:0 0 auto;font-size:12px;color:var(--muted);white-space:nowrap;}
@media(max-width:600px){
  .moderator-header-copy{min-width:0;max-width:58vw;}
  .moderator-header-meta{gap:7px;}
  body:has(.moderator-workspace) > .topbar #title{max-width:none;min-width:0;}
  .moderator-visitor-count{font-size:11px;}
}

/* V60 compact audience name setup */
.audience-body[data-audience-page="connect"] #identityCard .audience-name-field{margin-top:8px}
.audience-body[data-audience-page="connect"] #identityCard .audience-name-field input{width:100%}


/* V61 optional 4TV video player overlay */
.watch-video-shield{position:absolute;inset:0;z-index:3;background:transparent;cursor:default}
.watch-custom-controls{position:absolute;left:10px;right:10px;bottom:10px;z-index:4;display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;background:rgba(8,10,13,.82);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);box-shadow:0 2px 12px rgba(0,0,0,.25)}
.watch-custom-controls.hidden,.watch-video-shield.hidden{display:none!important}
.watch-control-btn{appearance:none;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);color:#fff;border-radius:7px;padding:7px 10px;font:inherit;font-size:13px;line-height:1;cursor:pointer;white-space:nowrap}
.watch-control-btn:hover{background:rgba(255,255,255,.15)}
.watch-control-btn:focus-visible,.watch-volume:focus-visible{outline:2px solid #fff;outline-offset:2px}
.watch-volume{min-width:70px;max-width:150px;flex:1 1 120px;accent-color:#fff}
.watch-youtube-api-player,.watch-youtube-api-player iframe{position:absolute!important;inset:0;width:100%!important;height:100%!important;border:0}
.watch-video:fullscreen{border:0;border-radius:0;background:#000}
.watch-video:fullscreen .watch-custom-controls{left:18px;right:18px;bottom:18px}
@media(max-width:520px){.watch-custom-controls{left:6px;right:6px;bottom:6px;gap:5px;padding:6px}.watch-control-btn{padding:7px 8px;font-size:12px}.watch-volume{min-width:54px}}

/* V69 Manager: realtime connection limits */
.connection-limits-card{max-width:860px}
.connection-limit-list{display:grid;gap:0;margin:18px 0;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.connection-limit-row{display:grid;grid-template-columns:minmax(220px,1fr) 100px 120px;gap:14px;align-items:center;padding:11px 12px;margin:0;border-bottom:1px solid var(--line);background:#10141a;color:var(--text)}
.connection-limit-row:last-child{border-bottom:0}
.connection-limit-row>span:first-child{display:grid;gap:2px}
.connection-limit-row small{color:var(--muted);font-size:12px;font-weight:400}
.connection-limit-row input[type=number]{width:100%;background:#0d1014;color:var(--text);border:1px solid var(--line);border-radius:8px;padding:8px 9px;font:inherit}
.connection-limit-current{color:var(--muted);font-size:13px;text-align:right;font-variant-numeric:tabular-nums}
.connection-limit-total{background:#151a21}
.connection-limit-actions{margin-top:14px;align-items:center}
@media(max-width:650px){.connection-limit-row{grid-template-columns:1fr 110px}.connection-limit-current{grid-column:1;text-align:left}.connection-limit-row input[type=number]{grid-column:2;grid-row:1/3}}
.manage-tabs{overflow-x:auto}
.manage-tab{flex:0 0 auto}
.connection-limit-head{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);background:#0d1014}
.connection-limit-head>span:nth-child(2){text-align:right}
@media(max-width:650px){.connection-limit-head{display:none}}


/* Blocking connection-cap notice */
.connection-limit-modal{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(4,7,11,.82);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.connection-limit-dialog{box-sizing:border-box;width:min(520px,100%);padding:28px;border:1px solid rgba(255,255,255,.14);border-radius:16px;background:#151a21;color:#f7f8fa;box-shadow:0 18px 60px rgba(0,0,0,.45);text-align:center;font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.connection-limit-dialog h2{margin:0 0 10px;font-size:24px;line-height:1.2}
.connection-limit-dialog p{margin:0 0 22px;color:#aeb7c3;font-size:15px;line-height:1.5}
.connection-limit-dialog .connection-limit-retry{min-width:150px}
.connection-limit-dialog .connection-limit-retry:disabled{opacity:.55;cursor:default}

/* V72: configurable Quick Actions deck in Control */
.quick-actions-card.collapsed .quick-actions-subtitle,.quick-actions-card.collapsed #quickActionsSettingsButton{display:none}.quick-actions-head{align-items:center}.quick-actions-head h2{margin:0 0 3px}.quick-actions-grid{display:grid;grid-template-columns:repeat(var(--quick-action-columns,4),minmax(0,1fr));gap:9px;margin-top:14px}.quick-action-button{min-height:44px;white-space:normal;line-height:1.2}.quick-actions-empty{grid-column:1/-1;padding:6px 0}.quick-actions-settings-modal{width:min(720px,calc(100vw - 28px));max-height:calc(100vh - 36px);overflow:auto}.quick-actions-settings-top{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;align-items:end}.quick-actions-settings-top label,.quick-actions-add-row label{font-size:12px;color:var(--muted)}.quick-actions-settings-top input,.quick-actions-settings-top select{display:block;width:100%;margin-top:5px}.quick-actions-add-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}.quick-actions-help{margin:14px 0}.quick-actions-editor{display:flex;flex-direction:column;gap:8px}.quick-action-editor-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--line);border-radius:10px;padding:10px 11px;background:#10141a}.quick-action-editor-buttons{display:flex;gap:6px;flex:0 0 auto}
@media(max-width:700px){.quick-actions-settings-top{grid-template-columns:1fr}.quick-action-editor-row{align-items:flex-start;flex-direction:column}.quick-action-editor-buttons{align-self:flex-end}}

/* V74: Quick Actions settings use the same dark form styling as other Control inputs. */
.quick-actions-settings-top select{
  background:#0d1014;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:9px;
  padding:10px 12px;
  font:inherit;
  color-scheme:dark;
}
.quick-actions-settings-top select option{
  background:#0d1014;
  color:var(--text);
}
.quick-actions-settings-top select:focus{
  outline:none;
  border-color:var(--accent);
}

.poll-correct-check{display:grid;place-items:center;width:28px;height:28px;margin:0;cursor:pointer}.poll-correct-check input{position:absolute;opacity:0;pointer-events:none}.poll-correct-check span{display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--line);border-radius:5px;background:#0d1014;color:transparent;font-weight:800;line-height:1}.poll-correct-check input:checked+span{background:#2f7d4c;border-color:#52a96f;color:#fff}.poll-correct-check input:disabled+span{opacity:.55;cursor:default}.poll-result-row{transition:opacity .25s ease}


/* V87 presenter notes */
.slide-notes-pencil{min-width:34px;padding-left:9px;padding-right:9px;font-size:17px;line-height:1}
.slide-notes-modal textarea.slide-notes-manager-textarea{display:block;width:100%;min-height:300px;resize:vertical;white-space:pre-wrap}
.slide-notes-modal-actions{margin-top:12px;justify-content:space-between;align-items:center}
.presenter-stage .presenter-topbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,700px) minmax(0,1fr);align-items:center;gap:20px}
.presenter-header-left{justify-self:start}
.presenter-header-right{justify-self:end;margin-left:0;display:flex;align-items:center;gap:16px;white-space:nowrap}
.presenter-clock{position:static;left:auto;top:auto;transform:none;font-size:30px;line-height:1;font-weight:300;letter-spacing:.03em;font-variant-numeric:tabular-nums;opacity:.56;white-space:nowrap;pointer-events:none}
.presenter-alert-header{justify-self:center;align-self:stretch;min-width:0;width:100%;display:flex;align-items:center;justify-content:center;text-align:center;overflow:hidden}
.presenter-alert-header.hidden{visibility:hidden;display:flex !important}
.presenter-alert-header .presenter-alert-message{max-width:100%;max-height:48px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:17px;line-height:1.3;font-weight:650;color:var(--text);white-space:pre-wrap}
.presenter-next-panel{height:100%;align-self:stretch}
.presenter-notes-head{margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;color:var(--muted);font-weight:700}
.presenter-notes-save-status{font-size:12px;font-weight:500;min-height:16px}
.presenter-notes-font-label{font-size:12px;font-weight:600;color:var(--muted);margin-left:2px}
.presenter-notes{flex:1 1 auto;min-height:100px;margin-top:7px;width:100%;resize:none;overflow:auto;background:#0d1014;color:var(--text);border:1px solid var(--line);border-radius:12px;padding:14px 15px;font:inherit;font-size:17px;line-height:1.45;white-space:pre-wrap}
.presenter-notes:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 28%,transparent)}
.presenter-notes:disabled{opacity:.55}

/* V88 Presenter: edge-to-edge bottom navigation + clearer presenter alert */
.presenter-stage-content{
  padding:22px 26px 0;
}
.presenter-stage-nav{
  margin:20px -26px 0;
  min-height:76px;
  padding:14px 26px;
  border-left:0;
  border-right:0;
  border-bottom:0;
  border-radius:0;
}
.presenter-alert-header{
  align-self:center;
  min-height:44px;
  padding:8px 14px;
  border:1px solid color-mix(in srgb,var(--accent) 42%,var(--line));
  border-radius:11px;
  background:color-mix(in srgb,var(--accent) 13%,var(--panel));
  box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 8%,transparent),0 4px 18px rgba(0,0,0,.16);
}
.presenter-alert-header .presenter-alert-message{
  font-weight:700;
  color:var(--text);
}

.slide-replace-modal-actions{margin-top:14px;justify-content:space-between;align-items:center}
.slide-replace-modal input[type=file]{display:block;width:100%;margin-top:6px}


/* V92 Presenter notes font-size controls */
.presenter-notes-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0}
.presenter-notes-size-btn{width:28px;height:28px;min-width:28px;padding:0;border:1px solid var(--line);border-radius:50%;background:#0d1014;color:var(--text);font-family:inherit;font-size:19px;font-weight:700;line-height:1;display:grid;place-items:center;cursor:pointer}
.presenter-notes-size-btn:hover:not(:disabled){border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,#0d1014)}
.presenter-notes-size-btn:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 55%,transparent);outline-offset:2px}
.presenter-notes-size-btn:disabled{opacity:.3;cursor:default}

/* Unified operator timer / 10-second start cue */
.lightweight-countdown.lightweight-start-cue .lightweight-countdown-time{
  font-size:34px;
  font-weight:850;
}
.presenter-light-countdown .lightweight-countdown.lightweight-start-cue .lightweight-countdown-time{
  font-size:40px;
}
@media(max-width:600px){
  .lightweight-countdown.lightweight-start-cue .lightweight-countdown-time{font-size:30px;}
}


/* V99: blocking disconnect state for operator screens only (Presenter / Moderator / Control). */
.operator-disconnect-overlay{
  position:fixed;
  inset:0;
  z-index:2147483000;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  border:5px solid #ff3b3b;
  background:rgba(7,9,12,.88);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  color:#f7f8fa;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  text-align:center;
  pointer-events:auto;
}
.operator-disconnect-overlay.hidden{display:none}
.operator-disconnect-message{width:min(520px,100%)}
.operator-disconnect-icon{
  display:flex;align-items:center;justify-content:center;
  width:54px;height:54px;margin:0 auto 18px;border-radius:50%;
  background:#ff3b3b;color:#fff;font-size:34px;font-weight:900;line-height:1;
  box-shadow:0 0 28px rgba(255,59,59,.28);
}
.operator-disconnect-message h1{margin:0 0 8px;font-size:34px;line-height:1.1}
.operator-disconnect-message p{margin:0 0 22px;color:#c9d0d8;font-size:17px}
.operator-disconnect-refresh{min-width:140px}

/* V107 questions-only pre-webinar poster.
   Watch + Questions mode remains unchanged; this only overrides the questions layout
   while a configured poster is being shown before the webinar reaches live state. */
.audience-body[data-audience-mode="questions"].questions-prelive-poster .watch-video-card{
  display:block !important;
  width:min(680px,100%);
  max-width:680px;
  margin:0 auto 12px;
  box-sizing:border-box;
}
.audience-body[data-audience-mode="questions"].questions-prelive-poster .watch-player,
.audience-body[data-audience-mode="questions"].questions-prelive-poster .watch-video-shield,
.audience-body[data-audience-mode="questions"].questions-prelive-poster .watch-custom-controls{
  display:none !important;
}
@media(max-width:600px){
  .audience-body[data-audience-mode="questions"].questions-prelive-poster .watch-video-card{
    width:100%;
    max-width:none;
    margin:0 0 4px;
  }
}

/* V109 Audience mobile input stability / iOS Safari focus zoom
   Keep deliberate pinch zoom available, but avoid Safari's automatic zoom
   when focusing form controls and reduce accidental double-tap zoom. */
.audience-body[data-audience-page="connect"]{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
.audience-body[data-audience-page="connect"] #profileName,
.audience-body[data-audience-page="connect"] #audienceQuestion{
  font-size:16px;
}
.audience-body[data-audience-page="connect"] button,
.audience-body[data-audience-page="connect"] input,
.audience-body[data-audience-page="connect"] textarea{
  touch-action:manipulation;
}

/* Manager page internal subtabs */
.manage-subtabs { margin-bottom:14px; }
.manage-subpanel { display:none; }
.manage-subpanel.active { display:block; }

/* V113 Poll manager: collapsible per-poll editors */
.poll-editor-card{padding:0;overflow:hidden}
.poll-editor-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 14px;cursor:pointer;user-select:none}
.poll-editor-summary:hover{background:rgba(255,255,255,.025)}
.poll-editor-summary-main{min-width:0;display:flex;flex-direction:column;gap:4px}
.poll-editor-summary-main h3{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.poll-editor-summary-meta{display:flex;flex-wrap:wrap;align-items:center;gap:7px 12px;font-size:12px;color:var(--muted)}
.poll-editor-summary-meta>span:not(.poll-unsaved)+span:not(.poll-unsaved)::before{content:'·';margin-right:12px;color:var(--muted)}
.poll-unsaved{display:inline-flex;align-items:center;border:1px solid color-mix(in srgb,var(--accent) 60%,var(--line));border-radius:999px;padding:2px 7px;color:var(--text);background:color-mix(in srgb,var(--accent) 14%,transparent);font-weight:700}
.poll-order-controls{flex:0 0 auto;margin:0}
.poll-order-controls .btn{min-width:34px}
.poll-expand-button{font-size:16px}
.poll-editor-body{border-top:1px solid var(--line);padding:14px}
.poll-delete-button{margin-left:auto}
.poll-editor-card.expanded{border-color:color-mix(in srgb,var(--accent) 38%,var(--line))}
@supports not (color:color-mix(in srgb,red 10%,black)){
  .poll-unsaved{border-color:var(--accent);background:#202035}
  .poll-editor-card.expanded{border-color:var(--accent)}
}
@media(max-width:600px){
  .poll-editor-summary{align-items:flex-start;gap:10px}
  .poll-editor-summary-meta{gap:5px 9px}
  .poll-editor-summary-meta>span:not(.poll-unsaved)+span:not(.poll-unsaved)::before{margin-right:9px}
  .poll-editor-footer{align-items:stretch}
  .poll-delete-button{margin-left:0}
}

/* V115 Audience reaction ribbon */
.audience-reaction-ribbon{
  position:fixed;left:50%;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);
  z-index:1200;display:flex;align-items:stretch;justify-content:center;gap:7px;
  width:min(620px,calc(100vw - 20px));padding:7px;
  border:1px solid var(--line);border-radius:16px;background:rgba(20,24,30,.96);
  box-shadow:0 10px 32px rgba(0,0,0,.28);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
}
.audience-reaction-ribbon.hidden{display:none}
.audience-body.has-reaction-ribbon .audience-shell{padding-bottom:94px}
.audience-reaction-button{
  flex:1 1 0;min-width:0;border:0;border-radius:11px;padding:7px 5px 6px;background:transparent;color:var(--text);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;
  touch-action:manipulation;transition:background .14s ease,opacity .14s ease,transform .14s ease;
}
.audience-reaction-button:hover{background:rgba(255,255,255,.06)}
.audience-reaction-button:disabled{cursor:default;opacity:.48}
.audience-reaction-emoji{font-size:24px;line-height:1.1}
.audience-reaction-label{font-size:11px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.audience-reaction-button.pulse{animation:audienceReactionPulse .55s ease-out}
@keyframes audienceReactionPulse{0%{transform:scale(1);background:transparent}32%{transform:scale(1.16);background:rgba(255,255,255,.15)}100%{transform:scale(1);background:transparent}}
@media(max-width:600px){
  .audience-reaction-ribbon{bottom:max(6px,env(safe-area-inset-bottom));width:calc(100vw - 12px);gap:2px;padding:5px;border-radius:14px}
  .audience-reaction-button{padding:6px 2px 5px}
  .audience-reaction-emoji{font-size:23px}
  .audience-reaction-label{font-size:10px}
  .audience-body.has-reaction-ribbon .audience-shell{padding-bottom:88px}
}

/* V115 Manager reaction settings */
.settings-editor-card.reactions-mode .screen-editor-layout{grid-template-columns:minmax(0,1fr) minmax(340px,.65fr)}
.reaction-settings-preview{min-height:220px;display:flex;flex-direction:column;justify-content:center;gap:18px;padding:24px}
.reaction-preview-ribbon{display:flex;gap:7px;padding:8px;border:1px solid var(--line);border-radius:15px;background:#15191f}
.reaction-preview-ribbon button{flex:1;border:0;border-radius:10px;background:transparent;color:var(--text);padding:8px 4px;display:flex;flex-direction:column;align-items:center;gap:3px}
.reaction-preview-ribbon button span{font-size:25px}.reaction-preview-ribbon button small{font-size:10px;color:var(--muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reaction-settings-list{display:flex;flex-direction:column;gap:8px}
.reaction-settings-row{display:grid;grid-template-columns:54px minmax(0,1fr) 42px 34px 34px 34px;gap:6px;align-items:center}
.reaction-settings-row input{min-width:0}.reaction-settings-row .reaction-color-input{width:42px;height:36px;padding:2px;cursor:pointer}
.reaction-emoji-input{text-align:center;font-size:21px;padding-left:4px!important;padding-right:4px!important}
@media(max-width:700px){.settings-editor-card.reactions-mode .screen-editor-layout{grid-template-columns:1fr}.reaction-settings-row{grid-template-columns:48px minmax(0,1fr) 40px 34px 34px 34px}}
/* Moderator identities and private audience answers */
.moderator-identity-button{white-space:nowrap}
.audience-question-filters{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px}
.audience-question-filters .active{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:700;box-shadow:none}
.audience-filter-count{font-weight:400}
.audience-filter-count.nonzero{font-weight:800}
.audience-question-meta-line{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:5px}
.audience-question-meta-line .audience-question-meta{margin-bottom:0}
.audience-question-tags{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap;margin:0}
.audience-question-meta-line .audience-status{min-height:20px;padding:1px 6px;border-radius:6px;font-size:9px;line-height:1.2;letter-spacing:.035em}
.audience-list-actions{align-items:flex-start}
.audience-question-item .btn.list-action{padding:4px 7px;font-size:12px;border-radius:7px;line-height:1.2}
.audience-status.answered-private{background:rgba(46,160,90,.16);color:#8fe0aa;border:1px solid rgba(46,160,90,.34)}
.moderator-answer-preview{margin-top:9px;padding:9px 10px;border-left:3px solid #2ea05a;background:rgba(46,160,90,.08);border-radius:6px;font-size:13px;line-height:1.4}
.moderator-answer-preview strong{display:block;margin-bottom:3px}.moderator-answer-preview span{display:block;color:var(--muted);font-size:11px;margin-top:4px}
.answer-question-preview{padding:10px 12px;margin-bottom:12px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.03);font-weight:600}
.audience-history-item{display:block;cursor:default;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}
.audience-history-item.has-answer,.audience-history-item.needs-clarification,.audience-history-item:has(.audience-answer-body){cursor:pointer}
.audience-history-item.has-answer{border-color:color-mix(in srgb,var(--accent) 72%,transparent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent)}
.audience-history-main{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;align-items:start;width:100%}
.audience-history-question{min-width:0}.audience-history-time{grid-column:2;grid-row:1;color:var(--muted);font-size:11px;white-space:nowrap}
.audience-answer-badge{grid-column:1;width:max-content;padding:3px 7px;border-radius:999px;font-size:9px!important;font-weight:800;text-transform:uppercase;letter-spacing:.055em;color:#d9ffe6!important;background:rgba(46,160,90,.18);border:1px solid rgba(46,160,90,.42)}
.clarification-requested-badge{color:#fff4cf!important;background:rgba(180,132,22,.22);border-color:rgba(210,157,35,.5)}
.new-response-badge{color:#fff!important;background:var(--accent);border-color:var(--accent)}
.audience-answer-body{
  display:grid;
  grid-template-rows:0fr;
  opacity:0;
  margin-top:0;
  padding-top:0;
  border-top:0 solid var(--line);
  line-height:1.45;
  transition:
    grid-template-rows .22s ease-out,
    opacity .16s ease-out,
    margin-top .22s ease-out,
    padding-top .22s ease-out,
    border-top-width .22s ease-out
}
.audience-answer-inner{
  min-height:0;
  overflow:hidden
}
.audience-history-item.answer-open .audience-answer-body{
  grid-template-rows:1fr;
  opacity:1;
  margin-top:10px;
  padding-top:10px;
  border-top-width:1px
}
.audience-answer-body strong{display:block;margin-bottom:4px}.audience-answer-body span{display:block!important;margin-top:6px;color:var(--muted)!important;font-size:11px!important}
@keyframes audience-new-response-pulse{0%{box-shadow:0 0 0 0 rgba(55,124,199,.05)}28%{box-shadow:0 0 0 4px rgba(55,124,199,.24),0 0 24px rgba(55,124,199,.34);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,#10141a)}100%{box-shadow:0 0 0 0 rgba(55,124,199,0)}}
.audience-history-item.new-response-attention{animation:audience-new-response-pulse 1.15s ease-out 1}
@media(prefers-reduced-motion:reduce){.audience-answer-body{transition:none}.audience-history-item.new-response-attention{animation:none;border-color:var(--accent)}}

/* Moderator viewport layout: keep queue controls stationary and scroll only questions. */
body:has(.moderator-workspace){height:100dvh;min-height:100dvh;overflow:hidden;display:flex;flex-direction:column}
body:has(.moderator-workspace) > .topbar,
body:has(.moderator-workspace) > .moderator-top-countdown{flex:0 0 auto}
body:has(.moderator-workspace) > .app{flex:1 1 auto;min-height:0;width:100%}
.moderator-workspace{height:100%;min-height:0;align-items:stretch;overflow:hidden}
.moderator-left-column{min-height:0;align-content:start;grid-auto-rows:max-content}
.moderator-questions-card{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.moderator-question-tabs{flex:0 0 auto}
#curatedQuestionsPanel,#audienceQuestionsPanel{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden}
#curatedQuestionsPanel.hidden,#audienceQuestionsPanel.hidden{display:none!important}
.moderator-list-tools,.audience-question-filters{flex:0 0 auto}
.moderator-questions-card .question-list,.audience-question-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
.moderator-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center}
.moderator-topbar .moderator-header-copy{justify-self:start}
.moderator-topbar .moderator-top-actions{justify-self:center;margin-left:0}
.moderator-logout-button{justify-self:end;min-width:38px;font-size:20px;line-height:1;font-weight:800;padding-left:11px;padding-right:11px}
.moderator-logout-button.danger{background:#7b2630;border-color:#a33845;color:#fff}
.moderator-logout-button.danger:hover{background:#96313d;border-color:#bd4653}
.moderator-logout-modal{max-width:480px}

/* Manage link access controls. */
.link-access-label{display:flex!important;align-items:center;gap:8px;min-width:0;cursor:pointer}
.link-row .link-access-label input[type=checkbox]{width:auto;height:auto;margin:0;padding:0;flex:0 0 auto;accent-color:var(--accent)}
.link-access-label span{min-width:0}
.links-save-row{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}

@media(max-width:600px){
  body:has(.moderator-workspace) > .app{display:flex;flex-direction:column}
  .moderator-workspace{display:flex;flex:1 1 auto;flex-direction:column;min-height:0}
  .moderator-left-column{display:block;flex:0 0 auto}
  .moderator-questions-card{flex:1 1 auto;min-height:0}
}

/* Moderator group chat + presenter alert attention state. */
.moderator-chat-toggle.active{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
}
@keyframes moderator-alert-glow{
  0%,100%{box-shadow:0 0 0 0 rgba(123,97,255,.18),0 0 7px rgba(123,97,255,.28)}
  50%{box-shadow:0 0 0 4px rgba(123,97,255,.10),0 0 18px rgba(123,97,255,.72)}
}
.presenter-alert-toggle.active{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
  animation:moderator-alert-glow 2.4s ease-in-out infinite;
}
.presenter-alert-toggle:disabled{animation:none}

.moderator-workspace.chat-open{
  max-width:none;
  grid-template-columns:minmax(270px,.78fr) minmax(420px,1.42fr) minmax(300px,360px);
}
.moderator-chat-panel{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:0;
}
.moderator-chat-head{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 14px 11px;
  border-bottom:1px solid var(--line);
}
.moderator-chat-close{min-width:34px;font-size:20px;line-height:1}
.moderator-chat-messages{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.moderator-chat-empty{margin:auto;text-align:center;padding:20px}
.moderator-chat-row{display:flex;justify-content:flex-start}
.moderator-chat-row.own{justify-content:flex-end}
.moderator-chat-bubble{
  max-width:88%;
  min-width:120px;
  padding:9px 11px 10px;
  border:1px solid var(--line);
  border-radius:12px 12px 12px 4px;
  background:rgba(255,255,255,.045);
}
.moderator-chat-row.own .moderator-chat-bubble{
  border-radius:12px 12px 4px 12px;
  background:rgba(123,97,255,.16);
  border-color:rgba(123,97,255,.38);
}
.moderator-chat-meta{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:4px;font-size:11px;color:var(--muted)}
.moderator-chat-meta strong{color:var(--text);font-size:12px}
.moderator-chat-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.38}
.moderator-chat-composer{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:11px 12px 12px;
  border-top:1px solid var(--line);
}
.moderator-chat-composer textarea{min-height:44px;max-height:130px;resize:vertical;margin:0}
.moderator-chat-composer .btn{height:44px}

@media(max-width:900px){
  .moderator-workspace.chat-open{max-width:none;grid-template-columns:1fr}
  .moderator-chat-panel{
    position:fixed;
    inset:0;
    z-index:1400;
    width:100vw;
    height:100dvh;
    max-height:none;
    border-radius:0;
    border:0;
    margin:0;
    background:var(--panel);
  }
  .moderator-chat-head{padding-top:max(14px,env(safe-area-inset-top));}
  .moderator-chat-composer{padding-bottom:max(12px,env(safe-area-inset-bottom));}
}

@media(prefers-reduced-motion:reduce){.presenter-alert-toggle.active{animation:none;box-shadow:0 0 0 2px rgba(123,97,255,.35)}}
@media(max-width:600px){
  body:has(.moderator-workspace) > .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 8px;align-items:center}
  body:has(.moderator-workspace) > .topbar .moderator-header-copy{grid-column:1 / -1;width:100%;max-width:none}
  .moderator-top-actions{grid-column:1;width:100%;margin-left:0;justify-content:flex-start;flex-wrap:wrap}
  .moderator-logout-button{grid-column:2;grid-row:2;justify-self:end;align-self:start}
}


.audience-status.answering{background:rgba(74,144,226,.14);color:#9bc8ff;border:1px solid rgba(74,144,226,.35)}
.audience-list-actions .btn:disabled{opacity:.45;cursor:not-allowed}


/* Curated live-question selector: the eye column is the only live/offline control. */
.moderator-questions-card .question{
  display:grid;
  grid-template-columns:20px 30px minmax(0,1fr) auto;
  align-items:start;
  column-gap:10px;
}
.moderator-questions-card .question-main{
  cursor:default;
  min-width:0;
}
.question-live-selector{
  width:30px;
  height:30px;
  padding:5px;
  margin:0;
  border:0;
  border-radius:7px;
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:.32;
  transition:opacity .15s ease,background .15s ease,transform .15s ease;
}
.question-live-selector img{
  display:block;
  width:21px;
  height:21px;
  object-fit:contain;
  pointer-events:none;
}
.question-live-selector:hover,
.question-live-selector:focus-visible{
  opacity:.72;
  background:rgba(255,255,255,.07);
}
.question-live-selector.active{
  opacity:1;
  background:rgba(255,255,255,.10);
}
.question-live-selector:active{transform:scale(.94)}
@media(max-width:600px){
  .moderator-questions-card .question{
    grid-template-columns:20px 30px minmax(0,1fr) auto;
    column-gap:6px;
  }
  .moderator-questions-card .question-actions{
    grid-column:auto;
    grid-row:auto;
    align-self:start;
    justify-content:flex-end;
  }
}


/* Shared SVG pencil icon for edit actions. */
.button-pencil-icon{
  display:block;
  width:16px;
  height:16px;
  object-fit:contain;
  pointer-events:none;
  opacity:.9;
}
.btn:hover .button-pencil-icon,
.btn:focus-visible .button-pencil-icon{
  opacity:1;
}

/* Moderator chat send icon button */
.moderator-chat-send-button{
  flex:0 0 auto;
  width:44px;
  height:44px;
  min-width:44px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.moderator-chat-send-icon{
  display:block;
  width:20px;
  height:20px;
  object-fit:contain;
  pointer-events:none;
}

/* Moderator action icons: pause, done/undo and logout. */
.icon-only-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
}
.question-actions .icon-only-action,
.audience-list-actions .icon-only-action{
  width:34px;
  height:34px;
  min-width:34px;
}
.moderator-logout-button.icon-only-action{
  width:38px;
  height:38px;
  min-width:38px;
}
.moderator-action-icon{
  display:block;
  width:17px;
  height:17px;
  object-fit:contain;
  pointer-events:none;
  opacity:.9;
}
.moderator-exit-icon{
  width:19px;
  height:19px;
}
.icon-only-action:hover .moderator-action-icon,
.icon-only-action:focus-visible .moderator-action-icon,
.icon-only-action.active .moderator-action-icon{
  opacity:1;
}


/* Audience handling workflow */
.question-handle-modal{width:min(600px,calc(100vw - 32px));}
.question-handle-modal textarea{resize:vertical;min-height:150px;}
.question-handle-divider{display:flex;align-items:center;gap:12px;margin:16px 0;color:var(--muted);font-size:12px;font-weight:700;letter-spacing:.08em;}
.question-handle-divider::before,.question-handle-divider::after{content:"";height:1px;flex:1;background:var(--line);}
.question-handle-disposition-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.audience-handle-button{min-width:78px;}

/* Shared square geometry for every icon-only control used here. */
.icon-only-action,
.question-edit-button,
.presenter-alert-edit,
.moderator-chat-send-button,
.question-live-selector{
  width:38px !important;
  height:38px !important;
  min-width:38px !important;
  min-height:38px !important;
  padding:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}
.icon-only-action img,.question-edit-button img,.presenter-alert-edit img,.moderator-chat-send-button img,.question-live-selector img{margin:auto;}
@media(max-width:600px){.question-handle-disposition-actions{grid-template-columns:1fr;}}


/* Presenter questions workspace */
.presenter-next-panel{
  position:relative;
}
.presenter-questions-overlay{
  position:absolute;
  inset:0;
  z-index:30;
  padding:0px;
  background:rgba(5,8,12,.58);
  display:flex;
  align-items:stretch;
  justify-content:stretch;
}
.presenter-questions-overlay.hidden{display:none}
.presenter-questions-workspace {
  min-width: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 16px 45px rgba(0,0,0,.35);
}
.presenter-questions-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--accent);
  background: var(--accent);
}
.presenter-questions-head h2{margin:0;font-size:19px}
.presenter-questions-list{
  min-height:0;
  flex:1 1 auto;
  overflow:auto;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.presenter-question-row{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 38px;
  align-items:start;
  gap:8px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:11px;
  background:color-mix(in srgb,var(--panel) 88%,#000);
}
.presenter-question-row.live{
  border-color:color-mix(in srgb,var(--accent) 70%,var(--line));
  background:color-mix(in srgb,var(--accent) 12%,var(--panel));
}
.presenter-question-row.completed{
  opacity:.38;
}
.presenter-question-text{
  min-width:0;
  padding:7px 4px;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  font:inherit;
  font-size:var(--presenter-reading-font-size,16px);
  line-height:1.35;
  cursor:pointer;
}
.presenter-question-text:disabled{cursor:default;color:inherit}
.presenter-question-icon-button{
  width:38px;
  height:38px;
  min-width:38px;
  min-height:38px;
  padding:0;
  border:1px solid var(--line);
  border-radius:8px;
  background:#171c23;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.presenter-question-icon-button img{
  display:block;
  width:18px;
  height:18px;
  object-fit:contain;
  margin:auto;
  pointer-events:none;
}
.presenter-question-eye{opacity:.72}
.presenter-question-eye.active{opacity:1;background:color-mix(in srgb,var(--accent) 34%,#171c23);border-color:var(--accent)}
.presenter-question-reopen:hover{background:color-mix(in srgb,#2f7d4c 50%,#171c23)}
.presenter-question-skip{font-size:22px;line-height:1}
.presenter-question-skip:hover{background:#7b2630;border-color:#a33845}
.presenter-question-icon-button:disabled{cursor:default}
.presenter-question-action-spacer{width:38px;height:38px;display:block}
.presenter-question-row.completed .presenter-question-text{cursor:default}
.question-live-selector-placeholder{width:38px;height:38px;display:block}
.presenter-questions-empty{padding:28px 14px;text-align:center}


/* Shared broadcast-question queue ordering */
.question-reorder-status{min-height:18px;color:var(--muted);font-size:12px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.question-drag-handle,.presenter-question-drag-handle{
  width:38px;height:38px;min-width:38px;min-height:38px;padding:0;border:0;border-radius:8px;background:transparent;display:grid;grid-template-columns:repeat(2,4px);grid-template-rows:repeat(3,4px);gap:3px;place-content:center;cursor:grab;opacity:.42;user-select:none;touch-action:none;
}
.question-drag-handle>span,.presenter-question-drag-handle>span{width:4px;height:4px;border-radius:50%;background:currentColor}
.question-drag-handle:hover,.presenter-question-drag-handle:hover{opacity:.8;background:rgba(255,255,255,.06)}
.question-drag-handle:active,.presenter-question-drag-handle:active{cursor:grabbing}
.question-drag-handle.disabled,.presenter-question-drag-handle.disabled{opacity:.16;cursor:not-allowed}
.question.dragging,.presenter-question-row.dragging{
  visibility:hidden !important;
}
.question.drag-placeholder,.presenter-question-row.drag-placeholder{
  visibility:hidden !important;
}
.question-drag-ghost{
  position:fixed !important;
  z-index:99999 !important;
  visibility:visible !important;
  opacity:.96 !important;
  pointer-events:none !important;
  transform:none !important;
  margin:0 !important;
  box-sizing:border-box !important;
  box-shadow:0 18px 42px rgba(0,0,0,.42),0 3px 10px rgba(0,0,0,.28) !important;
  border-color:color-mix(in srgb,var(--accent) 55%,var(--line)) !important;
}
.question-drag-proxy{
  will-change:left,top;
}
.presenter-question-drag-ghost{
  display:grid !important;
}
.presenter-questions-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border-bottom:1px solid var(--line)}
.presenter-show-answered{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px;white-space:nowrap}
.presenter-question-row.completed{opacity:.5}
.presenter-question-row.completed.live{opacity:.72}
.presenter-question-answered-tag{display:inline-flex;margin-left:8px;padding:2px 6px;border:1px solid var(--line);border-radius:6px;color:var(--muted);font-size:10px;font-weight:700;text-transform:uppercase;vertical-align:middle}

.answer-clarification-preview,.prepare-live-context{margin:10px 0;padding:12px;border:1px solid #39424d;border-radius:10px;background:#11161c}
.answer-clarification-preview strong,.prepare-live-context strong{display:block;margin-bottom:6px}
.clarification-preview{margin-top:8px}
.audience-clarification-box,.audience-clarification-existing{margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.12)}
.audience-clarification-box textarea{width:100%;min-height:92px;margin:10px 0;resize:vertical}

.question-thread{display:grid;gap:10px;margin-bottom:12px}
.question-thread-block{padding:12px;border:1px solid #39424d;border-radius:10px;background:#11161c}
.question-thread-block strong{display:block;margin-bottom:6px}
.audience-thread-block{
  position:relative;
  width:95%;
  box-sizing:border-box;
  margin-top:10px;
  padding:10px 12px;
  border-radius:9px;
}
.audience-thread-block.moderator{
  margin-right:auto;
  margin-left:0;
  background:color-mix(in srgb,var(--accent) 28%,#11161c);
  border-bottom-left-radius:0;
}
.audience-thread-block.participant{
  margin-left:auto;
  margin-right:0;
  background:rgba(255,255,255,.095);
  border-bottom-right-radius:0;
}
.audience-thread-block strong{display:block;margin-bottom:5px}
.audience-question-summary.has-thread{cursor:pointer;border-radius:7px}
.audience-question-summary.has-thread:hover{background:rgba(255,255,255,.025)}
.audience-question-summary.has-thread:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.audience-question-thread-content:empty{display:none}
.moderator-thread-list-block{position:relative}

/* V160 unified button text + accent */
button,
.btn,
a.btn{
  color:#fff !important;
}

/* V167 audience expanded-question focus */
.audience-history{
  gap:11px;
}
.audience-history-item{
  transition:
    opacity .18s ease,
    border-width .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}
.audience-history-item.answer-open{
  border-width:1px;
  border-color:color-mix(in srgb,var(--accent) 92%,white 8%);
  box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 34%,transparent);
  opacity:1;
}
.audience-history.has-open-question .audience-history-item:not(.answer-open){
  opacity:.50;
}
.audience-history.has-open-question .audience-history-item:not(.answer-open):hover{
  opacity:.78;
}
@media(prefers-reduced-motion:reduce){
  .audience-history-item{transition:none}
}


/* V182: participant question download */
.question-download-config-grid{display:grid;grid-template-columns:minmax(140px,220px) minmax(160px,220px);gap:12px;margin-top:16px;}
.question-download-config-grid label{display:flex;flex-direction:column;gap:6px;}
.question-download-logo-preview{min-height:92px;margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#0d1014;display:flex;align-items:center;overflow:hidden;}
.question-download-logo-preview[data-align="left"]{justify-content:flex-start;}.question-download-logo-preview[data-align="center"]{justify-content:center;}.question-download-logo-preview[data-align="right"]{justify-content:flex-end;}
.question-download-logo-preview img{display:block;max-width:100%;height:auto;}
.audience-question-download-wrap{margin:12px 0;}.audience-question-download-modal{width:min(440px,calc(100vw - 28px));}.audience-question-download-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px;}.audience-question-download-status{min-height:20px;margin-top:10px;}
@media(max-width:620px){.question-download-config-grid{grid-template-columns:1fr;}.audience-question-download-actions{grid-template-columns:1fr;}}


/* V184: shared PDF header preview */
.question-download-settings-section{margin-top:18px;}
.question-download-settings-section h3{margin:0 0 10px;}
.question-download-preview-label{margin-top:18px;margin-bottom:7px;font-weight:700;}
.question-download-paper-preview{
  display:block;
  min-height:170px;
  padding:22px;
  background:#fff;
  color:#111;
  border:1px solid #cfd3da;
  border-radius:6px;
}
.question-download-preview-header{position:relative;width:100%;min-height:40px;}
.question-download-preview-logo,.question-download-preview-title{position:absolute;display:block;max-width:100%;}
.question-download-preview-logo{height:auto;}
.question-download-preview-title{font-weight:700;line-height:1.08;color:#111;white-space:normal;max-width:92%;}
.question-download-preview-body{margin-top:22px;font-size:20px;color:#111;}


/* V185: audience question answer-status icons */
.audience-history-main{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:stretch;
  width:100%;
}
.audience-history-left{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;
}
.audience-history-question{min-width:0;width:100%;}
.audience-history-status{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:space-between;
  gap:7px;
  min-height:100%;
}
.audience-history-time{
  grid-column:auto;
  grid-row:auto;
  display:block;
  color:var(--muted);
  font-size:11px;
  white-space:nowrap;
}
.audience-answer-badge{
  grid-column:auto;
  width:max-content;
}
.audience-history-status-icons{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  min-height:18px;
  margin-top:auto;
}
.audience-history-status-icons img{
  display:block;
  width:24px;
  height:auto;
  object-fit:contain;
  flex:0 0 18px;
}

/* V187 moderator compact pause + direct live shortcut */
.audience-list-actions .participant-pause-button{
  width:30px !important;height:30px !important;min-width:30px !important;min-height:30px !important;
}
.audience-list-actions .participant-pause-button .moderator-action-icon{width:14px;height:14px;}
.audience-live-shortcut-button{white-space:nowrap;}

/* V190: Moderator broadcast-question controls mirror Presenter state flow.
   Drag remains Moderator-only; edit/reject are available only before showing. */
.question-reopen-selector{
  opacity:.72;
}
.question-reopen-selector:hover,
.question-reopen-selector:focus-visible{
  opacity:1;
  background:rgba(255,255,255,.10);
}
.question-reopen-selector img{
  width:18px;
  height:18px;
}

/* V192: finite 4-step audience question exchange indicator */
.audience-thread-head{
  display:block;
  margin-bottom:5px;
  padding-right:84px;
}
.audience-thread-head strong{
  margin-bottom:0;
}
.audience-exchange-progress{
  position:absolute;
  top:13px;
  right:12px;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:4px;
  height:7px;
  line-height:0;
  white-space:nowrap;
}
.audience-exchange-dot{
  display:block;
  flex:0 0 7px;
  width:7px;
  height:7px;
  border-radius:50%;
  border:1px solid color-mix(in srgb,var(--accent) 46%,#9aa4af);
  background:transparent;
  box-sizing:border-box;
}
.audience-exchange-dot.filled{
  border-color:color-mix(in srgb,var(--accent) 84%,white 16%);
  background:color-mix(in srgb,var(--accent) 84%,white 16%);
}


/* V199: safer moderator thread closing — one send action plus explicit close checkbox */
.question-handle-answer-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}
.question-close-conversation{
  margin:0;
  user-select:none;
}
.question-close-conversation input{
  margin:0 7px 0 0;
}
.question-handle-answer-actions > .controls{
  width:100%;
}


/* V204: presenter identity, activity, personal notes safety lock and shared note edit lock */
.presenter-current-panel{display:flex;flex-direction:column;min-width:0}
.presenter-activity-area{flex:0 0 48px;height:48px;margin-top:8px;box-sizing:border-box;padding:5px 12px;border-radius:8px;background:rgba(255,255,255,.025);color:color-mix(in srgb,var(--muted) 78%,transparent);font-size:12px;line-height:19px;text-align:center;overflow:hidden}
.presenter-activity-line{height:19px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:1;transition:opacity 1s ease}
.presenter-activity-line.empty,.presenter-activity-line.fading{opacity:0}
.presenter-activity-area.messages-hidden .presenter-activity-line{visibility:hidden}
.presenter-nav-toggles{display:flex;align-items:center;gap:8px}
.presenter-activity-toggle{width:46px;min-width:46px;padding:0!important;display:grid;place-items:center;transition:opacity .15s ease,border-color .15s ease}
.presenter-activity-toggle img{display:block;width:22px;height:auto}
.presenter-activity-toggle.active{background:var(--accent)!important;border-color:var(--accent)!important;opacity:1}
.presenter-activity-toggle.inactive{opacity:.45}
.presenter-notes-label-wrap{display:flex;align-items:center;gap:8px;min-width:0}
.presenter-notes-lock-toggle{width:26px;height:26px;min-width:26px;padding:3px;border:0;border-radius:6px;background:transparent;display:grid;place-items:center;cursor:pointer}
.presenter-notes-lock-toggle:hover{background:rgba(255,255,255,.06)}
.presenter-notes-lock-toggle img{display:block;max-width:18px;max-height:18px;width:auto;height:auto}
.presenter-notes-wrap{position:relative;flex:1 1 auto;min-height:100px;margin-top:7px}
.presenter-notes-wrap .presenter-notes{height:100%;min-height:100%;margin-top:0}
.presenter-notes[readonly]{cursor:default}
.presenter-notes-remote-lock{position:absolute;inset:0;z-index:3;border-radius:12px;background:rgba(7,9,12,.78);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);display:flex;align-items:flex-end;justify-content:flex-start;padding:12px 14px;box-sizing:border-box}
.presenter-notes-remote-lock-label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-style:italic}
.presenter-notes-remote-lock-label img{display:block;width:15px;height:auto}
.presenter-notes-remote-lock-label .btn{font-style:normal;margin-left:4px}
.presenter-identity-modal{max-width:460px}
.presenter-activity-control{display:grid;gap:7px;min-height:42px}
.presenter-activity-control-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:5px 0;border-bottom:1px solid rgba(255,255,255,.05)}
.presenter-activity-control-row:last-child{border-bottom:0}
.presenter-activity-control-row time{flex:0 0 auto;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
@media(max-width:900px){.presenter-nav-toggles{grid-column:1/-1;justify-self:end}}


/* V206: Presenter toggle parity + editable presenter identity in header */
.presenter-stage-nav .arrow-toggle.active{
  background:var(--accent)!important;
  border-color:var(--accent)!important;
  opacity:1;
}
.presenter-stage-nav .arrow-toggle.inactive{
  background:transparent!important;
  border-color:var(--line)!important;
  opacity:.45;
}
.presenter-brand-line{display:flex;align-items:center;white-space:nowrap}
.presenter-header-name-wrap{display:inline-flex;align-items:center}
.presenter-header-separator{white-space:pre}
.presenter-header-edit-name{
  width:22px;
  height:22px;
  margin-left:6px;
  padding:3px;
  border:0;
  border-radius:5px;
  background:transparent;
  display:inline-grid;
  place-items:center;
  cursor:pointer;
}
.presenter-header-edit-name:hover{background:rgba(255,255,255,.07)}
.presenter-header-edit-name:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 55%,transparent);outline-offset:2px}
.presenter-header-edit-name img{display:block;width:14px;height:14px;object-fit:contain}


/* V207: tiny Presenter identity logout beside the clock */
.presenter-header-right{display:flex;align-items:center;gap:9px}
.presenter-logout-button{
  width:28px;
  height:28px;
  min-width:28px;
  padding:5px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  display:grid;
  place-items:center;
  opacity:.58;
  cursor:pointer;
  transition:opacity .15s ease,background .15s ease,border-color .15s ease;
}
.presenter-logout-button:hover{
  opacity:1;
  background:rgba(255,255,255,.055);
  border-color:rgba(255,255,255,.08);
}
.presenter-logout-button:focus-visible{
  opacity:1;
  outline:2px solid color-mix(in srgb,var(--accent) 55%,transparent);
  outline-offset:2px;
}
.presenter-logout-button img{
  display:block;
  width:16px;
  height:auto;
}


/* V216: Presenter question list animations use the browser View Transition API.
   No measured/pinned heights are needed. Surviving rows move to their new
   positions automatically; removed rows fade/scale away as snapshots. */
:root{view-transition-name:none}
.presenter-questions-list{gap:0}
.presenter-question-row-wrap{
  box-sizing:border-box;
  margin-bottom:8px;
}
.presenter-question-row{box-sizing:border-box;margin-bottom:0}

::view-transition-group(*){
  animation-duration:.48s;
  animation-timing-function:cubic-bezier(.4,0,.2,1);
}
::view-transition-old(*){
  animation-duration:.34s;
  animation-timing-function:ease;
}
::view-transition-new(*){
  animation-duration:.48s;
  animation-timing-function:cubic-bezier(.4,0,.2,1);
}
@media (prefers-reduced-motion: reduce){
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*){animation-duration:0s!important}
}


/* V218: non-blocking Moderator/Presenter connection status.
   Control keeps the existing blocking disconnect overlay. */
.role-disconnect-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:4px 8px;
  border:1px solid rgba(255,92,92,.48);
  border-radius:7px;
  background:rgba(135,24,32,.78);
  color:#fff;
  font-size:12px;
  font-weight:750;
  line-height:1;
  white-space:nowrap;
}
.role-disconnect-badge.hidden{display:none!important}
.role-disconnect-badge img{
  display:block;
  width:14px;
  height:14px;
  object-fit:contain;
  opacity:.95;
}


/* V219 Moderator identity/header cleanup + stable disconnect placement */
.moderator-brand-line{display:flex;align-items:center;white-space:nowrap}
.moderator-header-name-wrap{display:inline-flex;align-items:center}
.moderator-header-separator{white-space:pre}
.moderator-header-edit-name{
  width:22px;height:22px;margin-left:6px;padding:3px;border:0;border-radius:5px;
  background:transparent;display:inline-grid;place-items:center;cursor:pointer;
}
.moderator-header-edit-name:hover{background:rgba(255,255,255,.07)}
.moderator-header-edit-name:focus-visible{
  outline:2px solid color-mix(in srgb,var(--accent) 55%,transparent);outline-offset:2px;
}
.moderator-header-edit-name img{display:block;width:14px;height:14px;object-fit:contain}
.moderator-chat-icon-toggle{
  width:46px;min-width:46px;height:38px;padding:0!important;display:grid;place-items:center;
}
.moderator-chat-icon-toggle img{display:block;width:22px;height:auto;pointer-events:none}
.moderator-header-right{justify-self:end;display:flex;align-items:center;gap:7px;min-width:0}
.moderator-header-right .moderator-logout-button{justify-self:auto}
.presenter-disconnect-badge{
  position:absolute;top:50%;right:calc(50% + 78px);transform:translateY(-50%);z-index:2;
}


/* V221: compact Moderator curated-question action controls */
.moderator-questions-card .question-edit-button,
.moderator-questions-card .question-actions .icon-only-action,
.moderator-questions-card .question-live-selector{
  width:30px !important;
  height:30px !important;
  min-width:30px !important;
  min-height:30px !important;
}


/* V222: compact Moderator curated-question drag handle */
.moderator-questions-card .question-drag-handle{
  width:30px !important;
  height:30px !important;
  min-width:30px !important;
  min-height:30px !important;
}


/* V225: separate Presenter Questions control and pure Presenter Alert */
.presenter-questions-toggle.active{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
  font-weight:700;
}
.presenter-header-center{
  position:relative;
  justify-self:center;
  align-self:stretch;
  min-width:0;
  width:100%;
  display:grid;
  place-items:center;
}
.presenter-header-center > *{grid-area:1 / 1}
.presenter-questions-header-button{
  min-height:44px;
  min-width:150px;
  padding:8px 18px;
  border:1px solid var(--accent);
  border-radius:11px;
  background:var(--accent);
  color:#fff;
  font:inherit;
  font-size:17px;
  line-height:1.2;
  font-weight:800;
  box-shadow:0 4px 18px rgba(0,0,0,.16);
  cursor:pointer;
  z-index:1;
}
.presenter-questions-header-button:hover{
  filter:brightness(1.08);
}
.presenter-questions-header-button:focus-visible{
  outline:2px solid #fff;
  outline-offset:2px;
}
.presenter-header-center .presenter-alert-header{
  z-index:2;
}
.presenter-alert-modal textarea#presenterAlertText{
  min-height:0;
  height:auto;
  resize:none;
}


/* V226: Questions control belongs with the Moderator question queue */
.moderator-list-tools{
  align-items:center;
}
.moderator-list-questions-button{
  flex:0 0 auto;
  min-height:32px;
  padding:6px 12px;
  font-weight:700;
}
.moderator-list-tools .moderator-hide-done{
  margin-left:auto;
}


/* V227: Presenter Alert is edited from its main button; eye controls visibility */
.presenter-alert-visibility{
  flex:0 0 auto;
}
.presenter-alert-visibility.active{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
}
.presenter-alert-visibility img{
  width:18px;
  height:18px;
  display:block;
}
.presenter-alert-modal-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:14px;
}
.presenter-alert-modal-left{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.presenter-alert-send{
  margin-left:auto;
  white-space:nowrap;
}
@media(max-width:600px){
  .presenter-alert-modal-footer{
    align-items:stretch;
    flex-direction:column;
  }
  .presenter-alert-modal-left{
    flex-wrap:wrap;
  }
  .presenter-alert-send{
    width:100%;
    margin-left:0;
  }
}


/* V228: fixed Presenter Alert countdown slot, to the right of the eye */
.presenter-alert-countdown{
  width:48px;
  min-width:48px;
  flex:0 0 48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 4px;
  border-radius:7px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
  line-height:1;
  font-variant-numeric:tabular-nums;
  visibility:hidden;
}
.presenter-alert-countdown.active{
  visibility:visible;
  color:var(--text);
}


/* V231: remembered one-shot auto-open preference for Presenter Questions */
.moderator-question-push-controls{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.moderator-auto-open-questions{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:0;
  color:var(--muted);
  font-size:13px;
  white-space:nowrap;
  cursor:pointer;
}
.moderator-auto-open-questions input{
  margin:0;
}
@media(max-width:600px){
  .moderator-question-push-controls{
    gap:7px;
  }
  .moderator-auto-open-questions{
    font-size:12px;
  }
}


/* V232: keep Show answered inline with the Presenter Questions title */
.presenter-questions-head-left{
  min-width:0;
  display:flex;
  align-items:center;
  gap:18px;
}
.presenter-show-answered-inline{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0;
  color:white;
  font-size:13px;
  font-weight:400;
  white-space:nowrap;
}
.presenter-show-answered-inline input{
  margin:0;
}


/* V238: unanswered-question counter inside Presenter Questions button */
.presenter-questions-header-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
}
.presenter-questions-header-count{
  width:24px;
  height:24px;
  min-width:24px;
  flex:0 0 24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#fff;
  color:var(--accent);
  font-size:13px;
  font-weight:800;
  line-height:1;
  font-variant-numeric:tabular-nums;
}


/* V239: Presenter alert pop-in / shrink-out animation */
.presenter-alert-header.presenter-alert-in{
  animation:presenter-alert-in 420ms both;
  transform-origin:center center;
}
.presenter-alert-header.presenter-alert-out{
  animation:presenter-alert-out 220ms both;
  transform-origin:center center;
  pointer-events:none;
}
@keyframes presenter-alert-in{
  0%{transform:scale(.76);opacity:0}
  58%{transform:scale(1.07);opacity:1}
  78%{transform:scale(.985);opacity:1}
  100%{transform:scale(1);opacity:1}
}
@keyframes presenter-alert-out{
  0%{transform:scale(1);opacity:1}
  100%{transform:scale(.68);opacity:0}
}
@media (prefers-reduced-motion:reduce){
  .presenter-alert-header.presenter-alert-in,
  .presenter-alert-header.presenter-alert-out{
    animation-duration:1ms;
  }
}


/* V241: Presenter slide counter with return-to-start control */
.presenter-counter-wrap{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.presenter-stage-nav .presenter-counter-wrap .presenter-counter{
  min-width:130px;
}
.presenter-restart-button{
  width:34px;
  height:34px;
  min-width:34px;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:.78;
}
.presenter-restart-button:hover{opacity:1;background:rgba(255,255,255,.08)}
.presenter-restart-button:disabled{opacity:.28;cursor:default;background:transparent}
.presenter-restart-button img{
  width:20px;
  height:20px;
  display:block;
  object-fit:contain;
}


/* V243: shared direct-file and PDF slide import */
.slide-upload-source-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.slide-upload-source{min-width:0;padding:14px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.018)}
.slide-upload-source h3{margin:0 0 12px}
.slide-upload-status{min-height:20px;margin-top:8px}
.slide-upload-replace{margin:14px 0 0}
.pdf-import-options{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;margin-bottom:12px}
.pdf-import-options label{min-width:0}
.pdf-quality-control{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px}
.pdf-quality-control input[type="range"]{grid-column:1/-1;width:100%}
.pdf-quality-control.disabled{opacity:.45}
@media(max-width:760px){.slide-upload-source-grid{grid-template-columns:1fr}}


/* V244: compact, modular Control layout */
.control-page .app{
  padding-top:0;
}
.control-page .control-top-actions{
  gap:7px;
}
.control-layout-button{
  width:42px;
  min-width:42px;
  padding-left:0;
  padding-right:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
}
.control-modules{
  display:flex;
  flex-direction:column;
  gap:0;
}
.control-module{
  height:auto;
  margin:0!important;
  border-radius:0!important;
  border-left:1px solid var(--line);
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  border-top:2px solid rgba(220,230,242,.42);
  padding:10px 12px;
  background:var(--panel);
}
.control-module:first-child{
  border-top-color:rgba(220,230,242,.55);
}
.control-module-hidden{
  display:none!important;
}
.control-module-head{
  min-height:26px;
  align-items:center;
  margin:0 0 8px;
  gap:10px;
}
.control-module-head>div:first-child{
  min-width:0;
}
.control-module-title,
.control-page .control-module .control-module-title{
  margin:0!important;
  color:#fff;
  font-size:16px;
  line-height:1.15;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
}
.control-module .quick-actions-subtitle,
.control-module #modeStatus{
  margin-top:2px;
  font-size:11px;
  line-height:1.25;
}
.control-module .collapse-card-body{
  margin-top:0;
}
.control-slides-module{
  padding-top:8px;
  padding-bottom:8px;
}
.control-slides-module .control-module-head{
  margin-bottom:6px;
}
.control-slides-module .show-nav{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
}
.control-slides-module .show-nav button:first-child{justify-self:start}
.control-slides-module .show-nav button:last-child{justify-self:end}
.control-slides-module .show-nav .btn{
  padding-top:8px;
  padding-bottom:8px;
}
.control-slides-module .presenter-counter{
  font-size:16px;
  font-weight:800;
}
.control-module .show-buttons{
  margin-top:0;
}
.control-module .selected-question{
  min-height:0;
  padding:9px 10px;
  border-radius:6px;
}
.control-module .obs-scene-grid{
  margin-top:0;
}
.control-module .overlay-control-list{
  margin-top:0;
}
.control-module .live-special-buttons{
  margin-top:0;
}
.control-module .poll-control-select{
  margin-top:0;
}
.control-module .field{
  margin-top:0;
}
.control-module.collapsed{
  padding-bottom:8px;
}
.control-module.collapsed .control-module-head{
  margin-bottom:0;
}
.control-page .collapse-head-actions{
  gap:7px;
}
.control-page .mode-badge{
  padding:4px 8px;
  font-size:10px;
}
.control-page .collapse-dot{
  width:10px;
  height:10px;
  min-width:10px;
}
.control-page .obs-heading{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.control-page .obs-status{
  font-size:11px;
}
.control-page .live-output-online{
  color:var(--muted);
  font-size:12px;
  font-weight:400;
}
.control-page .presenter-activity-control{
  font-size:12px;
}
.control-page .presenter-activity-control-row{
  padding-top:4px;
  padding-bottom:4px;
}
.control-page .audience-message-control-card textarea{
  min-height:72px;
}
.control-layout-modal{
  max-width:540px;
}
.control-layout-help{
  margin:0 0 12px;
  font-size:12px;
}
.control-layout-list{
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden;
}
.control-layout-row{
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:5px 8px;
  background:#10141a;
  border-bottom:1px solid var(--line);
}
.control-layout-row:last-child{
  border-bottom:0;
}
.control-layout-row.dragging{
  opacity:.45;
}
.control-layout-drag{
  width:30px;
  height:30px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:20px;
  line-height:1;
  cursor:grab;
}
.control-layout-drag:active{cursor:grabbing}
.control-layout-visible{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  margin:0;
  color:var(--text);
  cursor:pointer;
}
.control-layout-visible input{
  width:auto;
  height:auto;
  margin:0;
  accent-color:var(--accent);
}
.control-layout-order-buttons{
  display:flex;
  gap:5px;
}
.control-layout-order-buttons .btn{
  min-width:32px;
  padding:5px 8px;
}
.control-layout-actions{
  margin-top:12px;
  justify-content:flex-end;
}
@media(max-width:600px){
  .control-page .app{padding-left:0;padding-right:0}
  .control-module{border-left:0;border-right:0;padding-left:12px;padding-right:12px}
  .control-layout-modal{max-width:none}
  .control-layout-row{grid-template-columns:30px minmax(0,1fr) auto}
}


/* V245: keep Control header actions on one line */
.control-page .topbar{
  min-width:0;
}
.control-page .topbar > div:first-child{
  min-width:0;
  flex:1 1 auto;
}
.control-page .control-top-actions{
  margin-left:auto;
  flex:0 0 auto;
  flex-direction:row;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:7px;
  min-width:max-content;
}
.control-page .control-layout-button,
.control-page .connections-button{
  flex:0 0 auto;
}
@media(max-width:900px){
  .control-page .control-top-actions{
    flex-direction:row;
    align-items:center;
    flex-wrap:nowrap;
  }
}
@media(max-width:600px){
  .control-page .topbar{
    padding-left:10px;
    padding-right:10px;
    gap:8px;
  }
  .control-page .topbar > div:first-child{
    overflow:hidden;
  }
  .control-page .topbar #title{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}


/* V247: Super Viewer link uses existing Viewer/Downstream access settings. */
.link-static-label{
  display:flex;
  align-items:center;
  min-width:0;
  color:var(--text);
  font-weight:600;
}


/* V248: optional tablet Viewer tap navigation + slide notes (tapnav=1 only). */
.viewer-tap-nav{
  position:fixed;
  inset:0;
  z-index:30;
  pointer-events:none;
  overflow:hidden;
}
.viewer-tap-nav.hidden{display:none!important}
.viewer-tap-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  color:#fff;
  opacity:.10;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:clamp(84px,12vw,180px);
  font-weight:300;
  line-height:1;
  text-shadow:0 1px 8px rgba(0,0,0,.35);
  user-select:none;
  pointer-events:none;
}
.viewer-tap-arrow-left{left:3.5vw}
.viewer-tap-arrow-right{right:3.5vw}
.viewer-notes-button{
  position:absolute;
  top:12px;
  right:14px;
  z-index:3;
  pointer-events:auto;
  border:1px solid rgba(255,255,255,.28);
  border-radius:7px;
  background:rgba(12,15,19,.72);
  color:#fff;
  padding:7px 11px;
  font:700 13px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  box-shadow:0 2px 10px rgba(0,0,0,.25);
}
.viewer-notes-button.hidden{display:none!important}
.viewer-notes-button:active{background:rgba(55,124,199,.9)}
.viewer-notes-panel{
  position:absolute;
  top:0;
  right:0;
  width:25%;
  min-width:230px;
  height:100%;
  box-sizing:border-box;
  z-index:4;
  display:flex;
  flex-direction:column;
  pointer-events:auto;
  background:rgba(12,15,19,.94);
  color:#fff;
  border-left:1px solid rgba(255,255,255,.2);
  box-shadow:-10px 0 26px rgba(0,0,0,.25);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.viewer-notes-panel.hidden{display:none!important}
.viewer-notes-head{
  flex:0 0 auto;
  min-height:46px;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px 9px 14px;
  border-bottom:1px solid rgba(255,255,255,.14);
}
.viewer-notes-head strong{
  font:700 14px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.viewer-notes-close{
  width:30px;
  height:30px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#fff;
  font:400 25px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
}
.viewer-notes-close:hover,
.viewer-notes-close:active{background:rgba(255,255,255,.09)}
.viewer-notes-text{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:14px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font:400 clamp(15px,1.55vw,23px)/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
body.tapnav-viewer{
  touch-action:manipulation;
  -webkit-user-select:none;
  user-select:none;
}
body.tapnav-viewer .viewer-notes-text{
  -webkit-user-select:text;
  user-select:text;
}
@media(max-width:720px){
  .viewer-notes-panel{
    width:32%;
    min-width:210px;
  }
  .viewer-notes-button{
    top:8px;
    right:9px;
  }
}


/* V249: slightly larger, lighter tablet Viewer Notes button. */
.viewer-notes-button{
  padding:9px 14px;
  font-size:15px;
  border-radius:8px;
  background:rgba(0,0,0,.40);
}
.viewer-notes-button:active{
  background:rgba(55,124,199,.55);
}


/* V250: Presenter next-slide preview acts as a next-slide control. */
.presenter-next-preview-clickable{
  cursor:pointer;
}
.presenter-next-preview-clickable:focus-visible{
  outline:2px solid #377CC7;
  outline-offset:-2px;
}
