/* Bort Cord/Z.TV 5.8 shared chrome: never changes BurtyBurt's canvas or physics CSS. */
.ztv-ticker{display:flex;align-items:center;width:100%;height:31px;overflow:hidden;border-bottom:1px solid #714ea1;background:linear-gradient(180deg,#251136,#100b1c);color:#e5c5ff;font:700 11px/1.2 'Courier New',monospace;letter-spacing:.065em;position:relative;z-index:28}
.ztv-ticker[hidden]{display:none!important}.ztv-ticker-label{background:#32144a;border-right:1px solid #a076c7;padding:9px 12px;white-space:nowrap;color:#d8a5ff;z-index:1}
.ztv-ticker-viewport{position:relative;flex:1;min-width:0;white-space:nowrap;overflow:hidden}.ztv-ticker-track{display:inline-flex;gap:50px;align-items:center;white-space:nowrap;will-change:transform;animation:ztv-news-scroll var(--ztv-ticker-speed,45s) linear infinite}.ztv-ticker-track span{white-space:nowrap}.ztv-ticker:hover .ztv-ticker-track{animation-play-state:paused}
@keyframes ztv-news-scroll{0%{transform:translateX(100vw)}100%{transform:translateX(-100%)}}
.ztv-ticker-manage{border:0;border-left:1px solid #9563bb;background:#35164d;color:#ebc6ff;padding:7px 12px;cursor:pointer;font:14px monospace}
.ztv-ticker-manage[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.ztv-ticker-track{animation:none;transform:none;white-space:normal}.ztv-ticker-viewport{overflow-x:auto}}
body.ztv-shared-game{height:100dvh;overflow:hidden;margin:0;background:#0a0710 url('/api/static/ztv/assets/ztv-space-bg.webp') center center/cover fixed;color:#e9daff}
body.ztv-shared-game>.ztv-shared-game-header{display:flex;position:relative;top:auto;min-height:62px;padding:8px 20px;z-index:7200;box-sizing:border-box}
body.ztv-shared-game .ztv-shared-game-header .ztv-logo-text-img{max-width:62px;max-height:40px}
body.ztv-shared-game .ztv-shared-game-header .ztv-logo-mark{max-width:34px;max-height:34px}
body.ztv-shared-game .ztv-shared-game-header .ztv-recovery-nav{display:flex;align-items:center;gap:20px;font:12px 'Courier New',monospace}
body.ztv-shared-game .ztv-shared-game-header .ztv-recovery-nav>a{color:#d9aaff;text-decoration:none}
body.ztv-shared-game #play-root{height:calc(100dvh - 93px);background:transparent}
body.ztv-shared-game #powerup-guide,body.ztv-shared-game #play-sidebar{background:linear-gradient(180deg,#1a1124f5,#100b1af3);border-color:#633e88;color:#e0c9ee}
body.ztv-shared-game #play-game-col{background:transparent}
body.ztv-shared-game .ztv-account-menu{margin-left:8px}
body.ztv-shared-game .ztv-chat-root{z-index:7500}
body.ztv-shared-game .ztv-community-modal-backdrop{z-index:120000}
/* Bigger, terminal-TV community chat. Mobile stays a compact overlay. */
.ztv-chat-root .ztv-chat-panel{width:min(405px,calc(100vw - 20px));height:min(640px,78vh);border-radius:3px;background:linear-gradient(180deg,#0b0d11,#100b18);box-shadow:0 0 0 2px #171320,0 10px 50px #000c}
.ztv-chat-root .ztv-chat-head{background:#1d1526;border-bottom:2px solid #755095;min-height:38px}
.ztv-chat-root .ztv-chat-messages{gap:4px;padding:8px 11px;scrollbar-color:#9869b8 #11111a}
.ztv-chat-root .ztv-chat-row{position:relative;display:flex;align-items:start;gap:5px;padding:6px 4px;border-bottom:1px solid #302139;font:12px/1.45 'Courier New',monospace}
.ztv-chat-avatar{width:25px;height:25px;flex:0 0 25px;border:1px solid #503164;object-fit:cover;background:#20102b}
.ztv-chat-content{min-width:0;flex:1;overflow-wrap:anywhere}
.ztv-chat-root .ztv-chat-author{font-size:12px;font-weight:800;color:#d69cff!important}
.ztv-chat-author[data-color='pink']{color:#ff86c0!important}.ztv-chat-author[data-color='lime']{color:#a4f777!important}.ztv-chat-author[data-color='gold']{color:#ffce66!important}.ztv-chat-author[data-color='ice']{color:#80ddff!important}.ztv-chat-author[data-color='white']{color:#f9f5fa!important}
.ztv-chat-root .ztv-chat-body{color:#eee1ed;white-space:pre-wrap}.ztv-chat-root .ztv-chat-time{float:right;margin:0 0 0 6px;font-size:9px;color:#b29abf}
.ztv-chat-gif{display:block;max-width:min(270px,100%);max-height:180px;object-fit:contain;border:1px solid #623f80;margin:5px 0}
.ztv-chat-root .ztv-chat-compose{display:flex;gap:4px;align-items:center;padding:7px;background:#110d19;border-top:1px solid #51306f}
.ztv-chat-root .ztv-chat-compose button{padding:7px 9px;white-space:nowrap}
.ztv-chat-root .ztv-chat-compose .ztv-chat-tool{font-size:15px;background:#24152e}
.ztv-chat-picker{position:absolute;bottom:51px;left:6px;right:6px;max-height:205px;overflow:auto;display:flex;flex-wrap:wrap;align-content:start;gap:5px;padding:10px;background:#130d1d;border:1px solid #8155a9;box-shadow:0 -10px 35px #000b;z-index:3}
.ztv-chat-picker[hidden]{display:none}.ztv-chat-picker button{cursor:pointer;width:33px;height:33px;padding:4px;color:white;background:#2b1937;border:1px solid #423056}.ztv-chat-picker button:hover{background:#70429c}.ztv-chat-picker img,.ztv-inline-emoji{width:23px;height:23px;object-fit:contain;vertical-align:middle}
.ztv-chat-root .ztv-chat-panel.is-compact .ztv-chat-row{padding:3px 2px;font-size:10px}
.ztv-chat-root .ztv-chat-panel.is-large .ztv-chat-row{font-size:14px;line-height:1.65}
.ztv-chat-root .ztv-chat-panel.no-timestamps .ztv-chat-time{display:none}
.ztv-chat-root .ztv-chat-picker-controls{padding:0 12px 5px;font-size:10px;color:#cda9e9}
@media(max-width:700px){body.ztv-shared-game{height:auto;min-height:100dvh;overflow:auto}body.ztv-shared-game #play-root{height:calc(100dvh - 93px);min-height:380px}.ztv-ticker-label{padding:9px 5px;font-size:9px}.ztv-chat-root .ztv-chat-panel{height:min(65vh,500px)}body.ztv-shared-game .ztv-shared-game-header{min-height:62px;padding:7px 9px}body.ztv-shared-game .ztv-shared-game-header .ztv-recovery-nav{gap:7px;font-size:10px}}

/* Phase 5.9 — retro controls and searchable GIF library */
.ztv-gallery-volume,.ztv-clip-volume{display:inline-flex;align-items:center;gap:7px;color:#dab6ff;font:bold 10px/1.3 'Courier New',monospace;padding:5px 8px;background:#180f25;border:1px solid #6f438d;border-radius:3px;white-space:nowrap}
.ztv-gallery-volume input,.ztv-clip-volume input{accent-color:#b875ff;width:85px;cursor:pointer}.ztv-gallery-volume output,.ztv-clip-volume output{min-width:30px;color:#c4ff8b}
.ztv-clip-volume{margin:12px 0 3px}.ztv-gif-search-form{display:flex;gap:6px;margin:8px 0}.ztv-gif-search-form input{flex:1;min-width:0}.ztv-gif-tabs{display:flex;gap:8px;margin:8px 0}.ztv-gif-tabs button,.ztv-gif-save{background:#21162b;border:1px solid #7951a2;color:#edd5ff;padding:5px 7px;cursor:pointer}
.ztv-gif-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:40vh;overflow-y:auto;padding:5px}.ztv-gif-tile{background:#130f1c;border:1px solid #503066;min-width:0}.ztv-gif-preview{display:block;background:#0b0712;border:0;width:100%;cursor:pointer;padding:0}.ztv-gif-preview img{width:100%;height:100px;object-fit:contain}.ztv-gif-save{font-size:11px;width:100%}
@media(max-width:760px){.ztv-gif-results{grid-template-columns:repeat(2,minmax(0,1fr))}.ztv-gallery-volume{width:max-content;margin:4px 0}.ztv-gallery-volume input{width:68px}}

/* Phase 5.10: on-site GIF picker directly above chat composer. */
.ztv-chat-gif-library{flex:0 0 auto;display:flex;flex-direction:column;height:clamp(210px,37vh,315px);min-height:0;background:#100d1a;border-top:2px solid #8241b4;box-shadow:0 -8px 18px #0008;overflow:hidden}
.ztv-chat-gif-library[hidden]{display:none!important}
.ztv-chat-gif-head{display:flex;align-items:center;justify-content:space-between;padding:7px 12px;background:#2c123a;color:#f1c4ff;font:bold 11px 'Courier New',monospace;letter-spacing:.08em}
.ztv-chat-gif-library .ztv-gif-search-form{margin:7px 9px 2px}.ztv-chat-gif-library .ztv-gif-tabs{margin:3px 9px}.ztv-chat-gif-library .ztv-community-feedback{margin:0 8px;min-height:14px;font-size:10px}
.ztv-chat-gif-library .ztv-gif-results{flex:1;min-height:0;max-height:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-content:start;overflow-y:auto;padding:7px 10px 9px}
.ztv-chat-gif-library .ztv-gif-preview img{height:118px;object-fit:cover}.ztv-chat-gif-library .ztv-gif-tile{position:relative;border-color:#79469a;overflow:hidden}
.ztv-chat-gif-library .ztv-gif-save{position:absolute;right:3px;bottom:3px;width:30px;height:30px;font-size:17px;background:#171020e8;z-index:2}
.ztv-chat-gif-empty{color:#bfa2d2;font-size:11px;padding:10px}
/* Live community rail is outside the central clip grid; below 1480px it stacks normally. */
.ztv-network-rail{box-sizing:border-box;max-width:1080px;margin:13px auto 16px;padding:0 10px;color:#eddbfc;font:11px/1.45 'Courier New',monospace}
.ztv-network-rail-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ztv-network-card{background:linear-gradient(140deg,#1a1025ef,#0a0812f3);border:1px solid #68438e;box-shadow:0 0 22px #0008;padding:10px;min-width:0}
.ztv-network-card h3{margin:0 0 9px;font:bold 12px 'Courier New',monospace;color:#e3afff;border-bottom:1px solid #643687;padding-bottom:6px}
.ztv-network-card small,.ztv-network-card .ztv-muted{color:#bdadc9;font-size:10px}
.ztv-network-card a{color:#e4bbff}.ztv-network-card a.ztv-join{display:block;text-align:center;margin-top:10px;padding:9px 6px;background:#56258d;border:1px solid #a36ee4;text-decoration:none;color:#fff;font-weight:bold}
.ztv-network-card ul{list-style:none;margin:4px 0;padding:0}.ztv-network-card li{padding:5px 2px;border-bottom:1px solid #3d294e}
.ztv-network-rank{display:flex;align-items:center;gap:6px}.ztv-network-rank img{height:24px;width:24px;object-fit:cover;border-radius:50%}.ztv-network-score{margin-left:auto;color:#aafa8b;font-weight:bold}
.ztv-network-number{color:#baf4ff;font-size:19px;font-weight:bold}.ztv-network-voice{display:flex;justify-content:space-between;gap:5px}.ztv-network-voice strong{color:#aaffb4}
@media(min-width:1500px){.ztv-network-rail{position:fixed;z-index:10;left:12px;top:95px;bottom:14px;width:min(315px,calc((100vw - 1110px)/2 - 40px));margin:0;padding:0;max-width:none;overflow-y:auto;scrollbar-color:#62417b transparent}.ztv-network-rail-content{grid-template-columns:1fr}}
/* BurtyBurt sidebar tabs: no overlays over #game-wrapper or #game-canvas. */
body.ztv-shared-game #play-sidebar{display:flex;flex-direction:column;overflow:hidden;min-height:0}
.ztv-burty-tabs{display:flex;flex:0 0 auto;gap:3px;padding:5px;background:#180d24;border-bottom:1px solid #714c91}
.ztv-burty-tabs button{cursor:pointer;flex:1;min-width:0;padding:7px 2px;background:#2a173a;color:#e0c1fa;border:1px solid #68408e;font:bold 10px 'Courier New',monospace}
.ztv-burty-tabs button[aria-selected=true]{background:#6a329b;color:#fff;border-color:#bc83ff}
body.ztv-shared-game #play-sidebar-inner{min-height:0;overflow-y:auto;flex:1}
body.ztv-shared-game #play-sidebar .ztv-chat-root{position:relative;right:auto;bottom:auto;z-index:1;height:100%;min-height:0;width:100%;margin:0}
body.ztv-shared-game #play-sidebar .ztv-chat-toggle{display:none}
body.ztv-shared-game #play-sidebar .ztv-chat-panel{position:relative;right:auto;bottom:auto;border:none;border-radius:0;width:100%;height:100%;max-height:none;box-shadow:none;min-height:0}
body.ztv-shared-game #play-sidebar .ztv-chat-head{padding:6px 8px}
body.ztv-shared-game #play-sidebar .ztv-chat-compose{padding:5px;gap:3px}
body.ztv-shared-game #play-sidebar .ztv-chat-compose button{padding:6px}
body.ztv-shared-game #play-sidebar .ztv-chat-compose input{padding:7px 3px}
body.ztv-shared-game #play-sidebar.ztv-both #play-sidebar-inner{flex:0 0 40%;border-bottom:2px solid #714c91}
body.ztv-shared-game #play-sidebar.ztv-both .ztv-chat-root{flex:1}
@media(max-width:900px){.ztv-network-rail-content{grid-template-columns:1fr}}

body.ztv-shared-game #play-sidebar-inner[hidden],body.ztv-shared-game #play-sidebar .ztv-chat-root[hidden]{display:none!important}
@media(max-width:700px){body.ztv-shared-game #play-root{height:auto;min-height:calc(100dvh - 93px);overflow:visible}body.ztv-shared-game #play-sidebar{min-height:300px;height:min(520px,65vh)}body.ztv-shared-game #play-sidebar.ztv-both{height:680px;max-height:none}}

/* PHASE 5.11: Navigation stays IN the header. Soft bevel, glow & active signal,
   referencing the old floating controls without moving links over content. */
body .ztv-header .ztv-recovery-nav{gap:9px;align-items:center}
body .ztv-header .ztv-recovery-nav>a{display:inline-flex;align-items:center;justify-content:center;min-height:31px;box-sizing:border-box;padding:7px 13px!important;border:1px solid #623d8d;border-bottom-color:#9f5bca;border-radius:7px;background:linear-gradient(165deg,#40205dce,#180f2aea);color:#e9cfff!important;font:700 11px/1.25 'Courier New',monospace;letter-spacing:.035em;box-shadow:inset 0 1px 0 #ba8fe433,0 2px 10px #0008;text-decoration:none!important;transition:background .16s,border-color .16s,box-shadow .16s,transform .16s}
body .ztv-header .ztv-recovery-nav>a:hover,body .ztv-header .ztv-recovery-nav>a:focus-visible{background:linear-gradient(170deg,#7134aa,#3d1a60);border-color:#d4a5ff;box-shadow:inset 0 1px 0 #edc9ff88,0 0 15px #a63bea77;transform:translateY(-1px)}
body .ztv-header .ztv-recovery-nav>a[aria-current=page]{color:#fff!important;background:linear-gradient(135deg,#5829a0,#833cb5);border-color:#bf8cff;box-shadow:inset 0 1px 0 #dca6ff80,0 0 12px #8639ff55}
body .ztv-header .ztv-account-summary{border-radius:7px;min-height:32px;background:linear-gradient(145deg,#43205dbd,#1b102bea);border-color:#9261c2;box-shadow:inset 0 1px 0 #ffffff22,0 3px 13px #000a}
body .ztv-header .ztv-account-summary:hover{border-color:#c892f6;box-shadow:0 0 14px #974cdd80}

/* PHASE 5.11: Full usable chat sidebar, resized alongside the game.
   No game canvas/physics modifications. Native CSS flex recalculates canvas scale. */
body.ztv-shared-game #play-sidebar{position:relative;box-sizing:border-box;flex:0 0 var(--ztv-chat-width,440px);width:var(--ztv-chat-width,440px);min-width:0;max-width:58vw;min-height:0;gap:0}
body.ztv-shared-game #play-game-col{min-width:0;overflow-x:hidden}
.ztv-chat-resize-tools{display:flex;flex:0 0 auto;gap:10px;align-items:center;padding:8px 10px;background:linear-gradient(110deg,#211131,#3c1a52);border-bottom:1px solid #8059a3;color:#f0c9ff;font:bold 10px 'Courier New',monospace;white-space:nowrap}
.ztv-chat-resize-tools label{flex:0 0 auto;letter-spacing:.02em}.ztv-chat-resize-tools input{min-width:0;flex:1;accent-color:#c36ef5;cursor:ew-resize}.ztv-chat-resize-tools output{min-width:43px;text-align:right;color:#d2ffb4}
.ztv-chat-drag-handle{position:absolute;z-index:5;top:35%;bottom:35%;left:-6px;width:11px;cursor:ew-resize;background:linear-gradient(90deg,#7c4a9f,#db9efa,#54257b);border-radius:5px;box-shadow:0 0 9px #7b26d7ad;touch-action:none}
.ztv-chat-drag-handle:focus-visible{outline:2px solid #f1ccff;outline-offset:2px}
body.ztv-shared-game #play-sidebar .ztv-chat-root{flex:1;min-height:0;width:100%;position:relative;bottom:auto;right:auto;z-index:1;margin:0}
body.ztv-shared-game #play-sidebar .ztv-chat-panel{display:flex;flex-direction:column;position:relative;right:auto;bottom:auto;width:100%;height:100%;max-height:none;min-height:0;border:0;box-shadow:none;border-radius:0}
body.ztv-shared-game #play-sidebar .ztv-chat-panel[hidden]{display:none!important}
body.ztv-shared-game #play-sidebar .ztv-chat-messages{flex:1;min-height:0;overflow-y:auto}
body.ztv-shared-game #play-sidebar .ztv-chat-gif-library{height:clamp(210px,37vh,330px);max-height:45%}
body.ztv-shared-game #play-sidebar .ztv-chat-gif-library .ztv-gif-preview img{height:124px}
body.ztv-shared-game #play-sidebar .ztv-chat-compose input{min-width:0;flex:1;padding:9px 7px}
body.ztv-shared-game #play-sidebar .ztv-chat-compose button{padding:9px}
/* Top 10 moves below game controls, collapses to one line by default. */
body.ztv-shared-game .ztv-game-top10{box-sizing:border-box;width:100%;max-width:760px;flex:0 0 auto;max-height:160px;overflow:auto;background:#160e24ec;border:1px solid #684389;border-radius:7px;color:#eed3ff;scrollbar-color:#754aa1 #1b1128;font:11px 'Courier New',monospace}
body.ztv-shared-game .ztv-game-top10>summary{cursor:pointer;display:list-item;padding:8px 14px;list-style-position:inside;font-weight:bold;letter-spacing:.07em;color:#ecc6ff;background:linear-gradient(125deg,#2f1848,#160e23)}
body.ztv-shared-game .ztv-game-top10>summary:hover{color:#fff;background:#51257a}
body.ztv-shared-game .ztv-game-top10 #play-sidebar-inner{overflow:visible;display:block;flex:none;height:auto;padding:5px 12px;min-height:0}
body.ztv-shared-game .ztv-game-top10 #lb-list{margin:5px 0;padding:0}
body.ztv-shared-game .ztv-game-top10 #lb-list li:nth-child(n+11){display:none!important}
body.ztv-shared-game #play-sidebar #lb-footer,body.ztv-shared-game #play-sidebar #lb-link-status{display:none!important}
/* Native Discord widget iframe cannot be styled inside; custom widget-JSON panel can. */
.ztv-network-presence{display:flex;align-items:baseline;gap:8px;margin:5px 0 8px}.ztv-network-presence>span{color:#c4a9dc;font-size:10px}
.ztv-network-subtitle{margin:10px 0 5px;color:#d9b5ff;font:bold 11px 'Courier New',monospace;letter-spacing:.05em}
.ztv-voice-list{list-style:none;padding:0;margin:0}.ztv-network-voice{border:1px solid #513578;margin:3px 0;padding:8px 5px!important;background:linear-gradient(120deg,#2d19428a,#141024);border-radius:5px;display:flex;align-items:center;gap:8px}
.ztv-voice-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f0d7ff}.ztv-voice-count{flex:0 0 auto;background:#372050;border:1px solid #845cb1;color:#aaffa1;padding:3px 5px;border-radius:5px;font-size:10px}
.ztv-network-community{color:#e0c6ff}.ztv-network-community strong{font-size:17px;color:#9bf8ff}
.ztv-network-leaders{list-style:none!important;padding:0!important;margin:4px 0!important}.ztv-rank-number{width:17px;flex:0 0 17px;color:#dfa3ff}.ztv-rank-name{flex:1;min-width:0}
@media(max-width:1030px){body.ztv-shared-game #play-sidebar{max-width:55vw}}
@media(max-width:700px){body .ztv-header .ztv-recovery-nav{gap:5px!important}body .ztv-header .ztv-recovery-nav>a{font-size:10px;padding:6px 8px!important;min-height:29px}body.ztv-shared-game #play-root{height:auto!important;min-height:0;overflow:visible;flex-direction:column}body.ztv-shared-game #play-sidebar{max-width:none;flex:0 0 auto;width:100%!important;height:min(580px,65vh)!important;min-height:340px}body.ztv-shared-game .ztv-chat-drag-handle{display:none}body.ztv-shared-game .ztv-chat-resize-tools{display:none}body.ztv-shared-game .ztv-game-top10{max-height:160px}}

body.ztv-shared-game .ztv-game-chat-docked button[aria-label="Minimize chat"]{display:none!important}

/* Phase 5.12: compact hover-scrolling leaderboard and voice network member roster. */
body.ztv-shared-game .ztv-chat-resize-tools{display:none!important}
body.ztv-shared-game .ztv-game-top10{display:none!important}
body.ztv-shared-game #play-game-col{display:flex;flex-direction:column;min-height:0}
body.ztv-shared-game .ztv-game-rank-strip{box-sizing:border-box;display:flex;align-items:center;flex:0 0 31px;height:31px;min-height:31px;max-width:100%;min-width:0;overflow:hidden;background:linear-gradient(95deg,#27123b,#130d21 45%,#2a1642);border-bottom:1px solid #9058ba;border-top:1px solid #a16aca;box-shadow:inset 0 1px 0 #bd82ee47;color:#efceff;font:11px 'Courier New',monospace}
body.ztv-shared-game .ztv-game-rank-tag{white-space:nowrap;flex:0 0 auto;padding:0 12px;color:#ffdc7c;font-weight:bold;border-right:1px solid #5d3478}
body.ztv-shared-game .ztv-game-rank-strip #play-sidebar-inner{display:block;flex:1;min-width:0;min-height:0;height:30px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;white-space:nowrap;padding:0;margin:0}
body.ztv-shared-game .ztv-game-rank-strip #play-sidebar-inner::-webkit-scrollbar{height:0}
body.ztv-shared-game .ztv-game-rank-strip #lb-list{display:flex!important;flex-flow:row nowrap!important;align-items:center;gap:8px;white-space:nowrap;min-width:max-content;margin:0;padding:0;list-style:none}
body.ztv-shared-game .ztv-game-rank-strip #lb-list>li{display:inline-flex!important;align-items:center;white-space:nowrap;min-width:0;width:auto!important;min-height:26px!important;max-height:28px!important;padding:2px 8px!important;margin:0!important;background:#29193f88;border:1px solid #5c3c82;border-radius:3px;font-size:10px!important}
body.ztv-shared-game .ztv-game-rank-strip #lb-list>li:nth-child(n+11){display:none!important}
body.ztv-shared-game .ztv-game-rank-strip #lb-list img{width:20px;height:20px;object-fit:cover}
body.ztv-shared-game .ztv-game-rank-strip #lb-header,body.ztv-shared-game .ztv-game-rank-strip #lb-footer,body.ztv-shared-game .ztv-game-rank-strip #lb-link-status{display:none!important}
.ztv-voice-heading{display:flex;align-items:center;gap:6px;min-width:0;width:100%}
.ztv-network-voice-card{display:block!important;padding:8px!important}
.ztv-voice-members{display:flex;flex-direction:column;gap:3px;margin:7px 2px 1px 17px}
.ztv-voice-user{display:flex;align-items:center;gap:7px;min-height:24px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#d9ccef;font-size:11px}
.ztv-voice-avatar{width:23px;height:23px;border-radius:50%;object-fit:cover;flex:none}
.ztv-kick-notice{position:fixed;z-index:900;right:18px;top:92px;width:min(360px,calc(100vw - 36px));box-sizing:border-box;padding:14px;background:linear-gradient(145deg,#271036,#130b20);color:#ffe7ff;border:1px solid #a357c9;border-left:4px solid #53fc18;border-radius:8px;box-shadow:0 14px 35px #000d;font:13px/1.5 'Courier New',monospace}
.ztv-kick-notice-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#9bff80;font-weight:bold}
.ztv-kick-notice-head button{background:#311b42;color:#fff;border:1px solid #895cad;cursor:pointer;padding:2px 9px}
.ztv-kick-notice .ztv-join{display:block;text-align:center;margin-top:12px}
@media(max-width:700px){body.ztv-shared-game .ztv-game-rank-strip{flex:0 0 33px}body.ztv-shared-game .ztv-game-rank-tag{padding:0 6px}}

/* Phase 5.13 — tight purple arcade chrome; the game canvas and mechanics stay untouched. */
/* Ticker HUD stays fixed while the original community bulletin continues to scroll. */
.ztv-ticker .ztv-live-hud{flex:0 0 auto;display:flex;align-items:center;gap:10px;z-index:3;background:linear-gradient(105deg,#302043,#120d20);height:100%;border-inline:1px solid #734e98;padding:0 12px;color:#d0ffa0;font:700 10px/1.1 'Courier New',monospace;letter-spacing:.035em;white-space:nowrap;box-shadow:-7px 0 14px #0a061a8c}
.ztv-ticker .ztv-live-hud span+span{border-left:1px solid #6e4b83;padding-left:10px;color:#c8a9ff}
.ztv-network-card .ztv-network-community{display:none!important}
body.ztv-shared-game .ztv-game-rank-strip{position:relative;z-index:2;border:1px solid #9f75ba;border-radius:11px 11px 0 0!important;box-shadow:0 3px 12px #0008;overflow:hidden;margin:0 0 -1px;min-height:34px;flex-basis:34px;height:34px}
body.ztv-shared-game .ztv-game-rank-strip .ztv-game-rank-tag{display:flex;align-items:center;height:100%;font-size:11px;background:#311441;padding:0 12px}
body.ztv-shared-game .ztv-game-rank-strip #play-sidebar-inner{height:33px;scroll-behavior:smooth;scrollbar-width:none}
body.ztv-shared-game .ztv-game-rank-strip #lb-list{height:33px;gap:5px}
body.ztv-shared-game .ztv-game-rank-strip #lb-list>li{height:28px!important;max-height:28px!important;padding:1px 10px!important;background:linear-gradient(140deg,#3b2358,#1e142d)!important;border-radius:6px!important;border-color:#624286!important;box-shadow:inset 0 1px 0 #a16dcc3d}
body.ztv-shared-game #game-wrapper{border-radius:0 0 9px 9px;overflow:hidden;min-height:0}
body.ztv-shared-game #game-controls{background:linear-gradient(140deg,#21132c,#11101d 62%,#28143a);border:1px solid #77509c;border-top-color:#593870;border-radius:0 0 9px 9px;padding:8px 12px;box-shadow:0 6px 20px #0007;color:#efd3ff;gap:9px}
body.ztv-shared-game #game-score-display{background:linear-gradient(100deg,#281639,#181122);border:1px solid #5b367b;border-radius:7px;display:flex;align-items:center;gap:15px;padding:8px 11px;font:700 11px/1.3 'Courier New',monospace;color:#e8cfff}
body.ztv-shared-game #game-score-display strong{color:#d7ff98;font-size:14px}
body.ztv-shared-game #game-control-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;min-width:0}
body.ztv-shared-game #game-controls .game-btn{border:1px solid #704c9b!important;border-radius:6px!important;background:linear-gradient(180deg,#402354,#24142f)!important;color:#f4d8ff!important;box-shadow:0 2px 8px #0008;transition:filter .15s,transform .15s;cursor:pointer}
body.ztv-shared-game #game-controls .game-btn:hover{filter:brightness(1.25);transform:translateY(-1px)}
body.ztv-shared-game #game-controls .game-btn--invite{background:linear-gradient(180deg,#915cff,#6938b6)!important;color:#fff!important}
body.ztv-shared-game #game-controls .ztv-score-share{background:linear-gradient(180deg,#5c2c7b,#362053)!important;color:#eddbff!important;max-width:190px;white-space:normal;font-size:10px;padding:9px}
body.ztv-shared-game #game-controls #game-vol-slider{accent-color:#d087fa}
/* GIF picker: contained, scrollable art previews with preserved aspect ratio. */
body .ztv-chat-root .ztv-chat-gif-library{height:min(475px,56vh)!important;max-height:64%!important;min-height:235px!important;overflow:hidden!important;display:flex;flex-direction:column}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-results{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:max-content!important;align-content:start!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin;scrollbar-color:#ba76e5 #180e26;scrollbar-gutter:stable;min-height:0!important;flex:1!important;max-height:none!important;padding:9px!important;gap:10px!important}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-tile{min-width:0!important;width:100%;height:auto!important;display:flex;flex-direction:column;align-items:stretch;overflow:hidden;background:#0a0812}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-preview{width:100%;height:auto!important;min-height:110px;display:flex;align-items:center;justify-content:center;background:#110c18;padding:4px;box-sizing:border-box}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-preview img{display:block;width:100%!important;height:auto!important;max-height:190px!important;min-height:90px;object-fit:contain!important;object-position:center;aspect-ratio:auto!important}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-save{bottom:4px;right:4px}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-preview:hover{background:#2d1740}
/* Gallery: keep original CRT visual style, but give cards and audio controls one language. */
body .ztv-gallery-volume{display:inline-flex;align-items:center;gap:9px;padding:7px 12px;border:1px solid #7e519c;border-radius:8px;background:linear-gradient(140deg,#2c173c,#150e24);box-shadow:0 3px 16px #0007,inset 0 1px 0 #bb7cdd4d;color:#d9c3ea;letter-spacing:.045em}
body .ztv-gallery-volume input{width:100px;accent-color:#bc77e8}body .ztv-gallery-volume output{font-size:10px;color:#cdff92}
body .ztv-gallery-volume .ztv-volume-icon{font-size:14px}body .ztv-gallery-volume .ztv-volume-title{font:bold 10px 'Courier New',monospace}
body .ztv-tile{position:relative;border:1px solid #64408b;border-radius:8px!important;overflow:hidden;box-shadow:0 5px 15px #05010a95;transition:transform .16s,border-color .16s,box-shadow .16s}
body .ztv-tile:hover{border-color:#ca7cfa;transform:translateY(-2px);box-shadow:0 3px 19px #a43bfd55}
body .ztv-sort-link{border-radius:5px!important;letter-spacing:.02em;transition:background .15s,color .15s}
body .ztv-sort-link:hover{background:#4a2368!important;color:#f4dbff!important}
/* Personal styling: bounded presets, no arbitrary CSS/HTML from members. */
.ztv-name-font-retro{font-family:'Courier New',monospace!important}.ztv-name-font-terminal{font-family:Consolas,'Lucida Console',monospace!important}.ztv-name-font-pixel{font-family:'Lucida Console',monospace!important;letter-spacing:.035em}.ztv-name-font-modern{font-family:Arial,Helvetica,sans-serif!important}.ztv-name-font-serif{font-family:Georgia,serif!important}
.ztv-name-glow{text-shadow:0 0 1px rgba(224,180,253,.38),0 0 4px rgba(198,140,249,.27),0 0 10px rgba(152,74,222,.17),0 0 22px rgba(122,46,185,.08)!important}.ztv-name-neon{color:#afff9d!important;text-shadow:0 0 5px #67fa88,0 0 11px #6cffaa!important}.ztv-name-shadow{text-shadow:2px 2px #502162,3px 3px #120917!important}
.ztv-name-rainbow{background:linear-gradient(90deg,#ff8aba,#ffdf7d,#b3ffa2,#89dfff,#d0a0ff);background-size:240% auto;background-clip:text;-webkit-background-clip:text;color:transparent!important;animation:ztv-rainbow 9s linear infinite}
@keyframes ztv-rainbow{to{background-position:240% center}}
.ztv-avatar-glow{box-shadow:0 0 10px #b363fc,0 0 20px #7043a8!important}.ztv-avatar-ring{border:2px solid #dca4fa!important;box-shadow:0 0 9px #ad68e6;animation:ztv-avatar-pulse 3s ease-in-out infinite}.ztv-avatar-pulse{animation:ztv-avatar-pulse 2.8s ease-in-out infinite}.ztv-avatar-spin{animation:ztv-avatar-spin 9s linear infinite;border-radius:50%!important}
@keyframes ztv-avatar-pulse{50%{box-shadow:0 0 18px 4px #b363fc,0 0 4px #fff;transform:scale(1.035)}}
@keyframes ztv-avatar-spin{to{transform:rotate(360deg)}}
.ztv-avatar-style-preview{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #67428d;background:#1f122b;border-radius:8px}
.ztv-avatar-style-preview img{width:76px;height:76px;object-fit:cover;border-radius:8px}.ztv-avatar-input{display:grid;gap:8px;margin:7px 0 14px;color:#e2c5ee;font-size:11px}
.ztv-appearance-choice{display:grid;gap:5px;margin:7px 0}.ztv-appearance-choice select{min-width:0;max-width:100%;background:#1c1128;color:#ecd3ff;border:1px solid #7a529b}
@media(max-width:820px){.ztv-ticker .ztv-live-hud{gap:6px;padding:0 6px;font-size:9px}.ztv-ticker .ztv-live-hud span+span{padding-left:6px}}
@media(max-width:560px){.ztv-ticker .ztv-live-hud{font-size:8px}.ztv-ticker .ztv-live-hud span+span{display:none}body .ztv-gallery-volume{padding:6px}body .ztv-gallery-volume .ztv-volume-title{display:none}body.ztv-shared-game #game-control-actions{justify-content:center}body.ztv-shared-game #game-controls{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.ztv-name-rainbow,.ztv-avatar-ring,.ztv-avatar-pulse,.ztv-avatar-spin{animation:none!important}body .ztv-tile{transition:none!important}}


/* Phase 5.14 - unified chrome and alignment, accessible/centered chips. */
.ztv-header{display:flex;align-items:center;gap:12px}
.ztv-header .ztv-live-hud{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:28px;padding:5px 12px;margin-left:clamp(10px,9vw,170px);background:linear-gradient(150deg,#231438,#110b1e);border:1px solid #8457ad;border-radius:7px;box-shadow:0 1px 10px #0009;font:bold 10px/1.3 'Courier New',monospace;color:#cbffa7;white-space:nowrap;box-sizing:border-box}
.ztv-header .ztv-live-hud span{display:inline-flex;align-items:center;justify-content:center;line-height:1.2;min-height:14px}
.ztv-header .ztv-live-hud span+span{border-left:1px solid #694686;padding-left:11px}
.ztv-header #ztv-site-nav{margin-left:auto}
.ztv-header #ztv-site-nav>a[hidden]{display:none!important}
body .ztv-header #ztv-site-nav .ztv-branded-game-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:6px 14px!important;text-align:center;line-height:1.2}
.ztv-game-link-icon{width:24px;height:24px;object-fit:contain;flex:0 0 24px;border-radius:50%}
@media (min-width:1500px){body .ztv-network-rail{top:126px!important}}
body .ztv-clips-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 16px}
body .ztv-clips-header .ztv-section-title{grid-column:1;min-width:0;margin:0}
body .ztv-clips-header .ztv-gallery-volume{grid-column:2;justify-self:end;align-self:center;margin:0!important;float:none!important;position:static!important;transform:none!important}
body .ztv-clips-header .ztv-sort-controls{grid-column:1/-1;min-width:0}
body.ztv-shared-game #play-game-col{gap:0!important}
body.ztv-shared-game #play-game-col .ztv-game-rank-strip{width:100%!important;max-width:100%!important;height:40px!important;min-height:40px!important;flex:0 0 40px!important;border:1px solid #8659ad;border-bottom:0;border-radius:11px 11px 0 0!important;margin:0!important;overflow:hidden;box-sizing:border-box;box-shadow:none;background:linear-gradient(120deg,#321b48,#150d22)}
body.ztv-shared-game .ztv-game-rank-strip .ztv-game-rank-tag{height:100%;min-width:105px;display:inline-flex;align-items:center;justify-content:center;line-height:1.1;padding:0 14px;border-right:1px solid #754ca3;font:bold 12px 'Courier New',monospace}
body.ztv-shared-game .ztv-game-rank-strip #play-sidebar-inner{height:39px!important;display:flex!important;align-items:center!important;flex:1;overflow-x:auto;scrollbar-width:none;padding:0 9px!important;box-sizing:border-box}
body.ztv-shared-game .ztv-game-rank-strip #lb-list{height:100%;display:flex!important;align-items:center!important;gap:8px}
body.ztv-shared-game .ztv-game-rank-strip #lb-list>li{height:30px!important;max-height:32px!important;min-height:30px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:3px 10px!important;font-size:11px!important;box-sizing:border-box}
body.ztv-shared-game #game-wrapper{border-radius:0!important;border-top:0!important;border-bottom:0!important;margin-top:0!important;margin-bottom:0!important}
body.ztv-shared-game #game-controls{border-radius:0 0 11px 11px!important;border:1px solid #8659ad!important;border-top:1px solid #69448d!important;margin:0!important;box-sizing:border-box;min-height:54px;display:flex;align-items:center;justify-content:space-between}
body.ztv-shared-game #game-controls .game-btn,body .ztv-network-card a.ztv-join,.ztv-role-chip{display:inline-flex!important;align-items:center!important;justify-content:center!important;vertical-align:middle;line-height:1.2!important;text-align:center!important;box-sizing:border-box}
.ztv-voice-user{display:flex!important;align-items:flex-start!important;gap:9px!important;white-space:normal!important;overflow:visible!important;min-width:0}
.ztv-voice-avatar{width:31px!important;height:31px!important;border-radius:50%!important;flex:0 0 31px!important}
.ztv-voice-identity{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1;justify-content:center}
.ztv-voice-user-name{line-height:1.25;overflow-wrap:anywhere;color:#f3d6ff}
.ztv-voice-badges{display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.ztv-role-chip{gap:4px;min-height:21px;padding:3px 7px!important;border:1px solid #765094;border-radius:6px;background:#2c1b42;color:#eee1ff;font:700 10px/1.1 'Courier New',monospace;white-space:nowrap;max-width:100%}
.ztv-role-icon{width:14px;height:14px;object-fit:contain;flex:0 0 14px;vertical-align:middle}
.ztv-role-emoji{display:inline-flex;align-items:center;justify-content:center;height:14px;min-width:14px;font-size:12px}
.ztv-chat-root .ztv-chat-online-count{display:flex;align-items:center;justify-content:center;min-height:22px;padding:3px 9px;background:#191222;border-bottom:1px solid #563276;color:#a3ffa6;font:700 10px/1.2 'Courier New',monospace;letter-spacing:.04em;text-align:center;box-sizing:border-box}
.ztv-chat-root .ztv-chat-head{display:flex;align-items:center;justify-content:space-between}
.ztv-chat-gif-library .ztv-gif-search-form{margin:5px 9px!important}
.ztv-chat-gif-library .ztv-gif-search-form input{width:100%;padding:8px 10px;box-sizing:border-box}
.ztv-chat-gif-library .ztv-gif-results{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-content:start;grid-auto-rows:max-content;scrollbar-width:thin}
.ztv-chat-gif-library .ztv-gif-tile{border:none!important;background:transparent!important;height:max-content!important;position:relative;overflow:visible!important}
.ztv-chat-gif-library .ztv-gif-preview{border:none!important;padding:0!important;background:transparent!important;min-height:0!important;height:max-content!important;display:block!important}
.ztv-chat-gif-library .ztv-gif-preview img{display:block;width:100%!important;height:auto!important;max-height:none!important;min-height:0!important;object-fit:contain!important;border-radius:5px}
.ztv-chat-gif-library .ztv-gif-save{position:absolute;right:3px;top:3px;bottom:auto!important;width:29px;height:29px;display:inline-flex;align-items:center;justify-content:center;border-radius:5px;border:1px solid #8c67b7;background:#180f25e6}
.ztv-score-award{display:grid;justify-items:center;align-content:center;gap:4px;margin:9px 0;padding:11px;border:1px solid #ffc65e;border-radius:11px;background:linear-gradient(135deg,#3b2360,#140f21 58%,#4b2a32);box-shadow:0 0 12px #c58a4c49;text-align:center}
.ztv-score-award-icon{font-size:22px}.ztv-score-award-title{font:bold 10px/1.2 'Courier New',monospace;color:#ffdb90;letter-spacing:.04em}
.ztv-score-award-score{font:bold 19px/1.15 Georgia,serif;color:#f8e6a5;text-shadow:0 0 8px #ffb34c}.ztv-score-award-week{font:9px 'Courier New',monospace;color:#c5a9d0}
@media(max-width:920px){.ztv-header .ztv-live-hud{margin-left:8px;padding:3px 6px;gap:5px;font-size:9px}.ztv-header .ztv-live-hud span+span{padding-left:5px}}
@media(max-width:650px){.ztv-header .ztv-live-hud{margin-left:0;font-size:8px;gap:4px}.ztv-header .ztv-live-hud span+span{display:none}.ztv-clips-header{grid-template-columns:1fr!important}.ztv-clips-header .ztv-gallery-volume{grid-column:1!important;justify-self:start!important}.ztv-clips-header .ztv-sort-controls{grid-column:1!important}body.ztv-shared-game .ztv-game-rank-strip .ztv-game-rank-tag{min-width:75px;padding:0 6px;font-size:10px}}

/* GIF search uses the chat composer, and variable-height masonry keeps small GIFs small. */
.ztv-chat-gif-library .ztv-chat-gif-hint{color:#c5a7e5;font:700 10px/1.3 'Courier New',monospace;padding:5px 9px 0;margin:0}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-results{display:block!important;columns:2;column-gap:8px;overflow-y:auto!important;max-height:100%;}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-tile{display:inline-block!important;width:100%!important;break-inside:avoid;vertical-align:top;margin:0 0 8px!important;}


/* Phase 5.15: frame-owned top leaderboard, matching resizing, separate network cards. */
body.ztv-shared-game #play-game-col{align-items:center!important;justify-content:center!important;min-width:0!important;box-sizing:border-box}
body.ztv-shared-game #ztv-arcade-frame{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;
 box-sizing:border-box!important;min-width:0!important;
 width:min(100%, calc((100dvh - 168px) * 640 / 400))!important;
 max-width:100%!important;overflow:hidden!important;border-radius:12px!important;
 border:1px solid #8659ad!important;background:#120b1d!important;
 box-shadow:0 10px 28px #000a!important;
}
body.ztv-shared-game #ztv-arcade-frame>#game-wrapper{
 width:100%!important;max-width:none!important;min-width:0!important;min-height:0!important;
 aspect-ratio:640/400!important;box-sizing:border-box!important;flex:0 0 auto!important;
 border:0!important;border-radius:0!important;margin:0!important;box-shadow:none!important;
}
body.ztv-shared-game #ztv-arcade-frame>#game-controls{
 width:100%!important;max-width:none!important;min-width:0!important;flex:0 0 auto!important;
 border:0!important;border-top:1px solid #68438c!important;border-radius:0!important;
 box-sizing:border-box!important;margin:0!important;padding:7px 10px!important;
}
body.ztv-shared-game #ztv-arcade-frame>.ztv-game-rank-strip{
 width:100%!important;max-width:none!important;min-width:0!important;height:48px!important;min-height:48px!important;
 flex:0 0 48px!important;display:flex!important;align-items:stretch!important;
 border:0!important;border-bottom:1px solid #72499c!important;border-radius:0!important;
 margin:0!important;padding:0!important;overflow:hidden!important;
 background:linear-gradient(95deg,#371d50,#1b102c 65%,#2b1540)!important;box-sizing:border-box!important;
}
body.ztv-shared-game #ztv-arcade-frame .ztv-game-rank-tag{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 flex:0 0 114px!important;min-width:114px!important;height:100%!important;
 padding:0 12px!important;margin:0!important;line-height:1.1!important;
 text-align:center!important;border-right:1px solid #64428a!important;
 font:700 12px/1.1 'Courier New',monospace!important;color:#ffdd90!important;
}
body.ztv-shared-game #ztv-horizontal-top10{
 display:flex!important;align-items:center!important;flex:1 1 auto!important;
 min-width:0!important;height:100%!important;max-width:100%!important;
 overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;
 padding:0 10px!important;margin:0!important;box-sizing:border-box!important;
}
body.ztv-shared-game #ztv-horizontal-top10::-webkit-scrollbar{display:none!important}
body.ztv-shared-game .ztv-horizontal-ranks{
 list-style:none!important;margin:0!important;padding:0!important;height:100%!important;
 display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
 gap:9px!important;width:max-content!important;min-width:max-content!important;
}
body.ztv-shared-game .ztv-horizontal-rank{
 list-style:none!important;display:inline-flex!important;flex-direction:row!important;
 align-items:center!important;justify-content:flex-start!important;gap:8px!important;
 box-sizing:border-box!important;flex:0 0 auto!important;width:auto!important;
 min-width:155px!important;max-width:220px!important;height:34px!important;
 padding:4px 9px!important;margin:0!important;border-radius:7px!important;
 background:#322047!important;border:1px solid #715092!important;
 font:700 11px/1.2 'Courier New',monospace!important;white-space:nowrap!important;
}
body.ztv-shared-game .ztv-horizontal-place{color:#ffdc7e;flex:0 0 auto!important;min-width:14px;text-align:center}
body.ztv-shared-game .ztv-horizontal-avatar{width:23px!important;height:23px!important;flex:0 0 23px!important;object-fit:cover!important;border-radius:50%!important}
body.ztv-shared-game .ztv-horizontal-name{flex:1 1 auto!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;color:#eedbff;text-decoration:none}
body.ztv-shared-game .ztv-horizontal-score{flex:0 0 auto!important;margin-left:auto;color:#bbff96;font-size:12px}
body.ztv-shared-game .ztv-horizontal-empty{color:#c2a0da;font:11px 'Courier New',monospace}
body.ztv-shared-game #play-sidebar-inner.ztv-legacy-ranks-hidden{display:none!important}
/* All pages share the same two independent rounded network widgets. */
#ztv-network-rail-content{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;align-content:start!important}
.ztv-network-card{border-radius:11px!important;overflow:hidden!important;box-shadow:0 5px 16px #0008!important}
.ztv-network-card a.ztv-join{border-radius:7px!important}
.ztv-voice-badges{justify-content:flex-start;align-content:center}
.ztv-role-chip{min-height:23px;line-height:1!important;gap:5px;padding:4px 7px!important}
.ztv-network-rail-content>.ztv-network-card{min-width:0!important}
@media(min-width:1500px){.ztv-clip-page .ztv-network-rail{top:126px!important}}
@media(max-width:900px){body.ztv-shared-game #ztv-arcade-frame{width:100%!important}}
@media(max-width:560px){body.ztv-shared-game #ztv-arcade-frame>.ztv-game-rank-strip{height:43px!important;min-height:43px!important;flex-basis:43px!important}body.ztv-shared-game #ztv-arcade-frame .ztv-game-rank-tag{min-width:85px!important;flex-basis:85px!important;padding:0 5px!important}}


/* Phase 5.16: game, top ten and control bar share the same responsive frame. */
body.ztv-shared-game #ztv-arcade-frame{
 width:var(--ztv-fitted-frame-width,min(100%,calc((100dvh - 300px)*1.6)))!important;
 max-width:100%!important;max-height:calc(100dvh - 145px)!important;
 flex:0 1 auto!important;align-self:center!important;
 display:flex!important;flex-direction:column!important;
 overflow:hidden!important;
}
body.ztv-shared-game #ztv-arcade-frame>#game-wrapper{
 aspect-ratio:640/400!important;flex:0 1 auto!important;
 width:100%!important;max-width:100%!important;min-height:0!important;
 height:auto!important;overflow:hidden!important;
}
body.ztv-shared-game #ztv-arcade-frame>#game-controls{
 display:flex!important;visibility:visible!important;opacity:1!important;
 flex:0 0 auto!important;width:100%!important;
 min-height:56px!important;height:auto!important;
 padding:7px 10px!important;overflow:visible!important;
 align-items:center!important;position:relative!important;z-index:5!important;
}
body.ztv-shared-game #ztv-arcade-frame #game-control-actions{
 display:flex!important;align-items:center!important;gap:6px!important;
 flex-wrap:wrap!important;justify-content:flex-end!important;
}
body.ztv-shared-game #ztv-arcade-frame .ztv-game-rank-strip{flex:0 0 48px!important;height:48px!important}
@media(max-height:800px){
 body.ztv-shared-game #ztv-arcade-frame{max-height:calc(100dvh - 117px)!important}
 body.ztv-shared-game #ztv-arcade-frame .ztv-game-rank-strip{flex-basis:42px!important;height:42px!important;min-height:42px!important}
}
@media(max-width:850px){body.ztv-shared-game #ztv-arcade-frame{max-height:none!important}}

/* The gallery title and sorting tools form one compact toolbar. */
body .ztv-clips-header{display:block!important;margin-bottom:9px!important;
 padding:10px 12px!important;border:1px solid #69418d!important;
 border-radius:10px!important;
 background:linear-gradient(120deg,#1d112acb,#110a1ecb)!important;
 box-shadow:inset 0 1px 0 #b185d02c,0 4px 17px #0008!important;
}
body .ztv-clips-header .ztv-section-title{display:block!important;margin:0 0 9px!important}
body .ztv-clips-header .ztv-sort-controls,
body .ztv-clips-header .ztv-gallery-toolbar{
 display:flex!important;align-items:center!important;flex-wrap:wrap!important;
 gap:7px!important;width:100%!important;min-width:0!important;
 border:0!important;margin:0!important;padding:0!important;
}
body .ztv-clips-header .ztv-sort-controls .ztv-gallery-volume{
 display:inline-flex!important;align-items:center!important;
 margin:0 0 0 auto!important;position:static!important;float:none!important;
 grid-column:auto!important;transform:none!important;justify-self:auto!important;
 max-width:100%!important;border-radius:7px!important;box-shadow:none!important;
}
body .ztv-clips-header .ztv-gallery-volume input{max-width:90px!important}
@media(max-width:620px){
 body .ztv-clips-header .ztv-sort-controls .ztv-gallery-volume{margin:6px 0 0!important}
}

/* Clip player and comments now read as one connected Z.TV broadcast panel. */
body.ztv-clip-page .ztv-clip-experience{
 width:100%;min-width:0;margin-top:12px;margin-bottom:50px;
 border:1px solid #8453b3;border-radius:13px;
 overflow:hidden;background:linear-gradient(145deg,#1e112c,#0e0b17);
 box-shadow:0 12px 28px #000a;
}
body.ztv-clip-page .ztv-clip-experience .ztv-clip-video-wrap{
 width:100%;margin:0!important;padding:0!important;overflow:hidden;
 border:0!important;border-radius:12px 12px 0 0!important;
 background:#060508;
}
body.ztv-clip-page .ztv-clip-experience .ztv-player-video{margin:0 auto!important;border:0!important}
body.ztv-clip-page .ztv-clip-meta-panel{display:grid;gap:10px;padding:14px 18px 12px;
 border-top:1px solid #6a438f;border-bottom:1px solid #79539c;
 background:linear-gradient(105deg,#291537,#130e21 70%)}
body.ztv-clip-page .ztv-clip-meta-head{display:flex;align-items:center;justify-content:space-between;
 flex-wrap:wrap;gap:9px 20px;min-width:0}
body.ztv-clip-page .ztv-clip-meta-head .ztv-clip-title{margin:0!important;min-width:0;
 flex:1 1 260px;overflow-wrap:anywhere;line-height:1.22}
body.ztv-clip-page .ztv-clip-meta-head .ztv-clip-volume{
 display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;
 margin:0!important;border-radius:8px!important;padding:7px 10px!important;
}
body.ztv-clip-page .ztv-clip-meta-panel .ztv-clip-credits,
body.ztv-clip-page .ztv-clip-meta-panel .ztv-clip-description{margin:0!important}
body.ztv-clip-page .ztv-clip-meta-panel .ztv-recovery-actions{
 margin:0!important;padding:9px 0 1px!important;display:flex!important;
 align-items:center!important;flex-wrap:wrap!important;gap:10px 14px!important;
 border-top:1px solid #463057;
}
body.ztv-clip-page .ztv-clip-meta-panel .ztv-recovery-actions button{
 display:inline-flex;align-items:center;justify-content:center;border-radius:7px;
}
body.ztv-clip-page .ztv-clip-experience .ztv-comments{
 margin:0!important;padding:16px 18px 22px!important;border:0!important;
 border-radius:0!important;background:linear-gradient(180deg,#160e23,#0e0916);
}
body.ztv-clip-page .ztv-clip-experience .ztv-comments-heading{
 display:flex;align-items:center;justify-content:space-between;gap:10px;
}
/* Preserve a slight buffer between the fixed site chat and clip/gallery media. */
@media(min-width:900px){
 body.ztv-body:not(.ztv-shared-game) .ztv-chat-root:not(.ztv-game-chat-docked) .ztv-chat-panel{
   width:calc(min(405px,100vw - 20px) - 2px)!important;
   max-width:calc(100vw - 22px)!important;
 }
}

/* Phase 5.16.1 - anchored frame and docked audio, no clipped game controls. */
body.ztv-shared-game #ztv-arcade-frame{
 width:var(--ztv-fitted-frame-width,min(100%,1000px))!important;
 max-width:100%!important;max-height:none!important;
 overflow:visible!important;align-self:center!important;
 flex:0 0 auto!important;box-sizing:border-box!important;
}
body.ztv-shared-game #ztv-arcade-frame>#game-wrapper{
 width:100%!important;max-width:100%!important;height:auto!important;
 aspect-ratio:640/400!important;flex:0 0 auto!important;
}
body.ztv-shared-game #ztv-arcade-frame>#game-controls{
 display:flex!important;visibility:visible!important;opacity:1!important;
 width:100%!important;max-width:100%!important;min-height:56px!important;
 flex:0 0 auto!important;overflow:visible!important;position:relative!important;
 z-index:4!important;border-top:1px solid #7949a9!important;
}
body.ztv-shared-game #ztv-arcade-frame #game-control-actions{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:5px!important}
@media(max-height:800px){body.ztv-shared-game #ztv-arcade-frame{max-height:none!important}}
/* Gallery controls own both the sort actions and their preview-audio slider. */
body .ztv-clips-header .ztv-sort-controls{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important}
body .ztv-clips-header .ztv-sort-controls .ztv-gallery-volume{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 flex:0 0 auto!important;position:static!important;float:none!important;
 margin:0 0 0 auto!important;max-width:100%!important;transform:none!important;
 padding:6px 10px!important;border-radius:6px!important;
 background:linear-gradient(130deg,#2e1945,#1b1029)!important;
 border:1px solid #734a9c!important;
}
/* Clip video/metadata/comments share a single continuous broadcast frame. */
body.ztv-clip-page .ztv-clip-experience{overflow:hidden!important}
body.ztv-clip-page .ztv-clip-meta-panel{box-sizing:border-box}
body.ztv-clip-page .ztv-clip-experience .ztv-comments{box-sizing:border-box}
/* Preserve breathing room around fixed chat on gallery and clip pages. */
@media(min-width:900px){body.ztv-body:not(.ztv-shared-game) .ztv-chat-root{right:1px!important}body.ztv-body:not(.ztv-shared-game) .ztv-chat-panel{max-width:calc(100% - 1px)!important}}


/* Phase 5.16.1: bounded desktop arcade and truly usable phone/tablet layout.
   Deliberately supersedes accumulated Phase 5.11–5.16 layout rules. */
html:has(body.ztv-shared-game),body.ztv-shared-game{overflow:hidden!important;height:100dvh!important;max-width:100vw!important}
body.ztv-shared-game #play-root{width:100%!important;max-width:100vw!important;overflow:hidden!important;min-height:0!important;height:calc(100dvh - 93px)!important}
body.ztv-shared-game #play-game-col{overflow:hidden!important;min-width:0!important;min-height:0!important;box-sizing:border-box!important;padding:8px 12px!important}
body.ztv-shared-game #ztv-arcade-frame{
  box-sizing:border-box!important;flex:0 0 auto!important;
  width:min(100%,var(--ztv-fitted-frame-width,800px))!important;
  max-width:100%!important;overflow:hidden!important;
  border-radius:12px!important;max-height:100%!important;
}
body.ztv-shared-game #ztv-arcade-frame>#game-wrapper{
  display:block!important;flex:0 0 auto!important;
  width:100%!important;aspect-ratio:640/400!important;
  border-radius:0!important;overflow:hidden!important;
}
body.ztv-shared-game #ztv-arcade-frame>#game-controls{
  box-sizing:border-box!important;display:flex!important;
  flex:0 0 auto!important;min-height:52px!important;
  overflow:visible!important;position:relative!important;
  border-radius:0!important;margin:0!important;
}
body.ztv-shared-game #game-canvas{display:block!important;width:100%!important;height:100%!important}
body.ztv-shared-game #ztv-arcade-frame .ztv-game-rank-strip{flex:0 0 40px!important;height:40px!important;min-height:40px!important;max-height:40px!important}
/* No double-scrollbar along the desktop game-to-chat divider. */
body.ztv-shared-game #play-sidebar{overflow:hidden!important;min-height:0!important}
body.ztv-shared-game #play-sidebar .ztv-chat-panel{min-width:0!important;overflow:hidden!important}

/* GIF result cards: contained masonry columns, no phantom third column. */
body .ztv-chat-root .ztv-chat-gif-library,
body .ztv-chat-root .ztv-chat-gif-library *{box-sizing:border-box}
body .ztv-chat-root .ztv-chat-gif-library{min-width:0!important;max-width:100%!important;overflow:hidden!important}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-results{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 columns:auto!important;gap:8px!important;align-content:start!important;
 width:100%!important;max-width:100%!important;min-width:0!important;
 padding:8px!important;overflow-x:hidden!important;overflow-y:auto!important;
 flex:1 1 auto!important;min-height:0!important;max-height:none!important;
 scrollbar-gutter:stable!important;
}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-column{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
 gap:8px!important;min-width:0!important;max-width:100%!important;
}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-tile{
 display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;
 height:auto!important;margin:0!important;overflow:hidden!important;position:relative!important;
 break-inside:avoid!important;
}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-preview{
 display:block!important;width:100%!important;max-width:100%!important;
 height:auto!important;min-height:0!important;padding:0!important;overflow:hidden!important;
 background:transparent!important;
}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-preview img{
 display:block!important;width:100%!important;max-width:100%!important;
 height:auto!important;max-height:225px!important;min-height:0!important;
 aspect-ratio:auto!important;object-fit:contain!important;border-radius:5px!important;
}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-save{
 position:absolute!important;top:4px!important;right:4px!important;
 bottom:auto!important;width:29px!important;height:29px!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 z-index:2!important;
}
/* Dedicated search looks like a Z.TV terminal field, not a browser default input. */
body .ztv-chat-root .ztv-chat-gif-library .ztv-chat-gif-hint{
 display:flex!important;align-items:stretch!important;flex-direction:column!important;
 gap:5px!important;min-width:0!important;max-width:100%!important;
 padding:7px 10px 3px!important;margin:0!important;
 color:#d8b6f5!important;letter-spacing:.06em!important;
}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-live-search{
 box-sizing:border-box!important;display:block!important;width:100%!important;
 min-width:0!important;max-width:100%!important;height:38px!important;
 border:1px solid #9a66d2!important;border-radius:7px!important;
 background:linear-gradient(130deg,#23122e,#120d1b)!important;
 color:#f4ddff!important;padding:9px 12px!important;
 font:12px/1.25 'Courier New',monospace!important;
 box-shadow:inset 0 1px 3px #0008!important;outline:none;
}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-live-search:focus{
 border-color:#d4a0ff!important;box-shadow:0 0 0 2px #9a51d644!important;
}
body .ztv-chat-root .ztv-chat-gif-library .ztv-gif-live-search::placeholder{color:#a78bb7!important;opacity:1!important}

/* Full-width media and touch targets without a sideways page scroll. */
@media (max-width:900px){
 html,html:has(body.ztv-shared-game),body,body.ztv-shared-game{
   overflow-x:hidden!important;overflow-y:auto!important;height:auto!important;min-height:100dvh!important;
 }
 body.ztv-shared-game #play-root{
   display:flex!important;flex-direction:column!important;
   width:100%!important;height:auto!important;min-height:0!important;
   overflow:visible!important;
 }
 body.ztv-shared-game #powerup-guide{display:none!important}
 body.ztv-shared-game #play-game-col{
   box-sizing:border-box!important;display:flex!important;width:100%!important;
   flex:0 0 auto!important;padding:10px 8px 8px!important;
   overflow:visible!important;min-width:0!important;
 }
 body.ztv-shared-game #ztv-arcade-frame{
   width:100%!important;max-width:100%!important;max-height:none!important;
   overflow:hidden!important;align-self:stretch!important;
   border-radius:10px!important;
 }
 body.ztv-shared-game #ztv-arcade-frame>#game-wrapper{
   width:100%!important;height:auto!important;aspect-ratio:640/400!important;
   overflow:hidden!important;
 }
 body.ztv-shared-game #ztv-arcade-frame>#game-controls{
   display:flex!important;flex-wrap:wrap!important;gap:8px!important;
   padding:9px!important;min-height:0!important;
 }
 body.ztv-shared-game #ztv-arcade-frame #game-control-actions{
   display:flex!important;justify-content:flex-start!important;flex-wrap:wrap!important;
   width:100%!important;gap:7px!important;
 }
 body.ztv-shared-game #ztv-arcade-frame #game-control-actions .game-btn{
   min-height:40px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
 }
 body.ztv-shared-game #ztv-arcade-frame .ztv-game-rank-strip{
   width:100%!important;min-width:0!important;flex:0 0 43px!important;height:43px!important;
 }
 body.ztv-shared-game #play-sidebar{
   box-sizing:border-box!important;position:relative!important;
   width:calc(100% - 16px)!important;max-width:none!important;
   flex:0 0 auto!important;height:clamp(420px,75dvh,760px)!important;
   min-height:420px!important;margin:3px 8px 12px!important;
   overflow:hidden!important;border:1px solid #7448a0!important;border-radius:10px!important;
 }
 body.ztv-shared-game .ztv-chat-drag-handle{display:none!important}
 body.ztv-shared-game #play-sidebar .ztv-chat-panel{width:100%!important;height:100%!important}
 body.ztv-shared-game .ztv-shared-game-header{
   display:flex!important;align-items:center!important;justify-content:space-between!important;
   flex-wrap:wrap!important;padding:8px 10px!important;
   height:auto!important;min-height:62px!important;gap:8px!important;
 }
 body .ztv-header .ztv-recovery-nav{display:flex!important;flex-wrap:wrap!important;gap:6px!important;min-width:0!important}
 body .ztv-header .ztv-recovery-nav>a{min-height:38px!important;padding:8px 10px!important}
 .ztv-ticker{max-width:100vw!important;overflow:hidden!important}
 body.ztv-body:not(.ztv-shared-game){max-width:100%!important;overflow-x:hidden!important}
 body.ztv-body:not(.ztv-shared-game) .ztv-main,
 body.ztv-body:not(.ztv-shared-game) .ztv-network-rail{
   position:static!important;box-sizing:border-box!important;width:100%!important;
   max-width:100%!important;margin:10px auto!important;padding:0 12px!important;
   overflow:visible!important;
 }
 body.ztv-body:not(.ztv-shared-game) .ztv-grid{
   box-sizing:border-box!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
   width:100%!important;max-width:100%!important;gap:10px!important;
 }
 body.ztv-body:not(.ztv-shared-game) .ztv-tile{min-width:0!important}
 body.ztv-body:not(.ztv-shared-game) .ztv-tile-media{max-width:100%!important}
 body.ztv-clip-page .ztv-clip-experience{width:100%!important;min-width:0!important;margin-bottom:12px!important}
 body.ztv-clip-page .ztv-clip-meta-panel{padding:12px!important}
 body.ztv-body:not(.ztv-shared-game) .ztv-chat-root:not(.ztv-game-chat-docked) .ztv-chat-panel{
   width:min(420px,calc(100vw - 12px))!important;
   max-width:calc(100vw - 12px)!important;
   height:min(65dvh,590px)!important;
 }
 .ztv-community-modal{max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px)!important;overflow-y:auto!important}
}
@media (max-width:600px){
 body.ztv-body:not(.ztv-shared-game) .ztv-grid{grid-template-columns:1fr!important}
 body .ztv-header .ztv-recovery-nav>a{font-size:10px!important;line-height:1.25!important}
 body.ztv-body:not(.ztv-shared-game) .ztv-network-rail-content{grid-template-columns:1fr!important}
 body.ztv-body:not(.ztv-shared-game) .ztv-clips-header .ztv-sort-controls{
    display:flex!important;flex-wrap:wrap!important;gap:6px!important;
 }
 body.ztv-body:not(.ztv-shared-game) .ztv-clips-header .ztv-gallery-volume{
    max-width:100%!important;margin:5px 0 0!important;
 }
 body.ztv-body:not(.ztv-shared-game) .ztv-about-text{overflow-wrap:anywhere!important}
 body.ztv-shared-game #game-score-overlay{top:12px!important;font-size:18px!important;padding:4px 12px!important}
 body.ztv-shared-game #ztv-arcade-frame #game-control-actions .game-btn{
   min-height:42px!important;flex:1 1 auto!important;padding:7px 9px!important;font-size:11px!important;
 }
 body.ztv-shared-game .ztv-chat-gif-library{height:280px!important;max-height:60%!important}
 .ztv-chat-root .ztv-chat-compose input{min-width:0!important}
}
@media (max-width:380px){
 body.ztv-shared-game #ztv-arcade-frame .ztv-game-rank-tag{min-width:72px!important;flex-basis:72px!important}
 body.ztv-shared-game #ztv-arcade-frame #game-control-actions .game-btn{font-size:10px!important}
}
@media (prefers-reduced-motion:reduce){
 .ztv-avatar-ring,.ztv-avatar-pulse,.ztv-name-rainbow{animation:none!important}
}

/* Measure real header/ticker height instead of assuming a constant 93px. */
body.ztv-shared-game #play-root{height:calc(100dvh - var(--ztv-chrome-height,93px))!important;}
@media(max-width:900px){body.ztv-shared-game #play-root{height:auto!important}}


/* Phase 5.16.2: one always-visible, correctly stacked site header + newsbar. */
body .ztv-header,body.ztv-shared-game>.ztv-shared-game-header{
 position:sticky!important;top:0!important;z-index:7200!important;
}
body #ztv-ticker{
 position:sticky!important;top:var(--ztv-header-sticky-height,62px)!important;
 z-index:7100!important;flex-shrink:0!important;
}
body #ztv-ticker[hidden]{display:none!important}
/* Desktop initial game: fit the whole arcade frame immediately, never clip
   the controls or the chat behind a fixed-height overflow ancestor. */
@media(min-width:901px){
 html:has(body.ztv-shared-game),body.ztv-shared-game{height:100dvh!important;overflow:hidden!important}
 body.ztv-shared-game #play-root{
  height:calc(100dvh - var(--ztv-chrome-height,93px))!important;
  max-height:calc(100dvh - var(--ztv-chrome-height,93px))!important;
  min-height:0!important;
 }
 body.ztv-shared-game #ztv-arcade-frame{
  max-height:calc(100dvh - var(--ztv-chrome-height,93px) - 22px)!important;
  overflow:hidden!important;
 }
 body.ztv-shared-game #play-sidebar{height:100%!important;min-height:0!important;overflow:hidden!important}
 body.ztv-shared-game #ztv-arcade-frame>#game-controls{
  flex-shrink:0!important;min-height:52px!important;
 }
}
/* The native video controls already own the individual clip's volume. */
body.ztv-clip-page .ztv-clip-volume{display:none!important}
body.ztv-clip-page #ztv-autoplay-toggle{
 display:inline-flex;align-items:center;justify-content:center;
 min-height:35px;padding:7px 12px;white-space:nowrap;
 border:1px solid #8657b5;border-radius:6px;
 background:linear-gradient(150deg,#3a2054,#20142d);color:#f4ddff;
 font:700 11px/1.3 'Courier New',monospace;cursor:pointer;
 box-shadow:inset 0 1px #ffffff16;
}
body.ztv-clip-page #ztv-autoplay-toggle[aria-pressed="true"]{
 color:#dbffac;border-color:#a3bd82;box-shadow:0 0 9px #a3bd8240;
}
body.ztv-clip-page .ztv-recovery-actions{flex-wrap:wrap;gap:9px}
@media(max-width:900px){
 body.ztv-shared-game #play-root{height:auto!important;max-height:none!important}
 body.ztv-shared-game #ztv-arcade-frame{max-height:none!important}
}

/* Phase 5.16.3: only the two clip-navigation links; autoplay untouched. */
body.ztv-clip-page main.ztv-main > p:first-child > a[href="/ztv"],
body.ztv-clip-page .ztv-recovery-actions > a[href^="/ztv/clips/"] {
 display:inline-flex!important;align-items:center;justify-content:center;
 min-height:36px;padding:8px 14px!important;box-sizing:border-box;
 background:linear-gradient(150deg,#42245e,#241231)!important;
 color:#f6dcff!important;border:1px solid #9566c8!important;
 border-radius:7px;text-decoration:none!important;
 box-shadow:inset 0 1px 0 #ffffff24,0 3px 12px #0008;
 font:700 12px/1.25 'Courier New',monospace;
 transition:background .13s,border-color .13s,box-shadow .13s;
}
body.ztv-clip-page main.ztv-main > p:first-child > a[href="/ztv"]:hover,
body.ztv-clip-page .ztv-recovery-actions > a[href^="/ztv/clips/"]:hover {
 background:linear-gradient(150deg,#6b329a,#432059)!important;
 border-color:#d79eff!important;box-shadow:0 0 12px #ab5bca88;
}
body.ztv-clip-page main.ztv-main > p:first-child > a[href="/ztv"]:focus-visible,
body.ztv-clip-page .ztv-recovery-actions > a[href^="/ztv/clips/"]:focus-visible{outline:2px solid #e9beff;outline-offset:3px}
/* A conspicuous live indicator instead of the older monochrome bullet. */
.ztv-chat-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px}

/* Phase 5.17 — account-synced retro chat identities (built-in fonts, safe CSS presets). */
.ztv-chat-persona-preview{display:flex;align-items:center;gap:12px;min-height:65px;min-width:0;max-width:100%;box-sizing:border-box;padding:12px;margin:8px 0 15px;border-radius:12px;overflow:hidden}
.ztv-chat-persona-preview .ztv-chat-avatar{flex:none;width:42px;height:42px;border-radius:50%;object-fit:cover}
.ztv-chat-persona-preview .ztv-chat-content{min-width:0;flex:1;overflow-wrap:anywhere}
.ztv-chat-style-form select{cursor:pointer;min-height:37px}
.ztv-chat-style-form .ztv-appearance-choice{display:grid;gap:5px}
.ztv-chat-local-settings{border-top:1px solid #63438a;margin-top:16px;padding:14px 3px 4px}
.ztv-chat-local-settings>strong{display:block;color:#d4acff;font-size:11px;letter-spacing:.08em;margin-bottom:8px}
.ztv-chat-root .ztv-chat-row{border-radius:8px;min-width:0;max-width:100%;box-sizing:border-box}
.ztv-chat-root .ztv-chat-author{display:inline-block;max-width:100%;word-break:break-word;vertical-align:baseline}
.ztv-name-font-comic{font-family:'Comic Sans MS','Comic Sans',cursive!important}
.ztv-name-font-impact{font-family:Impact,'Arial Black',sans-serif!important;letter-spacing:.05em}
.ztv-name-font-typewriter{font-family:'American Typewriter','Courier New',monospace!important}
.ztv-name-font-script{font-family:'Brush Script MT','Segoe Script',cursive!important;font-size:1.12em}
.ztv-name-font-futuristic{font-family:'Trebuchet MS',Verdana,sans-serif!important;font-variant:small-caps;letter-spacing:.085em}
.ztv-name-font-gothic{font-family:'Old English Text MT',Georgia,serif!important}
.ztv-name-font-rounded{font-family:'Arial Rounded MT Bold',Verdana,sans-serif!important}
.ztv-name-font-stencil{font-family:Stencil,'Arial Black',Impact,sans-serif!important;letter-spacing:.045em}
.ztv-name-fire{color:#ffb060!important;text-shadow:0 0 6px #ef3900,0 0 12px #ff4a18}
.ztv-name-ice{color:#a8faff!important;text-shadow:0 0 6px #2aa9ff,0 0 12px #3fe4ff}
.ztv-name-chrome{background:linear-gradient(#fff,#ddd,#777,#efffef);background-clip:text;-webkit-background-clip:text;color:transparent!important;filter:drop-shadow(1px 1px #0c051a)}
.ztv-name-glitch{color:#eee8ff!important;text-shadow:1px 0 #fd5cce,-1px 0 #7ffcef;animation:ztv-chat-glitch 6s ease-in-out infinite}
.ztv-name-starlight{color:#fff4c1!important;text-shadow:0 0 4px #fff,0 0 13px #d0a5fa;animation:ztv-chat-stars 4s ease-in-out infinite}
.ztv-name-outline{color:#22142e!important;-webkit-text-stroke:.8px #d8b0ff;text-shadow:0 0 5px #b772e4}
.ztv-name-ghost{color:#e6dfff9c!important;text-shadow:0 1px 7px #e3c8ffb0}
@keyframes ztv-chat-glitch{0%,93%,100%{transform:translateX(0)}94%{transform:translateX(-1px)}96%{transform:translateX(1px)}}
@keyframes ztv-chat-stars{50%{filter:brightness(1.35)}}
.ztv-chat-root .ztv-chat-author[data-color="orange"]{color:#ffc084!important}
.ztv-chat-root .ztv-chat-author[data-color="red"]{color:#ff8693!important}
.ztv-chat-root .ztv-chat-author[data-color="royal"]{color:#9eb5ff!important}
.ztv-chat-root .ztv-chat-author[data-color="cyan"]{color:#78f1ff!important}
.ztv-chat-root .ztv-chat-author[data-color="mint"]{color:#b7ffdc!important}
.ztv-chat-root .ztv-chat-author[data-color="silver"]{color:#ded9ef!important}
/* Effect colors intentionally win over base color only for text-effect presets. */
.ztv-chat-root .ztv-chat-author.ztv-name-fire{color:#ffb060!important}
.ztv-chat-root .ztv-chat-author.ztv-name-ice{color:#a8faff!important}
.ztv-chat-root .ztv-chat-author.ztv-name-chrome{color:transparent!important}
.ztv-chat-root .ztv-chat-author.ztv-name-outline{color:#22142e!important}
.ztv-chat-root .ztv-chat-author.ztv-name-ghost{color:#e6dfff9c!important}
.ztv-avatar-scanline{border:1px solid #89b7f6!important;box-shadow:inset 0 0 8px #85e8ff,0 0 6px #284d96}
.ztv-avatar-halo{border:2px solid #fff8c9!important;box-shadow:0 0 8px #fff8bb,0 0 19px #b87cff!important}
.ztv-avatar-neon{border:2px solid #65ffee!important;box-shadow:0 0 7px #33bced,0 0 13px #c277ff!important}
.ztv-avatar-static{border:2px dashed #ddbaff!important;box-shadow:0 0 8px #8e64bb!important}
.ztv-avatar-orbit{border:2px dotted #ffd46c!important;box-shadow:0 0 13px #e2b8fc!important;animation:ztv-avatar-pulse 5s ease-in-out infinite}
.ztv-bubble-classic{background:transparent}
.ztv-bubble-glass{background:linear-gradient(125deg,#251638a9,#211b4090);border:1px solid #785d9770!important}
.ztv-bubble-arcade{background:linear-gradient(120deg,#180b29,#301942);border:1px solid #af63ca!important;box-shadow:inset 0 0 0 1px #a258ca2b}
.ztv-bubble-terminal{background:#0b1b19!important;border:1px solid #366b51!important;color:#c7ffd7}
.ztv-bubble-nebula{background:linear-gradient(130deg,#2f1354bd,#121a3bc2,#2a1534b7);border:1px solid #7b64b3!important}
.ztv-bubble-outline{border:1px dashed #9570bd!important;background:#130d21}
.ztv-bubble-sticker{background:#35204a;border:2px solid #f4d6ff!important;border-radius:14px!important}
.ztv-bubble-plasma{background:linear-gradient(120deg,#421452c0,#17225ec2);border:1px solid #b856d1!important;box-shadow:inset 0 0 10px #732cc73d}
/* No flashing/strobing; honor OS reduced-motion settings. */
@media(prefers-reduced-motion:reduce){.ztv-name-glitch,.ztv-name-starlight,.ztv-avatar-orbit,.ztv-avatar-ring,.ztv-avatar-pulse,.ztv-avatar-spin{animation:none!important}}
/* Keep the clip editor accessible above gallery overlays but clear of chat. */
body.ztv-clip-page .ztv-live-edit-trigger{position:fixed!important;left:max(12px,env(safe-area-inset-left))!important;bottom:max(14px,env(safe-area-inset-bottom))!important;z-index:8500!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;border-radius:10px;background:linear-gradient(125deg,#65309f,#241238);border:1px solid #bd83e8;color:#f5e7ff;box-shadow:0 5px 20px #000b;padding:9px 14px}
body.ztv-clip-page .ztv-editor-recheck{background:linear-gradient(125deg,#452267,#291934)}
@media(max-width:600px){body.ztv-clip-page .ztv-live-edit-trigger{bottom:74px!important;left:12px!important}.ztv-chat-persona-preview{padding:9px}}

/* Phase 5.18 — server-verified mentions and per-account quiet nudge preferences. */
.ztv-chat-root .ztv-chat-mention{color:#ffc97e!important;background:#6b3c2f66;border:1px solid #e3a66d88;border-radius:5px;padding:1px 3px;text-decoration:none;font-weight:700;overflow-wrap:anywhere}
.ztv-chat-root .ztv-chat-mention:hover,.ztv-chat-root .ztv-chat-mention.is-me{background:#8b4b69;color:#fff5ca!important}
.ztv-chat-root .ztv-chat-mention-menu{position:absolute;bottom:52px;left:5px;right:5px;z-index:30;display:flex;flex-direction:column;gap:2px;max-height:min(250px,45vh);overflow-y:auto;background:#191122;border:1px solid #9d69d0;border-radius:10px;box-shadow:0 -7px 28px #000c;padding:6px;box-sizing:border-box}
.ztv-chat-root .ztv-chat-mention-menu[hidden]{display:none!important}
.ztv-chat-root .ztv-chat-mention-option{background:#22152f;border:1px solid transparent;border-radius:6px;color:#f8e7ff;display:flex;align-items:center;gap:9px;min-height:38px;padding:5px 8px;text-align:left;cursor:pointer;width:100%;overflow-wrap:anywhere}
.ztv-chat-root .ztv-chat-mention-option:hover,.ztv-chat-root .ztv-chat-mention-option.is-selected{background:#51296e;border-color:#ac7adc}
.ztv-chat-root .ztv-chat-mention-option img{width:27px;height:27px;object-fit:cover;border-radius:50%;flex:none}
.ztv-chat-mention-settings{border-top:1px solid #624284;margin-top:12px;padding:12px 4px}
.ztv-chat-mention-settings>strong{display:block;font-size:11px;color:#dab6ff;letter-spacing:.07em;margin-bottom:9px}
.ztv-chat-mention-settings .ztv-profile-check{display:flex;align-items:center;gap:9px}
.ztv-chat-ping-notice{position:absolute;right:5px;bottom:calc(100% + 7px);max-width:min(370px,90vw);box-sizing:border-box;padding:10px 13px;background:linear-gradient(115deg,#462064,#21142c);border:1px solid #d19be9;color:#fff0f9;box-shadow:0 5px 18px #0009;border-radius:10px;text-align:left;cursor:pointer;z-index:100;overflow-wrap:anywhere}
@media(max-width:600px){.ztv-chat-root .ztv-chat-mention-menu{max-height:30vh}.ztv-chat-root .ztv-chat-mention-option{min-height:44px}.ztv-chat-ping-notice{right:8px;bottom:calc(100% + 6px)}}


/* Phase 5.18.2 — protected sidebars. Preview cards shrink before the network
   rail or live chat becomes unreadable. No video/game layout or API changes. */
@media (min-width:1080px) {
 body.ztv-body:not(.ztv-shared-game) {
  --ztv-safe-rail:clamp(235px,18vw,300px);
  --ztv-safe-chat:clamp(315px,26.6vw,400px);
  --ztv-safe-gap:14px;
 }
 body.ztv-body:not(.ztv-shared-game) #ztv-network-rail {
  position:fixed!important;
  z-index:20!important;
  top:calc(var(--ztv-header-sticky-height,62px) + 41px)!important;
  left:var(--ztv-safe-gap)!important;
  bottom:12px!important;
  width:var(--ztv-safe-rail)!important;
  min-width:235px!important;
  max-width:300px!important;
  max-height:calc(100dvh - var(--ztv-header-sticky-height,62px) - 54px)!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  box-sizing:border-box!important;
  padding:0 3px 6px 0!important;
  margin:0!important;
  scrollbar-color:#7951a2 transparent;
 }
 body.ztv-body:not(.ztv-shared-game) main.ztv-main {
  position:relative;
  box-sizing:border-box!important;
  width:calc(100% - var(--ztv-safe-rail) - var(--ztv-safe-chat) - 42px)!important;
  max-width:none!important;
  min-width:0!important;
  padding:16px 7px 64px!important;
  margin-left:calc(var(--ztv-safe-rail) + 28px)!important;
  margin-right:calc(var(--ztv-safe-chat) + var(--ztv-safe-gap))!important;
 }
 body.ztv-body:not(.ztv-shared-game) .ztv-chat-root:not(.ztv-game-chat-docked) .ztv-chat-panel {
  box-sizing:border-box!important;
  width:var(--ztv-safe-chat)!important;
  min-width:315px!important;
  max-width:400px!important;
 }
 body.ztv-body:not(.ztv-shared-game) .ztv-grid {
  width:100%!important; min-width:0!important;
  display:grid!important; gap:clamp(7px,.85vw,12px)!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
}
@media (min-width:1400px) {
 body.ztv-body:not(.ztv-shared-game) .ztv-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media (min-width:1750px) {
 body.ztv-body:not(.ztv-shared-game) .ztv-grid {grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}
/* Mid-width laptops / browser zoom: bring the network cards into document
   flow, above the gallery, rather than clipping them into a thin left strip. */
@media (min-width:901px) and (max-width:1079px) {
 body.ztv-body:not(.ztv-shared-game) {
  --ztv-safe-chat:clamp(305px,32vw,340px);
 }
 body.ztv-body:not(.ztv-shared-game) #ztv-network-rail {
  position:relative!important;
  top:auto!important;bottom:auto!important;left:auto!important;
  box-sizing:border-box!important;
  width:calc(100% - var(--ztv-safe-chat) - 30px)!important;
  min-width:0!important;max-width:none!important;max-height:none!important;
  padding:0!important;margin:12px 0 12px 12px!important;
  overflow:visible!important;
 }
 body.ztv-body:not(.ztv-shared-game) #ztv-network-rail-content {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
 }
 body.ztv-body:not(.ztv-shared-game) main.ztv-main {
  position:relative;box-sizing:border-box!important;
  width:calc(100% - var(--ztv-safe-chat) - 30px)!important;
  min-width:0!important;max-width:none!important;
  margin:0 0 0 12px!important;padding:12px 0 50px!important;
 }
 body.ztv-body:not(.ztv-shared-game) .ztv-chat-root:not(.ztv-game-chat-docked) .ztv-chat-panel {
  box-sizing:border-box!important;width:var(--ztv-safe-chat)!important;
  min-width:0!important;max-width:340px!important;
 }
 body.ztv-body:not(.ztv-shared-game) .ztv-grid {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:9px!important;width:100%!important;
 }
}
/* Smaller viewports use the already-established stacked mobile/tablet layout.
   Both widgets remain full-sized cards, never a compressed fixed rail. */
@media (max-width:900px) {
 body.ztv-body:not(.ztv-shared-game) #ztv-network-rail {
  position:relative!important;left:auto!important;top:auto!important;bottom:auto!important;
  min-width:0!important;max-height:none!important;overflow:visible!important;
 }
 body.ztv-body:not(.ztv-shared-game) #ztv-network-rail-content {min-width:0!important;}
 body.ztv-body:not(.ztv-shared-game) .ztv-chat-root:not(.ztv-game-chat-docked) .ztv-chat-panel {
  box-sizing:border-box!important;min-width:0!important;
  width:min(390px,calc(100vw - 16px))!important;
  max-width:calc(100vw - 16px)!important;
 }
}
/* Never force a roster, role badge or rank name outside its rounded card. */
body.ztv-body:not(.ztv-shared-game) #ztv-network-rail,
body.ztv-body:not(.ztv-shared-game) #ztv-network-rail * {box-sizing:border-box;}
body.ztv-body:not(.ztv-shared-game) .ztv-network-card {min-width:0!important;width:100%!important;}
body.ztv-body:not(.ztv-shared-game) .ztv-network-rank,
body.ztv-body:not(.ztv-shared-game) .ztv-voice-user,
body.ztv-body:not(.ztv-shared-game) .ztv-voice-identity {min-width:0!important;}
body.ztv-body:not(.ztv-shared-game) .ztv-network-rank a,
body.ztv-body:not(.ztv-shared-game) .ztv-rank-name,
body.ztv-body:not(.ztv-shared-game) .ztv-voice-user-name {
 min-width:0!important;overflow-wrap:anywhere!important;word-break:normal!important;
}
body.ztv-body:not(.ztv-shared-game) .ztv-role-chip {
 max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;
}
body.ztv-body:not(.ztv-shared-game) .ztv-network-voice .ztv-voice-members,
body.ztv-body:not(.ztv-shared-game) .ztv-voice-badges {max-width:100%!important;min-width:0!important;}
body.ztv-body:not(.ztv-shared-game) .ztv-network-score {flex-shrink:0!important;}
body.ztv-body:not(.ztv-shared-game) .ztv-tile,
body.ztv-body:not(.ztv-shared-game) .ztv-tile-media {min-width:0!important;max-width:100%!important;}

/* Z.TV 1.3.4 — unified masthead. Equal-size navigation controls, aligned
   network status, and predictable small-screen wrapping. Scoped to Z.TV. */
body .ztv-header, body.ztv-shared-game > .ztv-shared-game-header {
  display:grid!important;
  grid-template-columns:max-content minmax(0,1fr) max-content;
  align-items:center!important;
  column-gap:clamp(10px,1.5vw,24px)!important;
  row-gap:8px!important;
  flex-wrap:nowrap!important;
  width:100%;min-width:0;box-sizing:border-box;
  min-height:62px;padding:9px clamp(10px,1.6vw,24px)!important;
  background-color:#14091f;
  border-bottom:1px solid #ae6bd4;
  box-shadow:0 3px 20px #0008,inset 0 -1px 0 #ddaaff25;
}
body .ztv-header>.ztv-logo{grid-column:1;grid-row:1;justify-self:start;min-width:0;margin:0;white-space:nowrap}
body .ztv-header>.ztv-live-hud{
  grid-column:2;grid-row:1;justify-self:center;
  display:inline-flex;max-width:100%;min-height:36px!important;
  margin:0!important;padding:7px 12px!important;gap:10px!important;
  background:linear-gradient(155deg,#1f1330e8,#100b1fe8)!important;
  border:1px solid #8e61ad!important;border-radius:9px!important;
  font:700 10px/1.2 'Courier New',monospace!important;
  letter-spacing:.03em;color:#cbfba4!important;
  box-shadow:inset 0 1px 0 #e8cbff20,0 2px 8px #0009;
}
body .ztv-header #ztv-site-nav{
  grid-column:3;grid-row:1;justify-self:end;margin:0!important;
  width:max-content;max-width:100%;min-width:0;
  display:flex!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:flex-end;
  gap:8px!important;
}
body .ztv-header #ztv-site-nav > a,
body .ztv-header #ztv-site-nav .ztvs-bell,
body .ztv-header #ztv-site-nav .ztv-account-summary,
body .ztv-header #ztv-site-nav .ztv-account-login {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;min-height:38px!important;height:38px!important;
  width:auto;max-width:100%;margin:0!important;padding:7px 12px!important;
  border:1px solid #8457ac!important;border-radius:9px!important;
  background:linear-gradient(155deg,#452368e0,#1e112cfa)!important;
  box-shadow:inset 0 1px 0 #eed4ff28,0 2px 9px #0009!important;
  color:#f2ddff!important;font:700 11px/1.2 'Courier New',monospace!important;
  letter-spacing:.02em!important;text-align:center;white-space:nowrap;
  text-decoration:none!important;
  transition:border-color .16s,background .16s,box-shadow .16s,transform .16s;
}
body .ztv-header #ztv-site-nav > a:is(:hover,:focus-visible),
body .ztv-header #ztv-site-nav .ztvs-bell:is(:hover,:focus-visible),
body .ztv-header #ztv-site-nav .ztv-account-summary:is(:hover,:focus-visible) {
  border-color:#dfb5ff!important;background:linear-gradient(145deg,#743bac,#382154)!important;
  box-shadow:0 0 14px #ad63eb80,inset 0 1px 0 #ffedff44!important;
  transform:translateY(-1px);
}
body .ztv-header #ztv-site-nav :is(a,button,summary):focus-visible{
  outline:2px solid #e1bfff;outline-offset:2px;
}
body .ztv-header #ztv-site-nav > a[aria-current="page"]{
  background:linear-gradient(140deg,#a144e4,#692b9d)!important;
  border-color:#edbdff!important;color:white!important;
}
body .ztv-header #ztv-site-nav .ztv-branded-game-link{
  min-height:38px!important;height:38px!important;padding:6px 11px!important;
  gap:7px!important;
}
body .ztv-header #ztv-site-nav .ztv-game-link-icon{width:23px!important;height:23px!important;flex:0 0 23px!important}
body .ztv-header #ztv-site-nav .ztv-account-menu,
body .ztv-header #ztv-site-nav .ztvs-notification-wrap{display:inline-flex;align-items:center;min-width:0;margin:0!important;flex:0 1 auto}
body .ztv-header #ztv-site-nav .ztv-account-summary{max-width:190px;gap:6px;cursor:pointer}
body .ztv-header #ztv-site-nav .ztv-account-summary>span{
  min-width:0;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
body .ztv-header #ztv-site-nav .ztv-account-avatar{width:24px;height:24px;flex:0 0 24px;object-fit:cover}
body .ztv-header #ztv-site-nav .ztvs-bell{min-width:38px;padding:7px 10px!important;cursor:pointer}
body .ztv-header #ztv-site-nav .ztvs-notification-panel{text-align:left;white-space:normal}
@media(max-width:1190px){
 body .ztv-header,body.ztv-shared-game>.ztv-shared-game-header{
  grid-template-columns:max-content minmax(0,1fr);row-gap:8px!important;
 }
 body .ztv-header>.ztv-live-hud{grid-column:2;justify-self:end}
 body .ztv-header #ztv-site-nav{grid-column:1/-1;grid-row:2;justify-self:center;
  width:100%;justify-content:center;max-width:100%;flex-wrap:wrap!important;}
}
@media(max-width:560px){
 body .ztv-header,body.ztv-shared-game>.ztv-shared-game-header{padding:7px 9px!important;column-gap:7px!important;row-gap:7px!important}
 body .ztv-header .ztv-logo-text-img{height:23px!important;max-width:65px!important}
 body .ztv-header .ztv-logo-mark{width:29px!important;height:29px!important}
 body .ztv-header>.ztv-live-hud{min-height:30px!important;padding:5px 7px!important;font-size:9px!important;gap:6px!important}
 body .ztv-header #ztv-site-nav{gap:6px!important}
 body .ztv-header #ztv-site-nav > a,body .ztv-header #ztv-site-nav .ztvs-bell,
 body .ztv-header #ztv-site-nav .ztv-account-summary,
 body .ztv-header #ztv-site-nav .ztv-account-login{
   height:34px!important;min-height:34px!important;padding:5px 9px!important;font-size:10px!important;
 }
 body .ztv-header #ztv-site-nav .ztv-branded-game-link{height:34px!important;min-height:34px!important;padding:5px 8px!important}
 body .ztv-header #ztv-site-nav .ztv-account-summary>span{max-width:115px}
}
@media(prefers-reduced-motion:reduce){
 body .ztv-header #ztv-site-nav > a,
 body .ztv-header #ztv-site-nav .ztvs-bell,
 body .ztv-header #ztv-site-nav .ztv-account-summary{transition:none!important;transform:none!important}
}
