:root{color-scheme:dark;--bg:#0d1018;--panel:#161b25;--panel2:#1b2230;--line:#303746;--txt:#eef3f6;--muted:#96a1ad;--accent:#b8fe59;--danger:#ff6579;--success:#65e7af;--input:#101620;--radius:16px}*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}body{margin:0;background:radial-gradient(ellipse at 70% -20%,#232d2a 0%,transparent 39%),var(--bg);color:var(--txt);min-height:100vh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,a{transition:opacity .15s ease,border-color .15s ease,background .15s ease}button:hover,a:hover{opacity:.86}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(34px,4vw,56px);letter-spacing:-.055em;line-height:1.1;margin-bottom:15px}h2{font-size:24px;letter-spacing:-.04em;margin-bottom:8px}h3{font-size:17px}p{line-height:1.55}.muted{color:var(--muted)}.fine{color:var(--muted);font-size:12px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.16em;color:var(--accent);margin-bottom:14px}.accent{color:var(--accent)}.app{min-height:100vh;display:flex;flex-direction:column}.nav{min-height:74px;padding:13px clamp(20px,4vw,64px);display:flex;align-items:center;gap:40px;border-bottom:1px solid rgba(255,255,255,.08);background:#10141b99}.nav .brand,.brand{font-weight:950;letter-spacing:.015em;white-space:nowrap;display:inline-flex;align-items:center;gap:9px;font-size:17px}.brand-symbol{font-size:26px;color:var(--accent);line-height:0}.brand-sub{font-size:10px;letter-spacing:.12em;background:var(--accent);color:#111;padding:4px 5px;border-radius:4px}.nav nav{display:flex;gap:7px;align-items:center;flex:1}.nav nav a{font-size:13px;padding:9px 13px;color:var(--muted);border-radius:9px}.nav nav a.selected,.nav nav a:hover{background:#262d39;color:var(--txt)}.nav-user{margin-left:auto;display:flex;align-items:center;gap:18px;font-size:12px}.nav-user>span{display:flex;align-items:center;gap:6px}.text-button{border:0;background:transparent;color:var(--muted);cursor:pointer;padding:0}.container{width:100%;max-width:1350px;margin:0 auto;padding:42px clamp(20px,4vw,64px) 70px;flex:1}footer{color:#707c88;text-align:center;font-size:11px;padding:24px}.page-header{display:flex;align-items:center;justify-content:space-between;gap:30px;margin:0 0 30px}.page-header h1{margin:0 0 9px}.page-header p:last-child{margin-bottom:0}.button{border:1px solid var(--line);padding:11px 17px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-size:13px;font-weight:750;border-radius:9px;cursor:pointer;white-space:nowrap;min-height:42px}.button.primary{background:var(--accent);color:#0d1410;border-color:var(--accent)}.button.outline{background:#1d2430;color:var(--txt);border-color:#354152}.button.success{background:#1d473e;color:#96f3c2;border-color:#27604b}.button.danger-outline{background:#2d222b;color:#ff9ca8;border-color:#7a3c4b}.button.danger{background:#531e2b;color:#ffc2ca;border-color:#a64157}.button:disabled{opacity:.45;cursor:not-allowed}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:19px}.stat{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:23px;min-width:0}.stat span,.stat small{display:block;color:var(--muted);font-size:12px}.stat strong{display:block;font-size:30px;letter-spacing:-.045em;margin:11px 0 5px}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:19px}.panel{padding:27px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}.panel h2{margin-bottom:9px}.panel>.muted{margin-bottom:26px}.field-label{margin:19px 0 7px;font-size:12px;font-weight:750;color:#a8b5bd}.copy-box{border:1px solid var(--line);border-radius:8px;display:flex;align-items:center;min-width:0;overflow:hidden;background:#101620}.copy-box code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;padding:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.tiny-button{border:0;border-left:1px solid var(--line);padding:13px 12px;background:#303843;color:var(--accent);cursor:pointer;font-size:11px;font-weight:800}.form-stack{display:flex;flex-direction:column;gap:15px}.form-stack label{color:#c7cfd6;font-size:12px;font-weight:700;display:flex;flex-direction:column;gap:7px}.form-stack input:not([type=checkbox]),.form-stack select,.form-stack textarea,.filter select{border:1px solid #384251;border-radius:8px;background:var(--input);padding:12px 13px;color:var(--txt);min-width:0;width:100%;outline:0}.form-stack textarea{resize:vertical}.form-stack input::placeholder,.form-stack textarea::placeholder{color:#667280}.form-stack input[type=file]{font-size:11px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-stack .check-line{display:flex;flex-direction:row;align-items:center;gap:9px;padding:2px 0 6px}.check-line input{accent-color:var(--accent);width:16px;height:16px}.inline-form{margin:0}.danger-zone{border-top:1px solid var(--line);margin-top:20px;padding-top:20px}.callout{margin-top:19px;padding:23px;background:#b8fe590b;border:1px solid #b8fe5930;border-radius:var(--radius);display:flex;justify-content:space-between;align-items:center;gap:20px}.callout strong{font-size:19px}.callout p:last-child{margin:6px 0 0;color:var(--muted);font-size:13px}.pill{font-size:10px;padding:4px 7px;border-radius:5px;text-transform:uppercase;letter-spacing:.06em;font-weight:850;background:#29313e;color:#bac7d6}.pill.paid,.pill.approved,.pill.owner{background:#b8fe5926;color:var(--accent)}.pill.pending{background:#f5ce5030;color:#ffdd81}.pill.rejected,.pill.hidden{background:#ff657923;color:#ff8e9d}.pill.admin{background:#86adff25;color:#9bbcff}.pill.free,.pill.user{background:#3c4452;color:#cad3de}.alert{padding:12px 15px;margin:12px 0 20px;border-radius:8px;font-size:13px;border:1px solid #5a687d;background:#2d3747}.alert.error{border-color:#ab4c5a;background:#522731;color:#ffc5ce}.alert.success{border-color:#39785a;background:#153a31;color:#a8f6ca}.section-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:17px}.section-heading h2{margin:0}.msg-card{padding:21px 0;border-bottom:1px solid #303746;display:flex;align-items:flex-start;justify-content:space-between;gap:30px}.msg-card:last-child{border-bottom:0}.msg-main{min-width:0}.msg-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.msg-meta small{color:var(--muted);font-size:11px}.msg-card p{margin:11px 0;font-size:15px;overflow-wrap:anywhere}.msg-actions{display:flex;gap:8px}.msg-actions .button{min-height:34px;padding:8px 12px;font-size:11px}.mod-image{max-width:260px;max-height:160px;object-fit:contain;border-radius:9px;border:1px solid var(--line);margin-top:10px}.empty{padding:55px 10px;text-align:center;color:var(--muted)}.filter{margin-bottom:17px}.filter label{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px}.filter select{max-width:280px}.table-panel{padding:0}.table-wrap{width:100%;overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:18px 20px;white-space:nowrap;border-bottom:1px solid var(--line)}th{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em}tr:last-child td{border:0}.small-link{font-size:12px;color:var(--accent);font-weight:700}.narrow{max-width:620px}.detail-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:13px 0;border-bottom:1px solid var(--line);font-size:13px}.detail-row span:first-child{color:var(--muted)}hr{border:0;border-top:1px solid var(--line);margin:24px 0}.auth-wrap{display:grid;grid-template-columns:1.15fr .85fr;gap:42px;min-height:68vh;align-items:center}.auth-art{position:relative;padding:40px}.auth-art h1{font-size:clamp(48px,6vw,85px)}.auth-art h1 em{font-style:normal;color:var(--accent)}.auth-art>p:last-of-type{color:var(--muted);max-width:480px}.art-ornament{position:absolute;top:-55px;right:20px;color:#b8fe5945;font-size:120px}.auth-form{max-width:450px;width:100%;margin:0 auto}.auth-form h2{font-size:32px}.auth-form .fine{text-align:center;margin-top:19px}.viewer-wrap{max-width:575px;margin:0 auto;min-height:100vh;padding:30px 18px;display:flex;flex-direction:column}.viewer-card{background:var(--panel);border:1px solid var(--line);padding:clamp(23px,6vw,40px);border-radius:18px;margin:40px 0 0}.viewer-card h1{font-size:clamp(36px,7vw,51px)}.viewer-card .form-stack{margin-top:28px}.viewer-card .muted{font-size:14px}.onair-dot{font-size:11px;color:var(--success);font-weight:750;letter-spacing:.05em;margin-bottom:18px}.quota{border:1px solid #667b49;border-radius:9px;background:#b8fe5910;padding:15px;margin:20px 0;color:#c7eca5;font-size:13px}.quota strong{font-size:18px}.quota.paid-quota{border-color:#315e57;color:#abf3d6;background:#4cbf9620}.honey{position:absolute!important;left:-99999px!important}.hero{padding:100px 0;max-width:860px}.hero h1{font-size:clamp(60px,8vw,112px)}.hero p:not(.eyebrow){font-size:18px;color:var(--muted);max-width:630px}.hero .button{margin-top:20px}@media(max-width:1000px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.two-columns{grid-template-columns:1fr}.nav{gap:12px;flex-wrap:wrap}.nav nav{order:3;width:100%;overflow:auto}.auth-wrap{grid-template-columns:1fr}.auth-art{padding:10px}.auth-form{max-width:none}}@media(max-width:650px){.container{padding-top:26px}.nav-user{margin-left:0}.nav-user>span{display:none}.page-header{align-items:flex-start;flex-direction:column}.stat{padding:16px}.stat strong{font-size:26px}.callout{align-items:flex-start;flex-direction:column}.form-row{grid-template-columns:1fr}.msg-card{flex-direction:column;gap:9px}.msg-actions{flex-wrap:wrap}.panel{padding:18px}.public-nav{justify-content:space-between}.auth-wrap{gap:20px}.auth-art h1{font-size:51px}.art-ornament{display:none}}

.webhook-panel{margin-top:19px}.webhook-footer{display:flex;gap:15px;justify-content:space-between;align-items:center;margin:15px 0}.moderation-toolbar{display:flex;justify-content:flex-end;padding:14px 0;border-bottom:1px solid var(--line)}@media(max-width:650px){.webhook-footer{align-items:stretch;flex-direction:column}}

/* v0.1.1: per-channel moderation toggle and irreversible storage cleanup */
.moderation-mode{display:flex;gap:18px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:16px}
.moderation-mode .eyebrow{margin-bottom:6px}
.moderation-mode strong{font-size:20px}
.moderation-mode .fine{margin:6px 0 0}
.cleanup-panel{margin-top:19px}
.cleanup-form{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.cleanup-form label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:var(--muted);flex:1;min-width:190px}
.cleanup-form select{background:var(--input);border:1px solid #384251;border-radius:8px;color:var(--txt);min-height:42px;padding:9px 12px}
.toggle-row{border:1px solid #64744b55;border-radius:9px;background:#b8fe590a;padding:12px!important}
.msg-actions{flex-wrap:wrap}
@media(max-width:650px){.moderation-mode{align-items:flex-start;flex-direction:column}.cleanup-form{flex-direction:column;align-items:stretch}}
.cleanup-form input{background:var(--input);border:1px solid #384251;border-radius:8px;color:var(--txt);min-height:42px;padding:9px 12px}
.toggle-row{position:relative;cursor:pointer;min-height:54px}
.toggle-row .switch-input{position:absolute;opacity:0;width:1px;height:1px}
.toggle-row .switch-track{width:42px;height:24px;border-radius:99px;background:#4a5260;display:inline-block;position:relative;flex:0 0 auto;border:1px solid #697180;transition:background .2s}
.toggle-row .switch-track:after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .2s}
.toggle-row .switch-input:checked+.switch-track{background:#5a9626;border-color:#83c64a}
.toggle-row .switch-input:checked+.switch-track:after{transform:translateX(18px)}
.toggle-row .switch-input:focus-visible+.switch-track{outline:2px solid #b8fe59;outline-offset:3px}
.toggle-row small{font-weight:400;color:var(--muted)}

/* v0.1.2 — compact version beside the logo & account deletion controls */
.brand-version{font-size:10px;font-weight:650;line-height:1;letter-spacing:.025em;color:#84929e;background:#27303d;padding:5px 7px;border:1px solid #384455;border-radius:6px}
.account-actions{display:flex;align-items:center;gap:15px}.delete-link{color:#ff9ba8}.account-danger{margin-top:30px;padding:20px;border:1px solid #7a3c4b;border-radius:10px;background:#381f291e}.account-danger h3{margin:0 0 10px}.account-danger p.muted{font-size:13px}.account-danger label strong{color:#ffc2ca}
@media(max-width:650px){.brand-version{font-size:9px}.account-actions{gap:10px}}

/* v0.1.3 mobile navigation, subscriptions and user theme preferences */
.nav .nav-panel{display:flex;flex:1;align-items:center;gap:14px;min-width:0}
.nav .nav-panel nav{flex:1;display:flex;flex-wrap:wrap;gap:3px;min-width:0}
.nav .nav-user{margin-left:auto;flex-shrink:0;gap:9px}
.nav-preferences,.public-actions,.viewer-preferences{display:flex;align-items:center;gap:7px}
.pref-button,.mobile-menu{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid var(--line);border-radius:9px;background:var(--panel2);color:var(--txt);padding:9px 11px;cursor:pointer;font-size:12px;font-weight:750;white-space:nowrap;min-height:38px}
.pref-button:hover,.mobile-menu:hover{border-color:var(--accent)}
.mobile-menu{display:none;margin-left:auto}
.nav .nav-user .pill{font-size:9px}
.viewer-preferences{margin-left:auto;align-self:flex-end;margin-top:-34px}
.premium-hint{font-size:13px;margin:0 0 20px;color:var(--accent);font-weight:750}
.premium-hint a{text-decoration:underline;text-underline-offset:3px}
.pill.premium{background:#b8fe5926;color:var(--accent)}
.quota.premium-quota{border-color:#315e57;color:#abf3d6;background:#4cbf9620}
@media(max-width:1100px){
 .nav{gap:12px}
 .nav .nav-panel{gap:8px}
 .nav .nav-panel nav a{padding:7px 9px}
 .nav .nav-user>span{display:none}
}
@media(max-width:850px){
 .nav{flex-wrap:nowrap;position:relative;z-index:20;justify-content:space-between;gap:12px}
 .nav .mobile-menu{display:inline-flex}
 .nav .nav-panel{display:none;position:absolute;top:100%;left:0;right:0;z-index:50;background:var(--panel);border:1px solid var(--line);border-top:0;border-radius:0 0 16px 16px;box-shadow:0 18px 28px rgba(0,0,0,.25);padding:14px 18px 18px;flex-direction:column;align-items:stretch;gap:15px;max-height:calc(100dvh - 75px);overflow-y:auto}
 .nav .nav-panel.is-open{display:flex}
 .nav .nav-panel nav{order:unset;display:flex;width:100%;overflow:visible;flex-direction:column;align-items:stretch;gap:3px}
 .nav .nav-panel nav a{padding:13px 14px;font-size:14px}
 .nav .nav-user{margin:0;display:flex;justify-content:space-between;padding:12px 4px;border-top:1px solid var(--line)}
 .nav .nav-user>span{display:flex}
 .nav-preferences{justify-content:space-between}
 .nav-preferences .pref-button{flex:1}
 .public-nav .mobile-menu{display:none}
}
@media(max-width:480px){
 .nav .brand{font-size:14px;gap:5px}.nav .brand-sub{font-size:8px}.nav .brand-version{font-size:8px;padding:4px}
 .public-nav .nav-preferences{gap:3px}.public-nav .pref-button{font-size:10px;padding:7px 5px;min-height:32px}
 .public-nav .public-actions{gap:5px}.public-nav .small-link{font-size:11px}
 .page-header .toolbar{display:flex;gap:7px;flex-wrap:wrap}.page-header .button{white-space:normal}
 .viewer-preferences{margin-top:7px}
}
:root[data-theme=light]{color-scheme:light;--bg:#f3f6f9;--panel:#ffffff;--panel2:#ecf2f6;--line:#d9e0e8;--txt:#182335;--muted:#5d6b7b;--accent:#356b12;--danger:#b43c52;--success:#19794e;--input:#f9fbfd}
:root[data-theme=light] body{background:radial-gradient(ellipse at 70% -20%,#e4f2d7 0%,transparent 42%),var(--bg)}
:root[data-theme=light] .nav{background:rgba(255,255,255,.96);border-bottom-color:#dfe5ed}
:root[data-theme=light] .brand-sub,:root[data-theme=light] .button.primary{background:#356b12;color:#fff}
:root[data-theme=light] .brand-version{background:#edf1f5;color:#49566a;border-color:#d9e0e8}
:root[data-theme=light] .nav nav a.selected,:root[data-theme=light] .nav nav a:hover{background:#e6edf2;color:#172435}
:root[data-theme=light] .button.outline{background:#f7fafc;border-color:#c9d2dc;color:#1c2a39}
:root[data-theme=light] .button.danger-outline{background:#fff1f3;color:#a72f46;border-color:#e6b7c1}
:root[data-theme=light] .button.danger{background:#b0354a;color:white;border-color:#a22d42}
:root[data-theme=light] .button.success{background:#e1f7ea;color:#176e47;border-color:#a6dcb8}
:root[data-theme=light] .form-stack label{color:#354357}
:root[data-theme=light] .form-stack input:not([type=checkbox]),:root[data-theme=light] .form-stack select,:root[data-theme=light] .form-stack textarea,:root[data-theme=light] .filter select,:root[data-theme=light] .cleanup-form select,:root[data-theme=light] .cleanup-form input{color:#1c293b;border-color:#cfd8e2;background:#f9fbfd}
:root[data-theme=light] .copy-box{background:#f5f8fb}:root[data-theme=light] .tiny-button{background:#e5eef2;color:#356b12}
:root[data-theme=light] .pill.free,:root[data-theme=light] .pill.user{background:#e7edf1;color:#34455b}
:root[data-theme=light] .pill.premium,:root[data-theme=light] .pill.owner{background:#e6f5de;color:#356b12}
:root[data-theme=light] .pill.admin{background:#e9f1ff;color:#245ba1}
:root[data-theme=light] .pill.pending{background:#fff3d4;color:#865f0c}
:root[data-theme=light] .pill.rejected,:root[data-theme=light] .pill.hidden{background:#ffedf0;color:#a32f44}
:root[data-theme=light] .alert{background:#f1f5fa;color:#34455b;border-color:#d1deec}
:root[data-theme=light] .alert.success{background:#e7f7ed;color:#11693f;border-color:#b8e1c6}
:root[data-theme=light] .alert.error{background:#fff0f2;color:#9c2c42;border-color:#ebbbc5}
:root[data-theme=light] .quota{background:#f0f8e7;color:#356b12;border-color:#c5deaa}
:root[data-theme=light] .quota.premium-quota{background:#e3f8ed;color:#176e47;border-color:#b8dfc9}
:root[data-theme=light] .msg-card{border-bottom-color:#dde3ea}
:root[data-theme=light] .field-label{color:#576779}
:root[data-theme=light] .toggle-row{background:#f1f7eb;border-color:#cce2bd}
:root[data-theme=light] .account-danger{background:#fff6f7;border-color:#e7bac3}
:root[data-theme=light] .account-danger label strong{color:#a02e45}
:root[data-theme=light] .callout{background:#f1f7ea;border-color:#d7e9c4}
:root[data-theme=light] footer{color:#637286}
@media(min-width:851px) and (max-width:1000px){.nav .nav-panel nav{order:0;width:auto;overflow:visible}}

/* v0.1.5 Audience Form Studio */
.studio-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr);gap:20px;align-items:start}
.studio-preview-panel{position:sticky;top:14px}
.studio-phone{margin:18px auto 0;max-width:360px;border:8px solid #394355;border-radius:33px;padding:22px 14px;background:#e4e8ef;box-shadow:0 15px 45px #0003}
.studio-mini-card{border-radius:16px;background:var(--form-bg,#161b25);color:var(--form-ink,#fff);padding:22px 17px;min-height:360px;overflow-wrap:anywhere;box-shadow:0 5px 12px #0002}
.studio-mini-card h2{font-size:23px;color:inherit}.studio-mini-card p{font-size:12px;color:inherit}.studio-mini-card .eyebrow{color:var(--form-accent,#b8fe59)}
.studio-mini-card .muted{opacity:.72}.studio-mini-label{font-size:12px;font-weight:700;margin:13px 0 5px}
.studio-mini-input{background:#ffffffed;color:#576475;border-radius:8px;padding:12px;font-size:12px;min-height:39px}
.studio-mini-button{background:var(--form-accent,#b8fe59);color:var(--form-on-accent,#121212);padding:11px;border-radius:7px;margin-top:15px;font-size:12px;font-weight:800;text-align:center}
.studio-mini-foot{font-size:11px;opacity:.72;margin-top:14px}.studio-logo{width:100%;display:flex;align-items:center;justify-content:center;font-size:26px;margin-bottom:20px;min-height:28px}.studio-logo img{display:block;width:160px;height:auto;max-width:100%;max-height:none;object-fit:contain}.studio-current-logo{display:flex;align-items:center;gap:18px;background:var(--panel2);padding:13px;border-radius:9px}.studio-current-logo img{max-width:125px;max-height:64px;object-fit:contain}
.viewer-custom .viewer-card{overflow:hidden}.audience-club-logo{display:block;object-fit:contain;width:160px;max-width:100%;height:auto;margin:0 auto 20px}
.audience-custom-footer{opacity:.75;text-align:center;font-size:12px;margin-top:20px}
body.form-effect-fade .viewer-card{animation:form-fade .55s ease-out both}
body.form-effect-float .viewer-card{animation:form-float .8s ease-out both}
body.form-effect-glow .viewer-card{box-shadow:0 0 32px var(--form-accent,#b8fe59)44}
@keyframes form-fade{from{opacity:0}to{opacity:1}}
@keyframes form-float{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){body.form-effect-fade .viewer-card,body.form-effect-float .viewer-card{animation:none}body.form-effect-glow .viewer-card{box-shadow:none}}
@media(max-width:850px){.studio-layout{grid-template-columns:1fr}.studio-preview-panel{position:static}}
/* v0.1.6 — compact logo controls: make range inputs feel like sliders, not text fields. */
.logo-controls{display:grid;gap:13px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
.logo-controls output{font-variant-numeric:tabular-nums;color:var(--accent)}
.form-stack .logo-controls input[type=range]{height:26px;border:0;padding:3px 0;margin:0;background:transparent;accent-color:var(--accent);cursor:pointer}
:root[data-theme=light] .form-stack .logo-controls input[type=range]{background:transparent;border:0}

/* v0.1.8 - audience gallery + device camera choice */
.audience-media{min-width:0;border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.audience-media legend{font-size:12px;font-weight:700;color:var(--txt);padding:0;margin-bottom:10px}
.audience-media-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.form-stack .audience-media-options .media-picker{position:relative;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:9px;min-width:0;padding:15px 11px;cursor:pointer;border:1px solid var(--line);border-radius:10px;background:var(--input);color:var(--txt);font-size:13px;text-align:center;font-weight:750}
.audience-media-options .media-picker:hover,.audience-media-options .media-picker.has-image{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--input))}
.audience-media-options .media-picker span[aria-hidden]{font-size:19px;color:var(--accent)}
.form-stack .audience-media-options .media-picker-file{position:absolute!important;top:0;left:0;width:100%!important;height:100%!important;padding:0!important;margin:0!important;opacity:0;cursor:pointer;z-index:1}
.audience-media-options .media-picker:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.audience-media-preview{display:flex;align-items:center;gap:12px;border:1px solid var(--line);padding:9px;border-radius:10px;background:var(--panel2);min-width:0}
.audience-media-preview[hidden]{display:none!important}
.audience-media-preview img{width:76px;height:76px;object-fit:cover;border-radius:7px;background:var(--input)}
.audience-media-preview-details{display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;font-size:12px;overflow-wrap:anywhere}
.media-remove{background:transparent;border:0;color:var(--accent);text-decoration:underline;cursor:pointer;padding:0;font-size:12px;font-weight:700}
.audience-media .fine{margin:0}
@media(max-width:370px){.audience-media-options{grid-template-columns:1fr}}

/* v0.1.10 — overlay typography editor + built-in plugin install guide */
.font-upload-panel{display:grid;gap:8px;border:1px solid var(--line);border-radius:11px;padding:13px;background:var(--panel2)}
.form-stack .font-upload-panel input[type=file]{width:100%}
.form-stack input[type=range][name=overlay_font_size]{cursor:pointer;accent-color:var(--accent);padding:5px 0;height:30px;background:transparent;border:0}
.overlay-editor-preview{border:1px solid var(--line);border-radius:12px;padding:15px 18px 16px;min-height:190px;display:flex;flex-direction:column;justify-content:flex-end;overflow:hidden;background:radial-gradient(ellipse at 23% 50%,#743b9e 0%,#39245f 38%,transparent 69%),radial-gradient(ellipse at 95% 10%,#1ea4b2 0%,transparent 57%),linear-gradient(140deg,#080e19,#171827);--preview-username:#b8fe59;--preview-message:#fff;color:#fff;text-shadow:0 2px 5px #080e19}
.overlay-preview-meta{font-size:11px;font-weight:600;opacity:.8;margin-bottom:auto;color:#e6e7e9}
.overlay-editor-preview p{line-height:1.3;font-size:var(--preview-size,24px);margin:3px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.overlay-editor-preview [data-preview-username],.overlay-editor-preview [data-preview-gender]{color:var(--preview-username)}
.overlay-editor-preview [data-preview-gender]{font-size:.8em;font-weight:600}
.overlay-editor-preview [data-preview-message]{color:var(--preview-message)}
.plugin-intro{margin-bottom:20px}
.plugin-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-top:18px}
.plugin-step{border:1px solid var(--line);background:var(--panel2);border-radius:12px;padding:19px;min-width:0}
.plugin-step h3{margin:9px 0 6px;font-size:16px}
.plugin-step p{margin:0;color:var(--muted);font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.plugin-step-no{color:var(--accent);font-size:27px;font-weight:900;letter-spacing:-1px}
.plugin-visual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:20px}
.plugin-figure{margin:0;overflow:hidden}
.plugin-figure img{display:block;width:100%;height:auto;border-radius:10px;border:1px solid var(--line);background:#101923}
.plugin-figure figcaption{font-size:13px;margin-top:12px;line-height:1.5}
.plugin-figure figcaption small{display:block;color:var(--muted)}
.plugin-note code,.plugin-step code,.plugin-intro code{font-size:.93em;overflow-wrap:anywhere}
@media(max-width:800px){.plugin-steps,.plugin-visual-grid{grid-template-columns:1fr}}



/* v0.1.12 – compact and accessible quick-send audience experience. */
.viewer-custom .viewer-card{padding:clamp(16px,3vw,28px)}
.viewer-custom .viewer-card .form-stack{gap:12px}
.viewer-custom .audience-identity-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:10px}
.viewer-custom .audience-identity-row label{min-width:0}
.viewer-custom .audience-message-label input[name=body]{font-size:17px;min-height:54px;line-height:1.3}
.viewer-custom .form-stack [type=submit].button{min-height:56px;font-size:17px;font-weight:800;width:100%}
.viewer-custom .form-optional{font-size:.76em;opacity:.75;font-weight:400}
.viewer-custom .viewer-card .eyebrow,.viewer-custom .viewer-card .onair-dot{display:none}
.viewer-custom .audience-media{margin-top:0}
@media(max-width:360px){.viewer-custom .audience-identity-row{grid-template-columns:1fr}}
.storage-action{min-width:190px}
.storage-action summary{cursor:pointer;color:var(--accent);font-weight:700;white-space:nowrap}
.storage-action .form-stack{margin-top:12px;gap:9px}
.storage-action .form-stack input,.storage-action .form-stack select{min-width:0;max-width:240px}
.storage-action .button{white-space:normal}

/* v0.1.13 — audience form refresh: centered heading, single-column identity, mobile-first spacing. */
.viewer-custom .viewer-wrap{width:100%;max-width:660px;padding:18px 14px 30px;min-width:0}
.viewer-custom .viewer-card{margin:20px 0 0;padding:clamp(20px,4.8vw,34px);border-radius:20px;min-width:0}
.viewer-custom .audience-hero{text-align:center;max-width:540px;margin:0 auto 22px}
.viewer-custom .audience-hero h1{font-size:clamp(28px,5.2vw,46px);line-height:1.12;letter-spacing:-.045em;font-weight:850;text-wrap:balance;margin:0 0 12px;overflow-wrap:break-word}
.viewer-custom .audience-hero .muted{font-size:clamp(13px,1.6vw,15px);line-height:1.55;margin:0 auto;max-width:44ch;text-wrap:pretty}
.viewer-custom .viewer-card .form-stack{margin-top:20px;gap:15px}
.viewer-custom .audience-identity-row{display:grid;grid-template-columns:minmax(0,1fr);gap:15px;min-width:0}
.viewer-custom .audience-identity-row label,.viewer-custom .audience-message-label{min-width:0;gap:7px}
.viewer-custom .audience-field-label{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}
.viewer-custom .form-optional{font-size:11px;font-weight:400;opacity:.72}
.viewer-custom .viewer-card .form-stack input[name=sender],
.viewer-custom .viewer-card .form-stack input[name=body],
.viewer-custom .viewer-card .form-stack select[name=gender]{min-height:52px;width:100%;font-size:16px;border-radius:11px;padding:12px 15px}
.viewer-custom .audience-media-options{gap:10px}
.viewer-custom .form-stack .audience-media-options .media-picker{min-height:52px;padding:12px 9px;line-height:1.2;font-size:13px;border-radius:11px;gap:8px}
.viewer-custom .audience-media legend{font-size:12px;line-height:1.5;margin-bottom:8px}
.viewer-custom .audience-media [data-image-hint]{font-size:11px;line-height:1.5;opacity:.7;margin-top:0}
.viewer-custom .viewer-card .form-stack [type=submit].button{margin-top:3px;border-radius:11px;min-height:56px;font-size:16px}
.viewer-custom .viewer-card .form-stack>p.fine{font-size:11px;line-height:1.45;text-align:center;margin:0}
.viewer-custom .quota{margin:12px 0;padding:12px;font-size:12px}
.studio-mini-hero{text-align:center;margin:10px auto 14px}
.studio-mini-card .studio-mini-hero h2{font-size:23px;line-height:1.12;letter-spacing:-.04em;overflow-wrap:break-word;text-wrap:balance;margin:0 0 9px}
.studio-mini-card .studio-mini-hero p{line-height:1.45;text-wrap:pretty;margin:0 auto}
@media(max-width:480px){
 .viewer-custom .viewer-wrap{padding:12px 10px 25px}
 .viewer-custom .viewer-card{margin-top:15px;padding:22px 18px;border-radius:17px}
 .viewer-custom .audience-hero{margin-bottom:18px}
 .viewer-custom .audience-hero h1{font-size:clamp(27px,7vw,36px)}
 .viewer-custom .viewer-card .form-stack{gap:13px}
 .viewer-custom .form-stack .audience-media-options .media-picker{font-size:12px;min-height:50px;padding:10px 6px;gap:5px}
}
@media(max-width:340px){.viewer-custom .audience-media-options{grid-template-columns:minmax(0,1fr)} }
/* Download guide now has 4 cards and 3 illustrations. */
.plugin-steps{grid-template-columns:repeat(4,minmax(0,1fr))}
.plugin-visual-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1050px){.plugin-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.plugin-visual-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.plugin-steps,.plugin-visual-grid{grid-template-columns:minmax(0,1fr)}}

/* v0.1.14 — Audience Chat Room. A deliberately phone-width experience on every screen.
   The public chat area is NOT the transparent Resolume overlay. */
body.audience-chatroom{margin:0;background:#06070a;overflow:hidden;min-height:100vh;min-height:100dvh}
body.audience-chatroom .viewer-wrap.chat-viewer-wrap{width:100%;max-width:480px;height:100vh;height:100dvh;min-height:0;margin:0 auto;padding:0;display:flex;box-sizing:border-box}
body.viewer-custom.audience-chatroom .viewer-card.chat-room-shell{--room-line:color-mix(in srgb,var(--form-text,#ffffff) 14%,transparent);position:relative;display:flex;flex:1;flex-direction:column;min-height:0;overflow:visible;margin:0;padding:0;border-radius:0;border:0;border-inline:1px solid #ffffff19;background:var(--form-bg,#08090d);color:var(--form-text,#fff);box-shadow:0 12px 45px #0005}
body.audience-chatroom .chat-room-header{flex:0 0 auto;display:flex;flex-direction:column;gap:9px;padding:15px 17px 12px;border-bottom:1px solid var(--room-line);background:var(--form-bg,#08090d);z-index:3}
body.audience-chatroom .chat-room-brand{display:flex;min-width:0;align-items:center;gap:12px}
body.audience-chatroom .chat-room-brand[data-logo-align=center]{justify-content:center;text-align:center}
body.audience-chatroom .chat-room-brand[data-logo-align=right]{flex-direction:row-reverse;text-align:right}
body.audience-chatroom .chat-room-logo{display:block;flex:0 1 auto;min-width:0;max-width:38%;max-height:90px;height:auto;object-fit:contain;margin:0!important}
body.audience-chatroom .chat-room-title{min-width:0;flex:1}
body.viewer-custom.audience-chatroom .chat-room-title h1{font-size:clamp(16px,4.5vw,21px);font-weight:850;line-height:1.15;letter-spacing:-.025em;margin:0 0 3px;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.viewer-custom.audience-chatroom .chat-room-title p{font-size:11px;line-height:1.4;margin:0;opacity:.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
body.audience-chatroom .chat-room-toolbar{display:flex;align-items:center;justify-content:space-between;gap:7px}
body.audience-chatroom .chat-toolbar-button,body.audience-chatroom .chat-room-toolbar .pref-button{border:1px solid var(--room-line);border-radius:30px;min-height:35px;padding:7px 10px;background:color-mix(in srgb,var(--form-text,#fff) 7%,transparent);color:var(--form-text,#fff);font-size:11px;font-weight:700;display:inline-flex;align-items:center;gap:6px;max-width:65%;cursor:pointer}
body.audience-chatroom .chat-room-toolbar .pref-button{margin-left:auto;min-width:35px;justify-content:center}
body.audience-chatroom .chat-toolbar-button svg{width:17px;height:17px;flex:none}
body.audience-chatroom .chat-identity-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.audience-chatroom .chat-room-feed{display:flex;flex:1;flex-direction:column;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:16px 16px 20px;scrollbar-width:thin;scrollbar-color:#6b758755 transparent}
body.audience-chatroom .chat-room-list{margin-top:auto;display:flex;flex-direction:column;gap:12px;min-height:0;width:100%}
body.audience-chatroom .chat-room-empty{margin:auto;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;text-align:center;opacity:.58;font-size:12px}
body.audience-chatroom .chat-room-empty-icon{font-size:46px;line-height:1;color:var(--form-accent,#b8fe59);opacity:.62;margin-bottom:5px}
body.audience-chatroom .chat-room-empty strong{font-size:14px}
body.audience-chatroom .chat-bubble{max-width:89%;min-width:80px;align-self:flex-start;background:color-mix(in srgb,var(--form-text,#fff) 9%,var(--form-bg,#08090d));border:1px solid var(--room-line);border-radius:15px 15px 15px 5px;padding:10px 13px;overflow-wrap:anywhere}
body.audience-chatroom .chat-bubble .chat-author{display:block;font-size:12px;font-weight:800;color:var(--form-accent,#b8fe59);margin-bottom:3px}
body.audience-chatroom .chat-bubble .chat-gender{font-weight:500;opacity:.75;font-size:10px}
body.audience-chatroom .chat-bubble .chat-message{font-size:14px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
body.audience-chatroom .chat-bubble .chat-media{display:block;max-width:100%;max-height:235px;width:auto;height:auto;object-fit:contain;border-radius:9px;margin-top:7px}
body.audience-chatroom .chat-room-bottom{position:relative;flex:0 0 auto;background:var(--form-bg,#08090d);padding:10px 13px max(12px,env(safe-area-inset-bottom,12px));border-top:1px solid var(--room-line);z-index:4}
body.audience-chatroom .chat-room-notice{font-size:12px;color:var(--form-text,#fff);padding:10px 13px;margin-bottom:10px;border-radius:12px;background:color-mix(in srgb,var(--form-accent,#b8fe59) 17%,var(--form-bg,#08090d));line-height:1.4;max-height:110px;overflow-y:auto}
body.audience-chatroom .chat-room-notice[hidden],body.audience-chatroom .chat-room-attachment[hidden],body.audience-chatroom .chat-identity-panel[hidden]{display:none!important}
body.audience-chatroom .chat-room-notice.is-error{background:#8b233a45;color:#ffd0d9}
body.audience-chatroom .chat-room-notice.is-success{background:color-mix(in srgb,var(--form-accent,#b8fe59) 17%,var(--form-bg,#08090d))}
body.audience-chatroom .chat-composer{margin:0;padding:0;position:relative}
body.audience-chatroom .chat-composer-bar{display:flex;align-items:center;gap:5px;min-height:54px;background:#fff;border-radius:100px;color:#111;box-shadow:0 2px 12px #0003;padding:4px 5px 4px 7px}
body.audience-chatroom .chat-camera,body.audience-chatroom .chat-send-button{position:relative;flex:none;width:44px;height:44px;border:0;background:transparent;color:#080b10;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;padding:8px}
body.audience-chatroom .chat-camera:hover,body.audience-chatroom .chat-send-button:hover{background:#f0f0f0}
body.audience-chatroom .chat-camera svg,body.audience-chatroom .chat-send-button svg{width:29px;height:29px}
body.audience-chatroom .chat-camera input[type=file]{position:absolute;width:100%;height:100%;inset:0;opacity:0;cursor:pointer;font-size:0}
body.audience-chatroom .chat-camera-disabled{opacity:.25;cursor:default;pointer-events:none}
body.audience-chatroom .chat-message-input{flex:1;min-width:0;background:transparent;border:0;color:#161718;font-size:16px;outline:none;padding:6px 3px;height:43px;line-height:1.2;border-radius:0;appearance:none}
body.audience-chatroom .chat-message-input:focus{outline:0;box-shadow:none}
body.audience-chatroom .chat-message-input::placeholder{color:#68717c;opacity:1}
body.audience-chatroom .chat-send-button:disabled{opacity:.32;cursor:not-allowed}
body.audience-chatroom .chat-room-subline{display:flex;flex-direction:column;align-items:center;gap:2px;margin:6px auto 0;color:var(--form-text,#fff);font-size:10px;opacity:.56;text-align:center;line-height:1.4}
body.audience-chatroom .chat-room-subline:empty{display:none}
body.audience-chatroom .chat-room-attachment{display:flex;align-items:center;gap:9px;background:color-mix(in srgb,var(--form-text,#fff) 10%,var(--form-bg,#08090d));border:1px solid var(--room-line);border-radius:12px;padding:7px 9px;margin-bottom:8px;min-width:0}
body.audience-chatroom .chat-room-attachment img{width:49px;height:49px;object-fit:cover;border-radius:8px}
body.audience-chatroom .chat-room-attachment span{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
body.audience-chatroom .chat-room-attachment button{background:transparent;border:0;color:var(--form-text,#fff);font-size:24px;cursor:pointer}
body.audience-chatroom .chat-room-image-hint{font-size:11px;padding:2px 4px;margin:0 0 7px}
body.audience-chatroom .chat-identity-panel{position:absolute;bottom:calc(100% + 13px);left:0;right:0;border:1px solid var(--room-line);border-radius:18px;padding:15px;background:var(--form-bg,#10131b);color:var(--form-text,#fff);box-shadow:0 -10px 40px #0008;max-height:min(65vh,400px);overflow-y:auto;display:flex;flex-direction:column;gap:12px}
body.audience-chatroom .chat-identity-panel-heading{display:flex;justify-content:space-between;align-items:center;font-size:15px}
body.audience-chatroom .chat-identity-close{background:transparent;border:0;font-size:25px;color:inherit;cursor:pointer}
body.audience-chatroom .chat-identity-panel label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:inherit}
body.audience-chatroom .chat-identity-panel label small{opacity:.65;font-weight:400}
body.audience-chatroom .chat-identity-panel input,body.audience-chatroom .chat-identity-panel select{width:100%;background:color-mix(in srgb,var(--form-text,#fff) 8%,var(--form-bg,#08090d));color:var(--form-text,#fff);border:1px solid var(--room-line);border-radius:10px;min-height:46px;padding:10px;font-size:16px}
body.audience-chatroom .chat-identity-hint{font-size:11px;opacity:.67;margin:0}
body.audience-chatroom .chat-room-paused{font-size:12px;text-align:center;padding:14px;color:var(--form-text,#fff)}
:root[data-theme=light] body.audience-chatroom{background:#e7e9ed}
:root[data-theme=light] body.viewer-custom.audience-chatroom .viewer-card.chat-room-shell{box-shadow:0 3px 35px #0001}
@media(min-width:600px){body.viewer-custom.audience-chatroom .viewer-card.chat-room-shell{border-left:1px solid #fff2;border-right:1px solid #fff2}}
@media(max-width:480px){body.viewer-custom.audience-chatroom .viewer-card.chat-room-shell{border:0}body.audience-chatroom .chat-room-header{padding-top:max(12px,env(safe-area-inset-top,12px))}body.audience-chatroom .chat-room-feed{padding:15px 13px}}
@media(prefers-reduced-motion:reduce){body.audience-chatroom .chat-bubble{animation:none}}
/* v0.1.14 Form Studio preview is now a miniature version of the chat room. */
.studio-chat-card{display:flex;flex-direction:column;min-height:405px!important;gap:0;padding:12px!important}
.studio-chat-head{display:flex;align-items:center;gap:9px;border-bottom:1px solid #ffffff20;padding-bottom:12px;min-height:67px}
.studio-chat-head .studio-logo{width:32%;min-width:34px;max-width:90px;min-height:0;margin:0!important;flex:0 1 auto}
.studio-chat-head .studio-logo img{height:auto;max-height:78px;object-fit:contain}
.studio-chat-card .studio-mini-hero{flex:1;text-align:left;margin:0!important;min-width:0}
.studio-chat-card .studio-mini-hero h2{font-size:13px;line-height:1.25;margin-bottom:4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.studio-chat-card .studio-mini-hero p{font-size:9px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.studio-chat-identity{font-size:9px;opacity:.55;border-bottom:1px solid #ffffff1c;padding:6px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.studio-chat-identity span:first-child{font-weight:800}
.studio-chat-blank{flex:1;display:flex;align-items:flex-end;min-height:195px;padding:12px 0}
.studio-chat-bubble{display:flex;flex-direction:column;align-items:start;max-width:85%;gap:2px;border:1px solid #ffffff22;background:#ffffff12;border-radius:12px 12px 12px 4px;padding:9px 12px;font-size:9px}
.studio-chat-bubble strong{color:var(--form-accent,#b8fe59)}
.studio-chat-bubble small{font-weight:400;opacity:.7}
.studio-chat-composer{display:flex;align-items:center;gap:8px;background:white;color:#12151c;border-radius:100px;min-height:38px;padding:5px 9px}
.studio-chat-composer>span:first-child{font-size:18px;font-weight:800}
.studio-chat-composer .studio-chat-placeholder{font-size:10px;flex:1;opacity:.65;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.studio-chat-composer .studio-chat-arrow{font-size:19px}
.studio-chat-card .studio-mini-foot{text-align:center;font-size:9px;opacity:.5;margin:6px 0 0}
.studio-visually-hidden{position:absolute!important;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap}
body.audience-chatroom .chat-room-empty[hidden]{display:none!important}

/* v0.1.15 — centered event heading and lightweight centered identity dialog. */
body.audience-chatroom .chat-room-brand,body.audience-chatroom .chat-room-brand[data-logo-align=left],body.audience-chatroom .chat-room-brand[data-logo-align=right],body.audience-chatroom .chat-room-brand[data-logo-align=center]{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:5px}
body.viewer-custom.audience-chatroom .chat-room-logo{display:block;flex:0 1 auto;min-width:0;max-width:100%;max-height:96px!important;object-fit:contain;margin-left:auto!important;margin-right:auto!important;margin-top:0!important}
body.audience-chatroom .chat-room-title{width:100%;flex:0 1 auto;min-width:0;text-align:center}
body.audience-chatroom .chat-room-title h1,body.audience-chatroom .chat-room-title p{margin-left:auto;margin-right:auto;text-align:center}
body.audience-chatroom .chat-room-title p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;max-width:400px}
body.audience-chatroom .chat-identity-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.76);z-index:70;touch-action:none}
body.audience-chatroom .chat-identity-backdrop[hidden]{display:none!important}
body.audience-chatroom .chat-identity-panel{position:fixed;left:50%;right:auto;top:var(--identity-dialog-top,50%);bottom:auto;transform:translate(-50%,-50%);width:min(400px,calc(100vw - 32px));max-height:var(--identity-dialog-max-height,calc(100dvh - 32px));overflow-y:auto;overscroll-behavior:contain;z-index:71;box-shadow:0 22px 80px rgba(0,0,0,.65);border:1px solid var(--room-line);border-radius:19px;background:var(--form-bg,#10131b);color:var(--form-text,#fff);padding:19px;gap:15px;scrollbar-width:thin}
body.audience-chatroom .chat-identity-panel-heading strong{font-size:17px}
body.audience-chatroom .chat-identity-panel label{font-size:13px}
body.audience-chatroom .chat-identity-save{width:100%;min-height:46px;border:0;border-radius:10px;background:var(--form-accent,#b8fe59);color:#101519;font-weight:800;cursor:pointer}
body.audience-chatroom .chat-room-image-hint{line-height:1.45}
body.audience-chatroom .chat-composer-bar.is-compressing{opacity:.78}
body.audience-chatroom .chat-room-attachment span{overflow-wrap:anywhere}
body.audience-chatroom .studio-chat-head,body.audience-chatroom .studio-mini-hero{text-align:center}
.studio-chat-head{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;text-align:center!important;gap:7px!important}
.studio-chat-head .studio-logo{margin:0 auto!important}
.studio-chat-head .studio-mini-hero{width:100%;text-align:center!important}
.studio-chat-head .studio-mini-hero h2,.studio-chat-head .studio-mini-hero p{text-align:center!important}
@media(max-height:560px){body.audience-chatroom .chat-identity-panel{padding:12px;gap:8px}body.audience-chatroom .chat-identity-panel input,body.audience-chatroom .chat-identity-panel select{min-height:40px}body.audience-chatroom .chat-identity-panel label{gap:3px}}

/* Float animation retains a transform and breaks fixed dialog anchoring. Fade is safe. */
body.audience-chatroom.form-effect-float .viewer-card{animation:form-fade .6s ease-out both}

/* v0.1.16 — responsive header; logo and event heading remain visible on small screens. */
body.audience-chatroom .viewer-wrap.chat-viewer-wrap {height:var(--audience-visible-height,100dvh);max-height:100dvh;overflow:hidden}
body.audience-chatroom .chat-room-header{flex-shrink:0;min-height:0;max-height:min(37dvh,230px);overflow:hidden;gap:clamp(4px,1dvh,9px);padding: max(8px,env(safe-area-inset-top,0px)) 13px 9px;box-sizing:border-box}
body.audience-chatroom .chat-room-brand{min-height:0;gap:clamp(2px,0.6dvh,6px);overflow:hidden}
body.viewer-custom.audience-chatroom .chat-room-logo{height:auto!important;max-width:min(100%,220px)!important;max-height:clamp(36px,12dvh,98px)!important;object-fit:contain;flex-shrink:1!important}
body.audience-chatroom .chat-room-title{min-height:0;overflow:hidden}
body.viewer-custom.audience-chatroom .chat-room-title h1{font-size:clamp(14px,3.8vw,21px);line-height:1.12;margin-bottom:1px;-webkit-line-clamp:2}
body.viewer-custom.audience-chatroom .chat-room-title p{font-size:clamp(10px,2.7vw,11px);line-height:1.25}
body.audience-chatroom .chat-room-toolbar{flex:none;min-height:32px;gap:5px}
body.audience-chatroom .chat-room-bottom{flex-shrink:0}
body.audience-chatroom .chat-room-subline{min-height:17px;margin-top:3px;gap:0;justify-content:center;overflow:hidden}
body.audience-chatroom .chat-room-notice{display:block;font-size:11px;font-weight:600;text-align:center;background:transparent;color:var(--form-accent,#b8fe59);padding:0;margin:0;border:0;box-shadow:none;line-height:1.5;max-height:3em;overflow:hidden}
body.audience-chatroom .chat-room-notice.is-error{color:#ff858e;background:transparent}
body.audience-chatroom .chat-room-notice[hidden],body.audience-chatroom .chat-room-quota[hidden]{display:none!important}
body.audience-chatroom .chat-room-quota{line-height:17px}
@media(max-height:650px){body.audience-chatroom .chat-room-header{max-height:32dvh;padding-top:max(5px,env(safe-area-inset-top,0px));padding-bottom:5px;gap:4px}body.viewer-custom.audience-chatroom .chat-room-logo{max-height:clamp(24px,8dvh,60px)!important}body.viewer-custom.audience-chatroom .chat-room-title h1{font-size:clamp(13px,3vw,17px)}body.audience-chatroom .chat-room-toolbar{min-height:29px}body.audience-chatroom .chat-room-toolbar .pref-button,body.audience-chatroom .chat-toolbar-button{min-height:29px;padding:5px 8px}}
@media(max-height:440px){body.viewer-custom.audience-chatroom .chat-room-logo{max-height:clamp(18px,8dvh,30px)!important}body.viewer-custom.audience-chatroom .chat-room-title h1{-webkit-line-clamp:1}body.viewer-custom.audience-chatroom .chat-room-title p{display:none}body.audience-chatroom .chat-room-header{max-height:34dvh}body.audience-chatroom .chat-room-toolbar{min-height:27px}}


/* v0.1.17: keyboard-safe audience chat room. Pin to VisualViewport, not layout 100dvh. */
body.audience-chatroom{position:relative;overscroll-behavior:none;}
body.audience-chatroom .viewer-wrap.chat-viewer-wrap{
 position:fixed;top:var(--lc-visible-top,0px);left:0;right:0;bottom:auto;
 width:100%;max-width:480px;margin:0 auto;
 height:var(--lc-visible-height,100dvh)!important;max-height:none!important;
 min-height:0;overflow:hidden;overscroll-behavior:none;
}
body.audience-chatroom .chat-room-feed{min-height:0;-webkit-overflow-scrolling:touch;touch-action:pan-y}
body.audience-chatroom .chat-room-bottom{min-width:0;}
body.audience-chatroom.lc-keyboard-open .chat-room-header{
 padding:4px 12px 5px!important;max-height:min(31%,96px)!important;
 gap:2px!important;
}
body.audience-chatroom.lc-keyboard-open .chat-room-brand{gap:1px!important;}
body.viewer-custom.audience-chatroom.lc-keyboard-open .chat-room-logo{max-height:27px!important;max-width:130px!important;}
body.viewer-custom.audience-chatroom.lc-keyboard-open .chat-room-title h1{font-size:13px!important;line-height:1.08;-webkit-line-clamp:1!important;margin:0!important;}
body.viewer-custom.audience-chatroom.lc-keyboard-open .chat-room-title p{display:none!important;}
body.audience-chatroom.lc-keyboard-open .chat-room-toolbar{min-height:25px!important;}
body.audience-chatroom.lc-keyboard-open .chat-toolbar-button,
body.audience-chatroom.lc-keyboard-open .chat-room-toolbar .pref-button{min-height:25px!important;padding:3px 8px!important;font-size:10px;}
body.audience-chatroom.lc-keyboard-open .chat-room-feed{padding:6px 11px 8px!important;}
body.audience-chatroom.lc-keyboard-open .chat-room-bottom{padding:5px 9px 6px!important;}
body.audience-chatroom.lc-keyboard-open .chat-composer-bar{min-height:47px;padding:2px 5px;}
body.audience-chatroom.lc-keyboard-open .chat-camera,body.audience-chatroom.lc-keyboard-open .chat-send-button{height:40px;width:40px;}
body.audience-chatroom.lc-keyboard-open .chat-message-input{height:38px;}
body.audience-chatroom.lc-keyboard-open .chat-room-subline{display:none!important;}

/* Compact identity popup when the keyboard is open; preserve a reachable Save action. */
body.audience-chatroom.lc-keyboard-open .chat-identity-panel{
 padding:10px 13px!important;gap:6px!important;
}
body.audience-chatroom.lc-keyboard-open .chat-identity-panel-heading strong{font-size:14px!important;}
body.audience-chatroom.lc-keyboard-open .chat-identity-panel label{gap:2px!important;font-size:11px!important;}
body.audience-chatroom.lc-keyboard-open .chat-identity-panel input,
body.audience-chatroom.lc-keyboard-open .chat-identity-panel select{min-height:38px!important;height:38px!important;padding:7px 10px!important;}
body.audience-chatroom.lc-keyboard-open .chat-identity-hint{display:none!important;}
body.audience-chatroom.lc-keyboard-open .chat-identity-save{position:sticky;bottom:0;z-index:2;min-height:42px!important;}


/* v0.1.18 — compact chat-first header, real logo control, and image viewer.
   The saved logo width is respected; height still adapts to short phones. */
body.audience-chatroom .chat-room-header{
 position:relative;flex:0 1 auto;max-height:min(33dvh,250px);
 padding:8px 11px 9px!important;gap:0!important;overflow:hidden;
}
body.audience-chatroom .chat-room-brand,
body.audience-chatroom .chat-room-brand[data-logo-align=left],
body.audience-chatroom .chat-room-brand[data-logo-align=right],
body.audience-chatroom .chat-room-brand[data-logo-align=center]{
 width:100%;max-width:100%;padding:0 37px;gap:4px!important;
 align-items:center;justify-content:center;flex-direction:column;
}
body.viewer-custom.audience-chatroom .chat-room-logo{
 box-sizing:border-box;display:block;flex:0 1 auto;
 width:min(var(--lc-logo-width,160px),100%)!important;
 min-width:0;max-width:100%!important;height:auto!important;
 max-height:min(23dvh,180px)!important;
 margin:0 auto var(--lc-logo-space,4px)!important;
 border-radius:var(--lc-logo-radius,0px);
 object-fit:contain;
}
body.audience-chatroom .chat-room-title{flex:0 1 auto;max-width:100%;overflow:hidden;}
body.viewer-custom.audience-chatroom .chat-room-title h1{font-size:clamp(14px,4.1vw,20px);line-height:1.13;margin:0 0 2px;}
body.viewer-custom.audience-chatroom .chat-room-title p{font-size:11px;line-height:1.27;}
/* Profile is now a single icon on top right rather than a full second row. */
body.audience-chatroom .chat-room-toolbar{position:absolute;top:8px;right:9px;z-index:5;display:flex;min-height:0!important;margin:0;}
body.audience-chatroom .chat-toolbar-button{width:35px;height:35px;min-width:35px;min-height:35px!important;
 max-width:none;border-radius:50%;padding:0!important;display:grid;place-items:center;}
body.audience-chatroom .chat-toolbar-button svg{width:19px;height:19px;}
body.audience-chatroom .chat-identity-label{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
body.audience-chatroom .chat-room-feed{padding-top:9px;padding-bottom:10px;}
body.audience-chatroom .chat-room-list{gap:9px;}
/* The preview is scaled like a small phone: logo tracks actual width slider. */
.studio-chat-head{position:relative;padding:7px 30px 8px!important;min-height:0!important;gap:3px!important;}
.studio-chat-head .studio-logo{width:100%!important;max-width:100%!important;min-width:0!important;flex:0 1 auto;justify-content:center!important;margin-bottom:var(--studio-logo-space,0px)!important;}
.studio-chat-head .studio-logo img{width:var(--studio-logo-width,100px)!important;max-width:100%!important;max-height:115px!important;height:auto;object-fit:contain;}
.studio-chat-head .studio-mini-hero{flex:none!important;min-width:0!important;}
.studio-chat-head .studio-mini-hero h2{font-size:12px;margin:0 0 2px;}
.studio-chat-head .studio-mini-hero p{font-size:9px;}
.studio-chat-avatar{position:absolute;right:2px;top:4px;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;border:1px solid #ffffff33;font-size:15px;}
.studio-preview-identity-data{display:none!important;}
body.audience-chatroom.lc-keyboard-open .chat-room-header{max-height:min(29%,88px)!important;padding:3px 9px 4px!important;}
body.audience-chatroom.lc-keyboard-open .chat-room-brand{padding:0 33px;gap:1px!important;}
body.viewer-custom.audience-chatroom.lc-keyboard-open .chat-room-logo{max-height:24px!important;max-width:100%!important;}
body.audience-chatroom.lc-keyboard-open .chat-room-toolbar{top:3px;right:7px;}
body.audience-chatroom.lc-keyboard-open .chat-toolbar-button{width:30px;height:30px;min-width:30px;min-height:30px!important;}
@media(max-height:500px){body.viewer-custom.audience-chatroom:not(.lc-keyboard-open) .chat-room-logo{max-height:min(15dvh,72px)!important;}body.audience-chatroom .chat-room-header{max-height:30dvh;}}
@media(max-width:350px){body.audience-chatroom .chat-room-brand{padding:0 33px;}body.audience-chatroom .chat-room-header{padding-left:6px!important;padding-right:6px!important;}}


/* v0.1.20 — live room logo controls match saved Form Studio values.
   Full-size room uses actual px settings (preview is a scaled model).
   Increase height budget so logo width + bottom spacing aren't clipped. */
body.audience-chatroom:not(.lc-keyboard-open) .chat-room-header {
 max-height:min(60dvh,430px)!important;
 flex:0 1 auto;
 overflow:hidden;
}
body.audience-chatroom:not(.lc-keyboard-open) .chat-room-brand{
 gap:4px!important;
 overflow:visible;
}
body.viewer-custom.audience-chatroom:not(.lc-keyboard-open) .chat-room-logo{
 display:block;
 width:min(var(--lc-logo-width,160px),100%)!important;
 max-width:100%!important;
 max-height:min(39dvh,290px)!important;
 height:auto!important;
 margin:0 auto var(--lc-logo-space,20px)!important;
 object-fit:contain;
 flex-shrink:0!important;
}
/* On very short screens, prioritize the send bar and preserve a small header. */
@media(max-height:520px){
 body.audience-chatroom:not(.lc-keyboard-open) .chat-room-header{max-height:52dvh!important}
 body.viewer-custom.audience-chatroom:not(.lc-keyboard-open) .chat-room-logo{
  max-height:min(28dvh,155px)!important;
  margin-bottom:min(var(--lc-logo-space,20px),24px)!important;
 }
}


/* v0.1.21 — compact actual audience header, not just the preview. One source
   of spacing: row gap between image and title (avoid an extra image margin).
   Legacy >24px gaps are normalized to 8px by DB migration; new control 0..24px. */
body.audience-chatroom:not(.lc-keyboard-open) .chat-room-header{
 max-height:min(33dvh,190px)!important;
 flex:0 0 auto!important;
 padding:6px 10px 7px!important;
 overflow:hidden!important;
}
body.audience-chatroom:not(.lc-keyboard-open) .chat-room-brand{
 display:flex!important;flex-direction:column!important;
 align-items:center!important;justify-content:center!important;
 row-gap:var(--lc-logo-space,8px)!important;
 column-gap:0!important;
 padding:0 37px!important;
}
body.viewer-custom.audience-chatroom:not(.lc-keyboard-open) .chat-room-logo{
 width:min(var(--lc-logo-width,160px),100%)!important;
 max-width:100%!important;
 max-height:min(16dvh,108px)!important;
 height:auto!important;
 margin:0 auto!important;
 flex-shrink:1!important;
 object-fit:contain;
}
body.audience-chatroom:not(.lc-keyboard-open) .chat-room-title{
 flex:0 0 auto!important;text-align:center!important;
 margin:0!important;padding:0!important;
}
body.audience-chatroom:not(.lc-keyboard-open) .chat-room-title h1{margin:0 0 2px!important;}
body.audience-chatroom:not(.lc-keyboard-open) .chat-room-title p{margin:0!important;}
/* Mini-preview must scale the same gap as actual room, with no double margin. */
.studio-chat-head{row-gap:var(--studio-logo-space,0px)!important;}
.studio-chat-head .studio-logo{margin-bottom:0!important;}
@media(max-height:500px){
 body.audience-chatroom:not(.lc-keyboard-open) .chat-room-header{max-height:31dvh!important;}
 body.viewer-custom.audience-chatroom:not(.lc-keyboard-open) .chat-room-logo{max-height:min(12dvh,66px)!important;}
}

/* v0.1.23: verified channel owner and platform staff labels. */
.chat-verified,.overlay-verified{display:inline-flex;align-items:center;gap:3px;margin-left:5px;white-space:nowrap;font-weight:800;font-size:.79em;vertical-align:middle}
.chat-verified[data-badge=host],.overlay-verified[data-badge=host]{color:#f3c34d}
.chat-verified[data-badge=verified],.overlay-verified[data-badge=verified]{color:#4da3ff}
.broadcast-modal[hidden]{display:none!important}
.broadcast-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px}
.broadcast-dim{position:absolute;inset:0;background:rgba(0,0,0,.78)}
.broadcast-dialog{position:relative;z-index:1;background:var(--panel);color:var(--txt);border:1px solid var(--line);border-radius:18px;padding:clamp(18px,5vw,30px);width:min(440px,100%);max-height:min(82dvh,660px);overflow-y:auto;box-shadow:0 16px 60px #0007}
.broadcast-dialog h2{overflow-wrap:anywhere;font-size:23px}
.broadcast-dialog [data-broadcast-content]{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6;max-height:45vh;overflow-y:auto}
.broadcast-dialog .broadcast-symbol{font-size:32px;color:var(--accent);margin-bottom:12px}
.broadcast-dialog .button{width:100%}
.broadcast-table-body{max-width:400px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:100px;overflow:hidden;margin:6px 0 0}

.broadcast-history{margin-top:18px}
