/* Sable TV 4.0 responsive inline player */
.sfc-tv-widget{background:#07152f;color:white;overflow:hidden;border-radius:16px;border:1px solid #2d4f7d;font-family:system-ui,-apple-system,sans-serif;width:100%;box-sizing:border-box}.sfc-tv-topline{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 13px;background:#0d2c57;color:#d9e5f7;font-size:11px}.sfc-tv-status{color:#ffdc37;font-weight:850}.sfc-tv-matchbar{text-align:center;background:#0b2752;padding:8px 10px;display:grid;gap:3px}.sfc-tv-teams{display:flex;align-items:center;justify-content:center;gap:10px;font-size:12px}.sfc-tv-teams img{width:23px;height:23px;object-fit:contain}.sfc-tv-matchbar small{color:#b9cfe8;font-size:10px}.sfc-tv-count{font-variant-numeric:tabular-nums;font-weight:850;font-size:13px;letter-spacing:.04em;color:#ffda42;min-height:14px}.sfc-tv-screen{position:relative;aspect-ratio:16/9;background:#020817;overflow:hidden}.sfc-tv-screen video,.sfc-tv-screen iframe{width:100%;height:100%;display:block;border:0;position:absolute;inset:0;background:#000;object-fit:contain}.sfc-tv-standby{height:100%;width:100%;background:radial-gradient(circle at 50% 20%,#174d96,#06132f 70%);background-size:cover;background-position:center;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:15px;box-sizing:border-box}.sfc-tv-standby span{color:#ffdb40;font-size:11px;font-weight:850}.sfc-tv-standby strong{font-size:clamp(18px,2vw,31px);margin:8px 0}.sfc-tv-standby p{font-size:12px;margin:0}.sfc-tv-standby small{margin-top:8px;color:#bed0e9;font-size:10px}.sfc-tv-spinner{position:absolute;bottom:38px;left:8px;right:8px;pointer-events:none;text-align:center;font-size:11px;color:white;text-shadow:0 1px 3px black}.sfc-tv-spinner:empty{display:none}.sfc-tv-under{padding:10px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px}.sfc-tv-under a{color:#c8e0ff;text-decoration:none}.sfc-tv-under .sfc-tv-open{background:#ffdc38;color:#061329;font-size:11px;font-weight:850;border-radius:8px;padding:10px 12px}.sfc-tv-widget-full .sfc-tv-teams{font-size:17px}.sfc-tv-widget-full .sfc-tv-teams img{width:35px;height:35px}.sfc-tv-widget-full .sfc-tv-matchbar{padding:13px}.sfc-tv-widget-full .sfc-tv-count{font-size:17px}.sfc-watch-page{background:#071328;color:#fff;font-family:system-ui,-apple-system,sans-serif;margin:0}.sfc-watch-head{padding:15px max(18px,calc((100vw - 1000px)/2));background:#073a97;display:flex;justify-content:space-between;gap:15px;font-weight:800;font-size:12px}.sfc-watch-head a{color:white;text-decoration:none}.sfc-watch-wrap{max-width:1000px;margin:auto;padding:24px 15px 70px}.sfc-watch-wrap>p{color:#c3d4eb}.sfc-tv-chat{margin-top:24px;background:white;border-radius:16px;padding:18px;color:#122645}.sfc-tv-chat-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.sfc-tv-chat-head h2{font-size:18px;margin:0}.sfc-tv-chat-head span{font-size:11px;color:#58718e}.sfc-tv-chat-feed{height:260px;overflow-y:auto;border:1px solid #d8e1ec;border-radius:10px;margin:13px 0;padding:12px;background:#f5f8fc;display:flex;flex-direction:column;gap:9px}.sfc-tv-comment{padding:9px 11px;background:white;border-radius:9px;border:1px solid #e2e8ef}.sfc-tv-comment b{color:#073a97;margin-right:8px}.sfc-tv-comment small{color:#667790}.sfc-tv-comment p{margin:5px 0 0;overflow-wrap:anywhere;font-size:13px}.sfc-tv-chat form{display:grid;gap:8px}.sfc-tv-chat label{font-size:12px;font-weight:800;color:#12385e}.sfc-tv-chat input,.sfc-tv-chat textarea{width:100%;max-width:100%;box-sizing:border-box;padding:10px;border:1px solid #b6c8de;border-radius:8px;background:white;color:#13253d;font:inherit}.sfc-tv-chat button{border:0;border-radius:8px;background:#f8cf24;color:#091c35;padding:11px 16px;cursor:pointer;font-weight:850;width:max-content}.sfc-tv-chat form small{color:#4a617d}.sfc-watch-notice{font-size:12px;line-height:1.5}@media(max-width:600px){.sfc-watch-head{padding:12px}.sfc-watch-head span{display:none}.sfc-tv-chat-head{display:block}.sfc-tv-widget-full .sfc-tv-teams{font-size:12px}.sfc-tv-widget-full .sfc-tv-count{font-size:14px}}
/* v4.0.1 : bouton de lecture adapté au mini-lecteur et au mobile. */
.sfc-tv-play-button{position:absolute;z-index:3;top:50%;left:50%;transform:translate(-50%,-50%);background:#ffda32;border:0;border-radius:9px;padding:12px 16px;color:#051a37;font:800 12px/1.3 system-ui,-apple-system,sans-serif;cursor:pointer;white-space:nowrap;box-shadow:0 4px 20px rgba(0,0,0,.48)}
.sfc-tv-play-button:hover,.sfc-tv-play-button:focus-visible{background:#ffe873;outline:2px solid #fff;outline-offset:2px}
.sfc-tv-play-button[hidden]{display:none!important}
.sfc-tv-spinner{z-index:2;bottom:7px;padding:3px 5px;background:rgba(2,12,31,.72);border-radius:6px;pointer-events:none}

/* v4.2 — video remains visible when the on-screen keyboard opens */
.sfc-tv-playtools{position:absolute;right:10px;bottom:11px;z-index:5;display:flex;gap:7px;align-items:center}.sfc-tv-playtools button{background:rgba(5,20,44,.8);color:#fff;border:1px solid rgba(255,255,255,.45);border-radius:7px;padding:8px 10px;font-size:11px;font-weight:750;cursor:pointer}.sfc-tv-playtools button[hidden]{display:none!important}.sfc-tv-playtools button:focus-visible{outline:3px solid #f9d22b}
.sfc-live-stage{position:sticky;top:0;z-index:40;background:#06152b;padding-bottom:3px}.sfc-watch-page .sfc-tv-widget-full{box-shadow:0 6px 24px #0004}.sfc-tv-chat{position:relative;margin-top:10px!important}.sfc-tv-chat-ticker{background:#082b58;color:#fff;border-radius:10px;padding:10px 12px;max-height:118px;overflow:hidden;font-size:12px}.sfc-tv-chat-ticker>span{font-weight:900;color:#f7d232;font-size:11px}.sfc-tv-chat-line{margin-top:6px;line-height:1.45;overflow-wrap:anywhere}.sfc-tv-chat-line strong{color:#ffde42}.sfc-tv-chat form{display:flex!important;align-items:center;flex-wrap:wrap;gap:8px!important;position:sticky;bottom:0;background:#fff;padding:8px 0;z-index:42}.sfc-tv-chat form label{display:none}.sfc-tv-chat form input[name=message]{min-width:150px;flex:1;border-radius:30px;padding:12px 16px;font-size:16px!important}.sfc-tv-chat form input[name=name]{width:130px;flex:none;border-radius:30px;font-size:14px}.sfc-tv-chat form button{border-radius:24px}.sfc-tv-chat form small{width:100%;font-size:11px}.sfc-tv-chat-feed{height:200px}.sfc-tv-screen{min-height:130px}
@media(max-width:650px){.sfc-watch-head{display:none!important}.sfc-watch-wrap{padding:5px 6px 70px!important}.sfc-watch-wrap>h1,.sfc-watch-wrap>p:first-of-type{display:none}.sfc-tv-widget-full{border-radius:9px}.sfc-tv-chat{padding:8px!important}.sfc-tv-chat-head h2{font-size:14px}.sfc-tv-chat-feed{height:120px;margin:6px 0}.sfc-tv-chat form{gap:5px!important}.sfc-tv-chat form input[name=name]{width:92px;font-size:12px!important}.sfc-tv-chat form button{padding:12px 10px}.sfc-chat-typing .sfc-tv-chat-feed{height:85px}.sfc-chat-typing .sfc-tv-topline{padding:4px 8px}.sfc-chat-typing .sfc-tv-matchbar{padding:5px}.sfc-tv-chat-head>span{display:none}}
@media(orientation:landscape) and (max-height:650px){body.sfc-landscape-tv:not(.sfc-chat-typing) .sfc-live-stage{position:relative;z-index:50}body.sfc-landscape-tv .sfc-watch-wrap{padding:0!important;max-width:none}body.sfc-landscape-tv:not(.sfc-chat-typing) .sfc-tv-widget-full{border-radius:0}body.sfc-landscape-tv:not(.sfc-chat-typing) .sfc-tv-screen{height:calc(100dvh - 70px);aspect-ratio:auto}body.sfc-landscape-tv:not(.sfc-chat-typing) .sfc-tv-under{display:none}}
@media(prefers-reduced-motion:reduce){.sfc-tv-comment{animation:none!important}}

/* v4.2.1 — Accueil: aperçu video épuré sans barre de progression ni bouton son superposé. */
.sfc-tv-widget-mini .sfc-tv-native-video::-webkit-media-controls,
.sfc-tv-widget-mini .sfc-tv-native-video::-webkit-media-controls-enclosure { display:none!important; }
.sfc-tv-widget-mini .sfc-tv-playtools { right:auto;left:50%;bottom:auto;top:50%;transform:translate(-50%,-50%); }
.sfc-tv-widget-mini .sfc-tv-playtools:has(button[hidden]) { display:none; }

/* Sable TV v4.3: commentaires ouverts/fermés et réactions emoji */
.sfc-tv-chat-state{background:#e9f8ee;color:#115632;border-radius:9px;padding:9px 11px;margin-top:10px;font-size:12px;font-weight:800}
.sfc-tv-chat-state.sfc-tv-chat-closed{background:#eef1f6;color:#495a71}
.sfc-tv-emoji-bar{display:flex;gap:3px;overflow-x:auto;flex:1 0 100%;max-width:100%;padding:6px 0;scrollbar-width:thin;align-items:center}
.sfc-tv-emoji-bar[hidden]{display:none!important}
.sfc-tv-emoji-bar .sfc-tv-emoji{border:1px solid #e0e9f6!important;background:#f3f7fc!important;color:#172f50!important;min-width:36px;width:36px;height:35px;padding:0!important;margin:0!important;font-size:22px!important;line-height:1;flex:none;border-radius:9px!important;cursor:pointer}
.sfc-tv-emoji-bar .sfc-tv-emoji:hover{background:#ffeaa0!important}
.sfc-tv-honeypot{position:absolute!important;left:-99999px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.sfc-tv-chat form input:disabled,.sfc-tv-chat form button:disabled{opacity:.55;cursor:not-allowed}

/* v4.6 — Preview: custom hover/touch controls only, plus fullscreen button. */
.sfc-tv-widget-mini .sfc-tv-native-video{pointer-events:none!important;}
.sfc-tv-widget-mini video::-webkit-media-controls,
.sfc-tv-widget-mini video::-webkit-media-controls-panel,
.sfc-tv-widget-mini video::-webkit-media-controls-enclosure,
.sfc-tv-widget-mini video::-webkit-media-controls-current-time-display,
.sfc-tv-widget-mini video::-webkit-media-controls-time-remaining-display,
.sfc-tv-widget-mini video::-webkit-media-controls-timeline,
.sfc-tv-widget-mini video::-webkit-media-controls-play-button,
.sfc-tv-widget-mini video::-webkit-media-controls-fullscreen-button,
.sfc-tv-widget-mini video::-webkit-media-controls-volume-slider,
.sfc-tv-widget-mini video::-webkit-media-controls-mute-button{display:none!important;opacity:0!important;}
.sfc-tv-widget-mini .sfc-tv-playtools{right:auto;left:50%;bottom:auto;top:50%;transform:translate(-50%,-50%);}
.sfc-tv-widget-mini .sfc-tv-playtools:has(button[hidden]){display:none;}
.sfc-tv-widget-mini .sfc-tv-mini-actions{position:absolute;z-index:8;right:10px;bottom:10px;display:flex;gap:8px;opacity:0;visibility:hidden;transform:translateY(6px);transition:opacity .18s ease,visibility .18s ease,transform .18s ease;pointer-events:none;}
.sfc-tv-widget-mini .sfc-tv-mini-actions.is-visible,
.sfc-tv-widget-mini .sfc-tv-screen:hover .sfc-tv-mini-actions,
.sfc-tv-widget-mini .sfc-tv-screen:focus-within .sfc-tv-mini-actions{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto;}
.sfc-tv-widget-mini .sfc-tv-mini-btn{border:1px solid rgba(255,255,255,.6);background:rgba(2,14,34,.82);border-radius:8px;min-width:38px;height:34px;padding:0 10px;color:white;font:16px/1 system-ui;cursor:pointer;display:grid;place-items:center;box-shadow:0 6px 18px rgba(0,0,0,.28)}
.sfc-tv-widget-mini .sfc-tv-mini-btn:focus-visible{outline:3px solid #f9d22b}
@media(hover:none){.sfc-tv-widget-mini .sfc-tv-mini-actions{opacity:0;visibility:hidden;pointer-events:none;}}
.sfc-tv-widget-mini .sfc-tv-spinner{bottom:6px;left:8px;right:8px;}

.sfc-tv-topline{display:flex;gap:9px;flex-wrap:wrap;justify-content:space-between;align-items:center}.sfc-tv-viewers{display:inline-flex;align-items:center;white-space:nowrap;font-size:10px;color:#e3f2ff;font-weight:800;background:#214979;border-radius:20px;padding:3px 7px}

/* SABLE TV 4.7 — same discreet controls on accueil and the full Sable TV page. */
.sfc-tv-widget-full .sfc-tv-native-video{pointer-events:none}
.sfc-tv-widget-full video::-webkit-media-controls,
.sfc-tv-widget-full video::-webkit-media-controls-panel,
.sfc-tv-widget-full video::-webkit-media-controls-enclosure,
.sfc-tv-widget-full video::-webkit-media-controls-current-time-display,
.sfc-tv-widget-full video::-webkit-media-controls-time-remaining-display,
.sfc-tv-widget-full video::-webkit-media-controls-timeline{display:none!important;opacity:0!important}
.sfc-tv-widget-full .sfc-tv-mini-actions{position:absolute;z-index:8;right:12px;bottom:12px;display:flex;gap:8px;opacity:0;visibility:hidden;transform:translateY(5px);transition:opacity .18s,transform .18s,visibility .18s;pointer-events:none}
.sfc-tv-widget-full .sfc-tv-mini-actions.is-visible,
.sfc-tv-widget-full .sfc-tv-screen:hover .sfc-tv-mini-actions,
.sfc-tv-widget-full .sfc-tv-screen:focus-within .sfc-tv-mini-actions{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}
.sfc-tv-widget-full .sfc-tv-mini-btn{border:1px solid #ffffff90;border-radius:8px;background:rgba(2,14,34,.85);color:#fff;min-width:38px;height:34px;display:grid;place-items:center;font:16px system-ui;cursor:pointer}
@media(hover:none){.sfc-tv-widget-full .sfc-tv-mini-actions{opacity:0;visibility:hidden;pointer-events:none}}
/* The native timebar and permanent volume button are never rendered in full HLS mode. */

/* v5.4 : direct visible, chat latéral sur ordinateur, lecture + messages simultanés sur mobile */
.sfc-watch-page,.sfc-watch-page main,.sfc-watch-page section{box-sizing:border-box}
.sfc-watch-wrap{max-width:1480px!important;padding:14px 16px 35px!important}
.sfc-watch-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,365px);align-items:start;gap:14px;min-width:0}
.sfc-watch-layout .sfc-live-stage{position:sticky!important;top:12px;min-width:0;z-index:20!important;padding-bottom:0}
.sfc-watch-layout .sfc-tv-chat{display:flex;flex-direction:column;min-width:0;margin:0!important;height:min(790px,calc(100dvh - 26px));background:#fff;border:1px solid #314a6b;border-radius:13px;padding:12px!important;color:#122645;overflow:hidden}
.sfc-watch-layout .sfc-tv-chat-ticker{display:none}
.sfc-watch-layout .sfc-tv-chat-head{flex:none;display:flex!important;align-items:center;gap:6px;justify-content:space-between}
.sfc-watch-layout .sfc-tv-chat-head h2{font-size:16px;margin:0;color:#122645}
.sfc-watch-layout .sfc-tv-chat-feed{flex:1 1 auto;min-height:100px;height:auto!important;overflow-y:auto;overscroll-behavior:contain;padding:10px!important;margin:9px 0 5px!important;background:#f2f5fa;color:#14253e;scroll-behavior:smooth;display:flex;flex-direction:column;gap:7px}
.sfc-watch-layout .sfc-tv-comment{flex:none;padding:8px 10px;border:1px solid #dbe3ef;border-radius:11px;background:white;color:#1a2c43;overflow-wrap:anywhere;animation:sfcChatPop .16s ease-out}
.sfc-watch-layout .sfc-tv-comment p{font:400 13px/1.4 system-ui,-apple-system,sans-serif;color:#1b304b;margin:4px 0}
.sfc-watch-layout .sfc-tv-comment b{font-size:12px;color:#073a97}
.sfc-watch-layout .sfc-tv-comment small{font-size:10px}
.sfc-watch-layout .sfc-tv-comment.sfc-tv-comment--pending{opacity:.65}
.sfc-watch-layout .sfc-tv-comment.sfc-tv-comment--failed{border-color:#e35a5a}
.sfc-watch-layout .sfc-tv-reply-link{font-size:11px!important;background:transparent!important;color:#1956ab!important;padding:2px 0!important;border:0;cursor:pointer;font-weight:700}
.sfc-watch-layout .sfc-tv-replying{width:100%;display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:11px;padding:5px 8px;border-radius:8px;background:#e9effa;color:#133b69}
.sfc-watch-layout .sfc-tv-replying[hidden]{display:none!important}
.sfc-watch-layout .sfc-tv-replying button{width:auto!important;min-width:25px;border-radius:7px;padding:3px!important;background:#dce7fa!important;color:#11375d!important}
.sfc-watch-layout .sfc-tv-typing-indicator{min-height:20px;flex:none;padding:2px 9px;color:#416085;font-size:11px;font-style:italic}
.sfc-watch-layout .sfc-tv-chat-state{padding:5px 9px;margin:3px 0;font-size:10px;flex:none}
.sfc-watch-layout .sfc-tv-chat form{position:relative!important;bottom:auto!important;display:grid!important;grid-template-columns:minmax(70px,92px) minmax(0,1fr) auto;align-items:center;gap:6px!important;margin:0;padding:7px 0 1px!important;flex:none;z-index:2}
.sfc-watch-layout .sfc-tv-chat form input[name=name]{width:100%!important;min-width:0!important;font-size:12px!important;padding:10px 8px!important;color:#14283f!important}
.sfc-watch-layout .sfc-tv-chat form input[name=message]{min-width:0!important;width:100%;font-size:14px!important;padding:10px 11px!important;color:#14283f!important}
.sfc-watch-layout .sfc-tv-chat form button[type=submit]{padding:10px!important;width:auto;font-size:11px;white-space:nowrap;margin:0}
.sfc-watch-layout .sfc-tv-emoji-bar{grid-column:1/-1;order:2;flex:none;overflow-x:auto;min-height:35px;max-height:38px;padding:2px!important}
.sfc-watch-layout .sfc-tv-emoji-bar .sfc-tv-emoji{width:30px!important;height:30px!important;min-width:30px!important;font-size:19px!important}
.sfc-watch-layout .sfc-tv-chat form small{order:3;grid-column:1/-1;font-size:10px;color:#506786;line-height:1.2}
.sfc-watch-layout .sfc-tv-replying{order:1;grid-column:1/-1}
.sfc-watch-layout .sfc-tv-honeypot{position:absolute!important;left:-99999px!important}
@keyframes sfcChatPop{from{transform:translateY(5px);opacity:.7}to{transform:none;opacity:1}}
@media(max-width:850px){
 .sfc-watch-page .sfc-watch-wrap{padding:0 0 12px!important;width:100%;max-width:none!important}
 .sfc-watch-layout{display:flex;flex-direction:column;gap:0;min-width:0}
 .sfc-watch-layout .sfc-live-stage{position:sticky!important;top:0!important;width:100%;z-index:60!important;background:#06152b}
 .sfc-watch-layout .sfc-tv-widget-full{border-radius:0!important}
 .sfc-watch-layout .sfc-tv-widget-full .sfc-tv-screen{aspect-ratio:16/9!important;min-height:0!important;height:auto!important}
 .sfc-watch-layout .sfc-tv-chat{width:100%;height:calc(100dvh - min(58vw,450px) - 82px);min-height:190px;max-height:none;margin:0!important;border:0;border-radius:0;padding:6px 8px!important}
 .sfc-watch-layout .sfc-tv-chat-feed{height:auto!important;min-height:55px;margin:4px 0!important;padding:6px!important}
 .sfc-watch-layout .sfc-tv-chat-head h2{font-size:13px!important}
 .sfc-watch-layout .sfc-tv-chat-head>span{display:none}
 .sfc-watch-layout .sfc-tv-emoji-bar{max-height:34px;min-height:30px}
 .sfc-watch-layout .sfc-tv-emoji-bar .sfc-tv-emoji{height:27px!important;width:28px!important;min-width:28px!important;font-size:18px!important}
 .sfc-watch-layout .sfc-tv-chat form{grid-template-columns:minmax(60px,82px) minmax(0,1fr) auto;gap:4px!important;padding:4px 0 1px!important}
 .sfc-watch-layout .sfc-tv-chat form input[name=message]{font-size:16px!important;padding:9px 10px!important}
 .sfc-watch-layout .sfc-tv-chat form input[name=name]{font-size:12px!important;padding:9px 7px!important}
 .sfc-watch-layout .sfc-tv-chat form button[type=submit]{font-size:11px!important;padding:10px 9px!important}
 .sfc-watch-layout .sfc-tv-chat form small{font-size:10px}
 .sfc-watch-layout .sfc-tv-comment{padding:6px 8px}
}
@media(orientation:landscape) and (max-height:650px){
 body.sfc-landscape-tv.sfc-chat-typing .sfc-watch-layout{display:flex!important}
 body.sfc-landscape-tv.sfc-chat-typing .sfc-live-stage{position:sticky!important;top:0!important}
 body.sfc-landscape-tv:not(.sfc-chat-typing) .sfc-watch-layout .sfc-tv-chat{display:none}
}
@media(prefers-reduced-motion:reduce){.sfc-watch-layout .sfc-tv-comment{animation:none}.sfc-watch-layout .sfc-tv-chat-feed{scroll-behavior:auto}}


/* v5.7 — live page polish: fixed language header, no reopen button on live page, mobile overlay chat like short-video lives */
:root{--sfc-keyboard-offset:0px;--sfc-live-header-height:68px}
.sfc-watch-head{position:sticky;top:0;z-index:95;min-height:var(--sfc-live-header-height)}
.sfc-watch-head-fixed{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;box-shadow:0 10px 26px rgba(0,0,0,.16)}
.sfc-watch-head-fixed .sfc-watch-head-tools{display:flex;align-items:center;gap:10px;justify-self:end}
.sfc-watch-language{display:inline-flex;align-items:center;gap:8px;background:#0b2752;border:1px solid rgba(255,255,255,.15);padding:8px 10px;border-radius:12px;color:#dfeaf9;font-size:12px;font-weight:800}
.sfc-watch-language span{white-space:nowrap}
.sfc-watch-language select{border:0;background:transparent;color:#fff;font:inherit;min-width:110px;outline:none}
.sfc-watch-language option{color:#111}
.sfc-tv-widget-full .sfc-tv-under{display:none!important}
.sfc-watch-wrap{padding-top:18px!important}
.sfc-watch-layout .sfc-tv-chat-head h2{line-height:1.15}
.sfc-watch-layout .sfc-tv-chat form{padding-bottom:max(1px,env(safe-area-inset-bottom))!important}
.sfc-watch-layout .sfc-tv-chat-feed{scroll-padding-bottom:80px}
.sfc-watch-layout .sfc-tv-comment p{white-space:pre-wrap}
.sfc-watch-layout .sfc-tv-chat{box-shadow:0 16px 45px rgba(0,0,0,.17)}
.sfc-watch-layout .sfc-tv-chat form input[name=message]{border-radius:22px}
.sfc-watch-layout .sfc-tv-chat form input[name=name]{border-radius:18px}
.sfc-watch-layout .sfc-tv-emoji-bar .sfc-tv-emoji[data-kind="sticker"]{width:auto!important;min-width:max-content!important;padding:0 10px!important;font-size:12px!important;font-weight:900;line-height:30px;background:#fff5c8!important;border-color:#f1d55f!important;border-radius:999px!important}
@media(max-width:980px){
 .sfc-watch-head-fixed{grid-template-columns:auto 1fr auto}
 .sfc-watch-head-fixed>span{font-size:11px}
}
@media(max-width:850px){
 :root{--sfc-live-header-height:58px}
 .sfc-watch-head{display:grid!important;padding:10px 10px!important}
 .sfc-watch-head-fixed>span{display:block!important;text-align:center;font-size:10px}
 .sfc-watch-head-fixed .sfc-watch-head-tools{justify-self:end}
 .sfc-watch-language{padding:6px 8px;font-size:11px}
 .sfc-watch-language span{display:none}
 .sfc-watch-language select{min-width:92px}
 .sfc-watch-page .sfc-watch-wrap{padding:0 0 calc(43vh + 14px)!important}
 .sfc-watch-layout{display:block!important}
 .sfc-watch-layout .sfc-live-stage{top:var(--sfc-live-header-height)!important;z-index:50!important}
 .sfc-watch-layout .sfc-tv-chat{position:fixed!important;left:0;right:0;bottom:0;transform:translateY(calc(-1 * var(--sfc-keyboard-offset)));height:min(43vh,360px)!important;min-height:220px;max-height:68vh;z-index:80!important;background:rgba(255,255,255,.985)!important;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-top:1px solid #d6e0ec!important;border-radius:18px 18px 0 0!important;box-shadow:0 -18px 46px rgba(0,0,0,.22)!important;padding:8px 10px 6px!important}
 .sfc-watch-layout .sfc-tv-chat::before{content:"";display:block;width:52px;height:5px;border-radius:999px;background:#cad7e8;margin:0 auto 7px}
 .sfc-watch-layout .sfc-tv-chat-feed{padding-bottom:8px!important}
 .sfc-watch-layout .sfc-tv-chat form{position:sticky!important;bottom:0!important;background:linear-gradient(180deg,rgba(255,255,255,.76),#fff 35%)!important;padding-top:7px!important}
 body.sfc-chat-keyboard .sfc-watch-layout .sfc-tv-chat{height:min(52vh,420px)!important}
}

/* v5.8 — Prioritize keeping the live picture visible with Android/iOS keyboards.
   Only the Sable TV standalone page is affected. */
.sfc-watch-page .sfc-watch-notice{display:none!important}
.sfc-watch-page .sfc-tv-screen:fullscreen,
.sfc-watch-page .sfc-tv-screen:-webkit-full-screen{width:100vw!important;height:100dvh!important;max-height:100dvh!important;aspect-ratio:auto!important;background:#000!important}
.sfc-watch-page .sfc-tv-screen:fullscreen video,
.sfc-watch-page .sfc-tv-screen:-webkit-full-screen video{width:100%!important;height:100%!important;object-fit:contain!important}
@media (max-width:850px){
 html:has(body.sfc-watch-page){height:100%;overflow:hidden!important;overscroll-behavior:none}
 body.sfc-watch-page{height:100%;width:100%;overflow:hidden!important;overscroll-behavior:none;position:relative}
 body.sfc-watch-page .sfc-watch-wrap{position:static!important;width:100%!important;max-width:none!important;padding:0!important;margin:0!important}
 body.sfc-watch-page .sfc-watch-wrap>h1,body.sfc-watch-page .sfc-watch-wrap>p{display:none!important}
 body.sfc-watch-page .sfc-watch-layout{position:static!important;display:block!important;margin:0!important;padding:0!important}
 body.sfc-watch-page .sfc-watch-head-fixed{
  position:fixed!important;top:var(--sfc-vv-top,0px)!important;left:0;right:0;
  height:var(--sfc-fixed-head,56px)!important;min-height:0!important;
  z-index:105!important;display:grid!important;align-items:center!important;
  grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;padding:4px 10px!important;
  box-sizing:border-box!important;box-shadow:none!important
 }
 body.sfc-watch-page .sfc-watch-head-fixed>span{display:none!important}
 body.sfc-watch-page .sfc-watch-head-fixed>a{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.sfc-watch-page .sfc-watch-head-fixed .sfc-watch-head-tools{display:flex!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-live-stage{
  position:fixed!important;top:calc(var(--sfc-vv-top,0px) + var(--sfc-fixed-head,56px))!important;
  left:0!important;right:0!important;width:100%!important;
  height:var(--sfc-fixed-stage,315px)!important;min-height:0!important;
  z-index:91!important;overflow:hidden!important;background:#07162d!important;
  box-sizing:border-box!important;padding:0!important;transform:none!important
 }
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-widget-full{
  display:flex!important;flex-direction:column!important;
  height:100%!important;min-height:0!important;overflow:hidden!important;border:0!important;border-radius:0!important
 }
 body.sfc-watch-page .sfc-tv-widget-full .sfc-tv-topline{flex:0 0 auto;padding:4px 10px!important;font-size:10px!important}
 body.sfc-watch-page .sfc-tv-widget-full .sfc-tv-matchbar{flex:0 0 auto;padding:5px!important;gap:2px!important}
 body.sfc-watch-page .sfc-tv-widget-full .sfc-tv-teams{font-size:11px!important;gap:5px!important}
 body.sfc-watch-page .sfc-tv-widget-full .sfc-tv-teams img{height:22px!important;width:22px!important}
 body.sfc-watch-page .sfc-tv-widget-full .sfc-tv-count{font-size:12px!important}
 body.sfc-watch-page .sfc-tv-widget-full .sfc-tv-screen{
  flex:1 1 0!important;display:block!important;position:relative!important;
  width:100%!important;height:auto!important;min-height:0!important;
  aspect-ratio:auto!important;background:#000!important
 }
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat{
  position:fixed!important;
  top:calc(var(--sfc-vv-top,0px) + var(--sfc-fixed-head,56px) + var(--sfc-fixed-stage,315px))!important;
  left:0!important;right:0!important;bottom:auto!important;
  width:100%!important;box-sizing:border-box!important;
  height:calc(var(--sfc-vv-height,100dvh) - var(--sfc-fixed-head,56px) - var(--sfc-fixed-stage,315px))!important;
  min-height:0!important;max-height:none!important;
  margin:0!important;padding:5px 8px max(4px,env(safe-area-inset-bottom))!important;
  z-index:92!important;transform:none!important;
  display:flex!important;flex-direction:column!important;
  overflow:hidden!important;border-radius:13px 13px 0 0!important;
  background:#fff!important;color:#122645!important
 }
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat::before{display:none!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat-head{flex:0 0 auto!important;min-height:20px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat-feed{min-height:0!important;height:0!important;flex:1 1 0!important;overflow-y:auto!important;scroll-behavior:auto!important;overscroll-behavior:contain!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat form{
  flex:0 0 auto!important;display:grid!important;position:relative!important;
  bottom:auto!important;grid-template-columns:minmax(55px,82px) minmax(0,1fr) auto!important;
  padding:4px 0 0!important;margin:0!important;background:#fff!important
 }
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat form input[name=message]{font-size:16px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-emoji-bar{height:30px!important;min-height:30px!important;max-height:30px!important;overflow-x:auto!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat form small{font-size:9px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat-state{font-size:10px!important;flex:0 0 auto!important}
 body.sfc-watch-page.sfc-chat-keyboard .sfc-tv-widget-full .sfc-tv-topline,
 body.sfc-watch-page.sfc-chat-keyboard .sfc-tv-widget-full .sfc-tv-matchbar{display:none!important}
 body.sfc-watch-page.sfc-chat-keyboard .sfc-watch-layout .sfc-tv-chat-head,
 body.sfc-watch-page.sfc-chat-keyboard .sfc-watch-layout .sfc-tv-chat form small{display:none!important}
 body.sfc-watch-page.sfc-chat-keyboard .sfc-watch-layout .sfc-tv-chat form{
  grid-template-columns:minmax(62px,80px) minmax(0,1fr) auto!important;
 }
 /* v5.9: never hide the nickname input while focused; this was blocking typing. */
 body.sfc-watch-page.sfc-chat-keyboard .sfc-watch-layout .sfc-tv-emoji-bar{height:27px!important;min-height:27px!important;max-height:27px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat-ticker{display:none!important}
}

/* Sable TV v5.9: small, reliable mobile composer with always-editable nickname. */
@media (max-width:850px){
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat{padding:4px 7px max(3px,env(safe-area-inset-bottom))!important;touch-action:pan-y}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat-head{min-height:16px!important;margin:0 0 1px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat-head h2{font-size:12px!important;line-height:1.2!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat-state{padding:2px 6px!important;margin:1px 0!important;font-size:9px!important;line-height:1.2!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-typing-indicator{min-height:0!important;padding:1px 4px!important;font-size:10px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat-feed{margin:2px 0!important;padding:5px!important;gap:4px!important;touch-action:pan-y;overscroll-behavior:contain}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-comment{padding:4px 7px!important;border-radius:9px!important;font-size:12px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-comment p{margin:2px 0!important;font-size:12px!important;line-height:1.28!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-reply-link{font-size:10px!important;padding:2px 4px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat form,
 body.sfc-watch-page.sfc-chat-keyboard .sfc-watch-layout .sfc-tv-chat form{
  display:grid!important;grid-template-columns:minmax(64px,78px) minmax(0,1fr) auto!important;
  gap:4px!important;align-items:center!important;position:relative!important;
  margin:0!important;padding:3px 0 0!important;z-index:110!important;
 }
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat form input[name=name],
 body.sfc-watch-page.sfc-chat-keyboard .sfc-watch-layout .sfc-tv-chat form input[name=name]{
  display:block!important;visibility:visible!important;opacity:1!important;grid-column:1!important;
  width:100%!important;min-width:0!important;min-height:35px!important;height:35px!important;
  padding:6px 7px!important;line-height:21px!important;font-size:12px!important;
  border-radius:11px!important;position:relative!important;pointer-events:auto!important;
  z-index:111!important;background:#fff!important;color:#0b1f36!important;
 }
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat form input[name=message]{
  grid-column:2!important;min-height:35px!important;height:35px!important;
  padding:6px 9px!important;line-height:21px!important;font-size:16px!important;
  border-radius:12px!important;position:relative!important;pointer-events:auto!important;z-index:111!important;
 }
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat form button[type=submit]{
  grid-column:3!important;height:35px!important;min-height:35px!important;
  padding:5px 8px!important;font-size:10px!important;border-radius:11px!important;
  position:relative!important;z-index:111!important;
 }
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-emoji-bar,
 body.sfc-watch-page.sfc-chat-keyboard .sfc-watch-layout .sfc-tv-emoji-bar{
  grid-column:1/-1!important;order:2!important;min-height:27px!important;height:27px!important;
  max-height:27px!important;flex:0 0 auto!important;margin:0!important;
  padding:1px 0!important;gap:4px!important;overscroll-behavior-x:contain!important;
 }
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-emoji-bar .sfc-tv-emoji{min-width:26px!important;width:26px!important;height:25px!important;font-size:16px!important;border-radius:8px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-emoji-bar .sfc-tv-emoji[data-kind=sticker]{width:auto!important;min-width:53px!important;height:25px!important;padding:0 6px!important;font-size:10px!important;line-height:23px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat form small{display:none!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-replying{grid-column:1/-1!important;order:1!important;padding:3px 5px!important;font-size:10px!important}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat input:focus{outline:2px solid #2762bc!important;outline-offset:0!important}
}
