.apm-widget{--apm-bg:#0d1520;--apm-edge:#263747;--apm-accent:#18c5ad;color:#eaf5ff;font:14px/1.5 system-ui,Arial,sans-serif;max-width:100%;box-sizing:border-box}.apm-widget *{box-sizing:border-box}.apm-main,.apm-form{border:1px solid var(--apm-edge);border-radius:14px;background:var(--apm-bg);padding:15px}.apm-head{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between;border-bottom:1px solid #2c3e50;padding:2px 0 12px;font-weight:800;letter-spacing:.05em}.apm-head span{color:#59f1d7}.apm-head small{font-weight:400;letter-spacing:0;color:#b1c4d2}.apm-screen{background:#03080e;border-radius:9px;overflow:hidden;margin-top:12px;aspect-ratio:16/9;display:grid;place-items:center}.apm-visual,.apm-yt{width:100%;height:100%;display:grid;place-items:center}.apm-start{text-align:center;padding:20px;color:#abc0cd}.apm-visual audio{max-width:94%;width:430px;margin:12px}.apm-cover{height:65%;aspect-ratio:1;display:grid;place-items:center;font-size:68px;color:#20ccb5;overflow:hidden}.apm-cover img{width:100%;height:100%;object-fit:contain}.apm-info{display:flex;flex-direction:column;margin:11px 1px;color:#d2e2ee}.apm-info strong{font-size:17px}.apm-info span{color:#9bb8c3}.apm-controls,.apm-form-actions{display:flex;flex-wrap:wrap;gap:9px}.apm-widget button{background:#182837;color:#ecfaff;border:1px solid #42586b;border-radius:9px;padding:9px 12px;font-weight:750;cursor:pointer;min-height:40px}.apm-widget button.apm-play,.apm-widget .apm-form-actions button[type=submit]{background:#076c62;border-color:#16ceb7}.apm-widget button:hover{border-color:#29d3bf}.apm-widget button:disabled{opacity:.6;cursor:default}.apm-message{min-height:22px;font-size:12px;color:#b1d7db;margin:9px 0 0}.apm-form-shell:not([hidden]){margin-top:15px}.apm-form h3{color:white;margin:0}.apm-form p{color:#bcd0d7}.apm-form label:not(.apm-check){display:block;margin:10px 0;font-weight:650;color:#f1f7fb}.apm-form input:not([type=checkbox]),.apm-form textarea{display:block;width:100%;margin-top:5px;padding:11px;background:#101f2e;color:#fff;border:1px solid #527083;border-radius:7px;font:inherit}.apm-form .apm-check{display:flex;align-items:flex-start;gap:10px;margin:14px 0;font-size:13px;color:#edf7f7}.apm-form input[type=checkbox]{appearance:auto!important;accent-color:#26c9b4;flex:0 0 21px;width:21px;height:21px;margin:0}.apm-form-result{font-weight:600}.apm-launcher{position:fixed;bottom:18px;right:18px;z-index:99960;color:#fff;background:#076d65;border:1px solid #38e4c6;border-radius:10px;padding:12px 16px;font-weight:900;box-shadow:0 5px 20px #0009;cursor:pointer}.apm-floating[hidden]{display:none!important}.apm-floating{position:fixed;inset:0;z-index:99999;background:#000d;display:grid;place-items:center;padding:15px}.apm-floating-dialog{position:relative;width:min(920px,100%);max-height:96dvh;overflow:auto;background:#101821;border:1px solid #506270;border-radius:14px;padding:16px}.apm-floating-close{position:sticky;float:right;top:0;z-index:2;background:#273948;color:#fff;font-size:23px;border:0;border-radius:6px;cursor:pointer;padding:1px 9px}.apm-modal-open{overflow:hidden}@media(max-width:600px){.apm-floating{padding:3px}.apm-floating-dialog{padding:8px;max-height:100dvh;border-radius:8px}.apm-main,.apm-form{padding:10px}.apm-controls button{flex:1 1 43%;font-size:12px}.apm-screen{aspect-ratio:16/10}}

.apm-launcher[hidden]{display:none!important}.aptv-channel-music{min-width:106px!important;border-color:#228c83!important}.aptv-channel-music .aptv-channel-glyph{font-size:24px!important;line-height:1!important;color:#48e6c9}.aptv-channel-music.is-selected{box-shadow:0 0 0 1px #21d8c3,0 0 15px #0bb59c77!important;background:#093f45!important}

/* AP Music / Effetto Live: identità viola e fucsia */
.apm-widget{--apm-accent:#f00099;--apm-edge:#6c2a88}
.apm-head span{color:#fb49c3}.apm-cover{color:#ec35b8}
.apm-widget button.apm-play,.apm-widget .apm-form-actions button[type=submit]{background:#970071;border-color:#ef38bb}
.apm-widget button:hover{border-color:#fc71d4}
.apm-launcher{background:linear-gradient(135deg,#5a137e,#d4008d);border:1px solid #f250dc;box-shadow:0 0 16px #d900a766}
.aptv-channel-music{min-width:106px!important;border:1px solid #ac36db!important;background:linear-gradient(140deg,#351346,#740755)!important;box-shadow:0 0 0 1px #df52ca,0 0 16px #c72afb8c,inset 0 0 18px #a9009d50!important}
.aptv-channel-music .aptv-channel-glyph{color:#ff74dd!important;text-shadow:0 0 10px #f71cba!important}
.aptv-channel-music.is-selected{background:linear-gradient(140deg,#631090,#bb087e)!important;box-shadow:0 0 0 2px #ff67d4,0 0 24px #ed17d9bb!important}
.apm-vote-link{display:block;margin:8px 0;color:#ff90df;font-weight:800;text-decoration:none;border:1px solid #a72a88;border-radius:8px;padding:9px 12px;background:#390c36;text-align:center}
.apm-vote-link[hidden]{display:none!important}
/* AP Music Discovery */
.apm-discovery-shell:not([hidden]){display:block;position:absolute;inset:0;z-index:15;overflow:auto;background:#0c101b;padding:24px;border:1px solid #e322ac;border-radius:15px}.apm-discovery-shell[hidden]{display:none!important}.apm-discovery-form{max-width:740px;margin:0 auto;color:#faf3ff}.apm-discovery-form label{display:block;margin:12px 0;color:#f6d5f6;font-weight:600}.apm-discovery-form input:not([type=checkbox]),.apm-discovery-form select,.apm-discovery-form textarea{display:block;width:100%;box-sizing:border-box;background:#151c2a;color:#fff;border:1px solid #5c4a69;padding:10px;border-radius:8px;margin-top:5px}.apm-discovery-form .apm-check{display:flex;gap:10px;align-items:flex-start}.apm-discovery-form .apm-check input{width:20px;height:20px;flex:none}.apm-discovery-form button,.apm-discovery-open{cursor:pointer}

.apm-remote-panel{background:#140d22;border:1px solid #be31ce;border-radius:14px;padding:16px;margin-top:12px;color:#fff}.apm-remote-panel[hidden]{display:none!important}.apm-remote-panel h3{margin:0 0 8px;color:#ff8cde}.apm-remote-panel button{margin:4px;background:linear-gradient(125deg,#55147c,#a5007d);border-color:#e850b7}.apm-remote-panel .apm-mode-note{font-size:12px;color:#f1bbdf}.apm-personal-list{max-height:240px;overflow:auto;padding:8px}.apm-personal-list label{display:block;padding:6px;border-bottom:1px solid #4e2c59}.apm-transfer-help{padding:12px;background:#21132c;color:#fff;border:1px solid #99549c;border-radius:10px}.apm-transfer-help a{color:#ff9ee0}

/* AP Music 0.1.8: controlli coerenti con Effetto Live, senza blocchi rossi */
.apm-floating-dialog { position:relative; padding:16px; border-color:#8d2a98; box-shadow:0 0 0 1px #3a174b,0 18px 55px #000b; }
.apm-floating-dialog .apm-floating-close { position:absolute!important; float:none!important; top:14px!important; right:16px!important; width:40px!important; height:40px!important; min-height:40px!important; padding:0!important; display:grid!important; place-items:center!important; border:1px solid #a93cae!important; border-radius:10px!important; background:#15121f!important; background-image:none!important; color:#fff!important; font-size:26px!important; line-height:1!important; box-shadow:0 0 12px #b52ca12e!important; z-index:30; transition:border-color .2s,box-shadow .2s,background .2s; }
.apm-floating-dialog .apm-floating-close:hover,.apm-floating-dialog .apm-floating-close:focus-visible { background:#30112f!important; border-color:#ff72db!important; box-shadow:0 0 14px #ee48c580!important; outline-offset:2px; }
.apm-floating-dialog .apm-head { padding-right:62px!important; min-height:48px; justify-content:space-between; gap:8px 18px; }
.apm-floating-dialog .apm-head small { display:block; max-width:100%; min-width:0; overflow-wrap:anywhere; color:#d8c6e0; }
.apm-widget .apm-controls button,.apm-widget .apm-remote-panel button { appearance:none!important; background:#11131f!important; background-image:none!important; color:#f7f1fa!important; border:1px solid #ad3caa!important; border-radius:10px!important; box-shadow:inset 0 0 0 1px #3d1a48!important; min-height:42px; padding:10px 16px; font-size:12px; font-weight:750; letter-spacing:.015em; text-transform:none; transition:border-color .18s,background .18s,box-shadow .18s,transform .18s; }
.apm-widget .apm-controls button:hover,.apm-widget .apm-remote-panel button:hover { background:#25122d!important; border-color:#ff76d9!important; box-shadow:0 0 12px #e744c35c!important; transform:translateY(-1px); }
.apm-widget .apm-controls button:focus-visible,.apm-widget .apm-remote-panel button:focus-visible { outline:2px solid #f48ce0!important; outline-offset:2px; }
.apm-widget .apm-controls button.is-selected,.apm-widget .apm-remote-panel button.is-selected { background:#2b1139!important; border-color:#ff62e0!important; box-shadow:0 0 0 1px #eb45c455,0 0 15px #f332d57c!important; }
.apm-widget .apm-remote-panel { background:#10121d; border:1px solid #76368f; }
@media(max-width:600px){.apm-floating-dialog .apm-floating-close{right:10px!important;top:10px!important;width:38px!important;height:38px!important}.apm-floating-dialog .apm-head{padding-right:48px!important;align-items:flex-start}.apm-floating-dialog .apm-head small{flex-basis:100%}.apm-widget .apm-controls button{flex:1 1 calc(50% - 9px)}}

/* AP Music embedded in AP TV visual area */
.aptv-screen.apm-host-active{position:relative!important;min-height:380px!important}.apm-inline-dock{position:absolute;inset:0;z-index:120;background:#0b0e18;overflow:auto;padding:8px;box-sizing:border-box}.apm-inline-dock .apm-main{width:100%;min-height:100%;}.apm-inline-dock .apm-screen{min-height:300px}.apm-inline-close{position:sticky;top:0;float:right;z-index:122;background:#111425;border:1px solid #e041bb;color:#fff;border-radius:8px;padding:8px 14px;cursor:pointer}.apm-inline-dock .apm-form-shell,.apm-inline-dock .apm-discovery-shell{z-index:500;}

/* 0.1.25: AP TV displays media only. All controls live in an independent dialog. */
.aptv-screen.apm-host-active{position:relative!important}
.aptv-screen .apm-inline-dock{position:absolute!important;inset:0!important;padding:0!important;background:#03070d!important;overflow:hidden!important;z-index:120!important}
.apm-inline-dock>.apm-widget,.apm-inline-dock .apm-main{width:100%!important;height:100%!important;max-height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;margin:0!important;padding:0!important;background:#03070d!important}
.apm-inline-dock .apm-screen{display:block!important;margin:0!important;width:100%!important;height:100%!important;min-height:0!important;aspect-ratio:auto!important;border:0!important;border-radius:0!important;overflow:hidden!important}
.apm-inline-dock .apm-visual,.apm-inline-dock .apm-yt{width:100%!important;height:100%!important}
.apm-inline-dock .apm-start{font-size:13px}
.apm-manager-shell[hidden]{display:none!important}
.apm-manager-shell{position:fixed!important;inset:0!important;z-index:2147483000!important;background:rgba(0,0,0,.82)!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:12px!important;overflow:auto!important}
.apm-manager-dialog{width:min(850px,100%);max-height:94dvh;overflow:auto;border:1px solid #df53ca;border-radius:16px;background:#0d1220;box-shadow:0 18px 70px #000c;color:#fff}
.apm-manager-bar{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:15px;background:#0f1020;padding:12px 18px;border-bottom:1px solid #613167;color:#f77ad7}
.apm-manager-close{background:#141525!important;border:1px solid #f45bcf!important;border-radius:9px!important;color:#fff!important;font-size:24px!important;min-width:42px;min-height:42px;cursor:pointer}
.apm-manager-body{padding:16px;display:grid;gap:14px}
.apm-manager-body .apm-controls{display:flex;flex-wrap:wrap;gap:10px}
.apm-manager-body .apm-remote-panel{margin:0}
body.apm-manager-open{overflow:hidden}
.aptv-channel-music-manage{border-color:#e14ed2!important;color:#ff99e6!important;box-shadow:inset 0 0 0 1px #6f2875!important}
.aptv-channel-music-manage:hover{box-shadow:0 0 12px #e14ed280!important}
@media(max-width:650px){.apm-manager-dialog{max-height:100dvh}.apm-manager-shell{padding:3px!important}.apm-manager-body{padding:10px}}

/* AP Music 0.1.26: etichette su fascia esterna al player YouTube */
.apm-inline-dock .apm-now-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#090b15;color:#fff;padding:8px 14px;min-height:54px;border-bottom:1px solid #a73dd3}.apm-now-brand{font-weight:900;letter-spacing:.08em;color:#fa60c9;white-space:nowrap;font-size:13px}.apm-now-meta{display:flex;flex-direction:column;align-items:flex-end;text-align:right;min-width:0;max-width:70%}.apm-now-title{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.apm-now-artist{font-size:12px;color:#ecb9ef}.apm-inline-dock .apm-screen{display:flex;flex-direction:column}.apm-inline-dock .apm-visual{flex:1;min-height:0}.apm-inline-dock video{width:100%;height:100%;object-fit:contain;background:#000}.apm-now-bar{display:none}@media(max-width:560px){.apm-inline-dock .apm-now-title{font-size:12px}.apm-inline-dock .apm-now-bar{padding:6px 8px;min-height:44px}.apm-inline-dock .apm-now-brand{font-size:11px}}

/* AP Music 0.1.27: fixed edge-to-edge brand and right-aligned track information. */
.apm-inline-dock .apm-screen > .apm-now-bar {
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  align-items:center!important;width:100%!important;max-width:none!important;box-sizing:border-box!important;
  margin:0!important; padding:8px 16px!important;gap:16px!important;min-width:0!important;
}
.apm-inline-dock .apm-now-brand {display:block!important;justify-self:start!important;align-self:center!important;text-align:left!important;margin:0!important;max-width:100%!important;}
.apm-inline-dock .apm-now-meta {display:flex!important;flex-direction:column!important;align-items:flex-end!important;justify-self:end!important;text-align:right!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;}
.apm-inline-dock .apm-now-title,.apm-inline-dock .apm-now-artist{display:block!important;width:100%!important;text-align:right!important;direction:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@media(max-width:560px){.apm-inline-dock .apm-screen > .apm-now-bar{padding:6px 10px!important;gap:8px!important}.apm-inline-dock .apm-now-title{font-size:12px!important}.apm-inline-dock .apm-now-artist{font-size:10px!important}}

/* 0.1.30: viewport video 16:9 preservato e telecomando partner scorrevole */
.aptv-screen.apm-host-active{aspect-ratio:auto!important;height:auto!important;min-height:0!important;padding-bottom:calc(56.25% + 54px)!important;overflow:hidden!important;position:relative!important}
.aptv-screen.apm-host-active>.apm-inline-dock{position:absolute!important;inset:0!important;display:block!important;overflow:hidden!important;padding:0!important;}
.apm-inline-dock .apm-screen{display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;overflow:hidden!important;}
.apm-inline-dock .apm-screen>.apm-now-bar{height:54px!important;min-height:54px!important;max-height:54px!important;flex:0 0 54px!important;}
.apm-inline-dock .apm-screen>.apm-visual{display:block!important;position:relative!important;width:100%!important;height:auto!important;min-height:0!important;flex:1 1 auto!important;aspect-ratio:16/9!important;overflow:hidden!important;background:#000!important;}
.apm-inline-dock .apm-yt,.apm-inline-dock .apm-yt iframe,.apm-inline-dock .apm-visual>video{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;object-fit:contain!important;border:0!important;}
.aptv-partner-remote .aptv-partner-remote-track,.aptv-partner-remote-track{display:flex!important;flex-wrap:nowrap!important;flex-direction:row!important;gap:9px!important;align-items:stretch!important;justify-content:flex-start!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:thin!important;scroll-snap-type:x proximity!important;max-width:100%!important;min-width:0!important;padding:5px 3px 12px!important;box-sizing:border-box!important;}
.aptv-partner-remote .aptv-partner-remote-track>.aptv-channel-tile,.aptv-partner-remote-track>.aptv-channel-tile{flex:0 0 96px!important;min-width:96px!important;max-width:96px!important;width:96px!important;box-sizing:border-box!important;scroll-snap-align:start!important;white-space:normal!important;overflow-wrap:anywhere!important;min-height:80px!important;margin:0!important;}
.aptv-partner-remote-track>.aptv-channel-music,.aptv-partner-remote-track>.aptv-channel-music-manage{flex-basis:112px!important;min-width:112px!important;max-width:112px!important;width:112px!important;}
@media(max-width:640px){.aptv-partner-remote .aptv-partner-remote-track>.aptv-channel-tile,.aptv-partner-remote-track>.aptv-channel-tile{flex-basis:86px!important;min-width:86px!important;max-width:86px!important;width:86px!important;font-size:10px!important;gap:5px!important;}.aptv-partner-remote-track>.aptv-channel-music,.aptv-partner-remote-track>.aptv-channel-music-manage{flex-basis:100px!important;min-width:100px!important;max-width:100px!important;width:100px!important;}.aptv-screen.apm-host-active{padding-bottom:calc(56.25% + 54px)!important;}}


/* 0.1.33: controlli AP separati; nessun sticky dentro lo scroller. */
.apm-remote-layout{display:flex!important;flex-direction:row!important;align-items:center!important;width:100%!important;max-width:100%!important;min-width:0!important;gap:8px!important;isolation:isolate!important;position:relative!important;z-index:1!important}
.apm-fixed-remote{display:flex!important;flex:0 0 auto!important;flex-wrap:nowrap!important;align-items:center!important;gap:6px!important;max-width:58%!important;min-width:0!important}
.apm-remote-layout>.aptv-partner-remote-track{display:flex!important;flex:1 1 0!important;min-width:0!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;scrollbar-width:thin!important;position:relative!important;z-index:0!important;scroll-padding-left:0!important;justify-content:flex-start!important;padding:4px 2px 10px!important}
.apm-remote-layout .apm-original-hidden{display:none!important}
.aptv-partner-remote .apm-remote-layout .aptv-channel-tile{position:static!important;left:auto!important;right:auto!important;transform:none!important;float:none!important;z-index:auto!important;box-sizing:border-box!important;min-height:49px!important;height:51px!important;max-height:51px!important;min-width:48px!important;width:48px!important;max-width:48px!important;flex:0 0 48px!important;padding:3px 2px!important;font-size:8px!important;line-height:1.15!important;white-space:normal!important;overflow-wrap:anywhere!important;box-shadow:none!important}
.apm-fixed-remote>.aptv-channel-music,.apm-fixed-remote>.aptv-channel-music-manage{width:64px!important;min-width:64px!important;max-width:64px!important;flex:0 0 64px!important}
.aptv-partner-remote .apm-remote-layout .aptv-channel-glyph{width:21px!important;height:21px!important;min-height:0!important}
.apm-fixed-remote>.aptv-channel-music{border-color:#f35acc!important;box-shadow:0 0 9px #f35acc55!important}
.apm-manager-shell{position:fixed!important;inset:0!important;z-index:2147483000!important;isolation:isolate!important;overflow:auto!important}
.apm-manager-dialog{position:relative!important;z-index:1!important;width:min(850px,calc(100vw - 16px))!important;max-height:calc(100dvh - 16px)!important;overflow:auto!important}
@media(max-width:640px){.apm-remote-layout{gap:5px!important}.apm-fixed-remote{gap:3px!important;max-width:65%!important}.aptv-partner-remote .aptv-partner-remote .apm-remote-layout .aptv-channel-tile{width:43px!important;min-width:43px!important;max-width:43px!important;flex-basis:43px!important;height:47px!important;min-height:47px!important;max-height:47px!important;font-size:7px!important}.apm-fixed-remote>.aptv-channel-music,.apm-fixed-remote>.aptv-channel-music-manage{width:54px!important;min-width:54px!important;max-width:54px!important;flex-basis:54px!important}.aptv-partner-remote .apm-remote-layout .aptv-channel-glyph{width:18px!important;height:18px!important}}

/* 0.1.34: pulsanti servizio compatti, senza alterare la sezione partner. */
.aptv-partner-remote .apm-fixed-remote{max-width:none!important;gap:5px!important;align-items:center!important;flex-shrink:0!important}
.aptv-partner-remote .apm-fixed-remote>.apm-fixed-utility{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;flex:0 0 70px!important;width:70px!important;min-width:70px!important;max-width:70px!important;height:51px!important;min-height:51px!important;max-height:51px!important;margin:0!important;padding:4px 5px!important;font-size:8px!important;line-height:1.16!important;text-align:center!important;white-space:normal!important;border-radius:9px!important}
.aptv-partner-remote .apm-fixed-remote>.apm-fixed-utility svg,.aptv-partner-remote .apm-fixed-remote>.apm-fixed-utility img{max-height:20px!important;max-width:20px!important}
.aptv-partner-remote .apm-fixed-remote>.apm-fixed-utility span{font-size:inherit!important;line-height:inherit!important;white-space:normal!important}
.aptv-partner-remote .apm-remote-layout>.aptv-partner-remote-track{min-width:75px!important}
@media(max-width:720px){.aptv-partner-remote .apm-fixed-remote{gap:3px!important}.aptv-partner-remote .apm-fixed-remote>.apm-fixed-utility{flex-basis:51px!important;width:51px!important;min-width:51px!important;max-width:51px!important;height:47px!important;min-height:47px!important;max-height:47px!important;font-size:7px!important;padding:2px!important}.apm-remote-layout{gap:4px!important}}


/* 0.1.35: riduzione reale di Palinsesto Live e Telecomando AP */
.aptv-partner-remote .apm-fixed-remote > button.apm-fixed-utility,
.aptv-partner-remote .apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility,
.apm-fixed-remote > button.apm-fixed-utility,
.apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility{
  flex:0 0 58px !important;
  width:58px !important;
  min-width:58px !important;
  max-width:58px !important;
  height:48px !important;
  min-height:48px !important;
  max-height:48px !important;
  padding:3px 4px !important;
  border-radius:9px !important;
  font-size:7px !important;
  line-height:1.08 !important;
  gap:2px !important;
  overflow:hidden !important;
}
.aptv-partner-remote .apm-fixed-remote > button.apm-fixed-utility .aptv-channel-glyph,
.aptv-partner-remote .apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility .aptv-channel-glyph,
.apm-fixed-remote > button.apm-fixed-utility .aptv-channel-glyph,
.apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility .aptv-channel-glyph{
  width:16px !important;
  height:16px !important;
  max-width:16px !important;
  max-height:16px !important;
  font-size:12px !important;
  line-height:1 !important;
}
.aptv-partner-remote .apm-fixed-remote > button.apm-fixed-utility span,
.aptv-partner-remote .apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility span,
.apm-fixed-remote > button.apm-fixed-utility span,
.apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility span{
  font-size:7px !important;
  line-height:1.08 !important;
  white-space:normal !important;
}
@media(max-width:720px){
  .aptv-partner-remote .apm-fixed-remote > button.apm-fixed-utility,
  .aptv-partner-remote .apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility,
  .apm-fixed-remote > button.apm-fixed-utility,
  .apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility{
    flex-basis:52px !important;
    width:52px !important;
    min-width:52px !important;
    max-width:52px !important;
    height:46px !important;
    min-height:46px !important;
    max-height:46px !important;
    font-size:6.5px !important;
    padding:2px 3px !important;
  }
  .aptv-partner-remote .apm-fixed-remote > button.apm-fixed-utility .aptv-channel-glyph,
  .aptv-partner-remote .apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility .aptv-channel-glyph,
  .apm-fixed-remote > button.apm-fixed-utility .aptv-channel-glyph,
  .apm-fixed-remote > .aptv-channel-tile.apm-fixed-utility .aptv-channel-glyph{
    width:14px !important;
    height:14px !important;
    font-size:11px !important;
  }
}


/* 0.1.36: telecomando uniforme desktop + responsive a righe, senza scorrimento laterale */
/* Desktop: tutti i pulsanti AP fissi della stessa famiglia visiva; blu e rosso ridotti, gli altri leggermente più grandi. */
.apm-fixed-remote{
  gap:6px !important;
  align-items:stretch !important;
}
.aptv-partner-remote .apm-fixed-remote > .aptv-channel-tile,
.aptv-partner-remote .apm-fixed-remote > button,
.apm-fixed-remote > .aptv-channel-tile,
.apm-fixed-remote > button{
  box-sizing:border-box !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  align-items:center !important;
  text-align:center !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  border-radius:10px !important;
  padding:4px 5px !important;
  line-height:1.12 !important;
}
/* AP TV / AP Music / Gestione Music: +15% rispetto alla versione precedente */
.apm-fixed-remote > .apm-fixed-proxy,
.apm-fixed-remote > .aptv-channel-music,
.apm-fixed-remote > .aptv-channel-music-manage,
.aptv-partner-remote .apm-fixed-remote > .apm-fixed-proxy,
.aptv-partner-remote .apm-fixed-remote > .aptv-channel-music,
.aptv-partner-remote .apm-fixed-remote > .aptv-channel-music-manage{
  flex:0 0 74px !important;
  width:74px !important;
  min-width:74px !important;
  max-width:74px !important;
  height:56px !important;
  min-height:56px !important;
  max-height:56px !important;
  font-size:8px !important;
}
/* Palinsesto Live e Telecomando AP: rimpiccioliti e uniformati agli altri */
.apm-fixed-remote > .apm-fixed-utility,
.aptv-partner-remote .apm-fixed-remote > .apm-fixed-utility{
  flex:0 0 74px !important;
  width:74px !important;
  min-width:74px !important;
  max-width:74px !important;
  height:56px !important;
  min-height:56px !important;
  max-height:56px !important;
  font-size:8px !important;
  line-height:1.12 !important;
}
.apm-fixed-remote > .apm-fixed-proxy .aptv-channel-glyph,
.apm-fixed-remote > .apm-fixed-utility .aptv-channel-glyph,
.aptv-partner-remote .apm-fixed-remote > .apm-fixed-proxy .aptv-channel-glyph,
.aptv-partner-remote .apm-fixed-remote > .apm-fixed-utility .aptv-channel-glyph{
  width:18px !important;
  height:18px !important;
  max-width:18px !important;
  max-height:18px !important;
  font-size:13px !important;
  line-height:1 !important;
}
.apm-fixed-remote > .apm-fixed-proxy span,
.apm-fixed-remote > .apm-fixed-utility span,
.aptv-partner-remote .apm-fixed-remote > .apm-fixed-proxy span,
.aptv-partner-remote .apm-fixed-remote > .apm-fixed-utility span{
  font-size:8px !important;
  line-height:1.12 !important;
}

/* Responsive: niente scorrimento orizzontale, pulsanti su più righe tutti visibili */
@media(max-width:820px){
  .apm-remote-layout{
    flex-direction:column !important;
    align-items:stretch !important;
    gap:8px !important;
  }
  .apm-fixed-remote,
  .apm-remote-layout > .aptv-partner-remote-track{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:8px !important;
    overflow:visible !important;
    padding:0 !important;
  }
  .apm-fixed-remote > .apm-fixed-proxy,
  .apm-fixed-remote > .apm-fixed-utility,
  .apm-remote-layout > .aptv-partner-remote-track > .aptv-channel-tile{
    flex:0 0 calc(25% - 6px) !important;
    width:calc(25% - 6px) !important;
    min-width:calc(25% - 6px) !important;
    max-width:calc(25% - 6px) !important;
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    padding:4px !important;
    font-size:8px !important;
    line-height:1.1 !important;
  }
  .apm-fixed-remote > .apm-fixed-proxy .aptv-channel-glyph,
  .apm-fixed-remote > .apm-fixed-utility .aptv-channel-glyph,
  .apm-remote-layout > .aptv-partner-remote-track > .aptv-channel-tile .aptv-channel-glyph{
    width:18px !important;
    height:18px !important;
    font-size:13px !important;
  }
}
@media(max-width:560px){
  .apm-fixed-remote,
  .apm-remote-layout > .aptv-partner-remote-track{
    gap:6px !important;
  }
  .apm-fixed-remote > .apm-fixed-proxy,
  .apm-fixed-remote > .apm-fixed-utility,
  .apm-remote-layout > .aptv-partner-remote-track > .aptv-channel-tile{
    flex:0 0 calc(33.333% - 4px) !important;
    width:calc(33.333% - 4px) !important;
    min-width:calc(33.333% - 4px) !important;
    max-width:calc(33.333% - 4px) !important;
    height:56px !important;
    min-height:56px !important;
    max-height:56px !important;
    font-size:7px !important;
  }
}

/* 0.1.39: telecomando AP unificato al pulsante AP TV esistente. */
.aptv-partner-remote .apm-fixed-remote{display:flex!important;flex-flow:row wrap!important;align-items:center!important;gap:6px!important;min-width:0!important}
.aptv-partner-remote .apm-fixed-remote > button,
.aptv-partner-remote .apm-fixed-remote > .apm-fixed-proxy,
.aptv-partner-remote .apm-fixed-remote > .apm-fixed-utility{
 flex:0 0 74px!important;width:74px!important;min-width:74px!important;max-width:74px!important;
 height:56px!important;min-height:56px!important;max-height:56px!important;
 margin:0!important;padding:4px!important;border-radius:10px!important;box-sizing:border-box!important;
 font-size:8px!important;line-height:1.12!important;overflow:hidden!important;white-space:normal!important;
 display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;
}
@media(max-width:820px){.aptv-partner-remote .apm-fixed-remote{justify-content:center!important;flex-wrap:wrap!important}}

/* 0.1.42: ordine richiesto, misure AP TV, separazione partner, niente sovrapposizioni. */
.aptv-partner-remote .apm-ordered-main-remote{
 display:flex!important;align-items:center!important;gap:12px!important;
 flex-wrap:wrap!important;width:100%!important;min-width:0!important
}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote{
 display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
 gap:6px!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;
 padding:0!important;margin:0!important
}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.apm-manage-hidden{
 display:none!important
}
.aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track{
 display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
 gap:6px!important;min-width:0!important;flex:1 1 200px!important;
 border-left:1px solid rgba(140,160,190,.45)!important;
 padding-left:12px!important;overflow-x:auto!important;scrollbar-width:thin!important
}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.apm-fixed-proxy,
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.apm-fixed-utility{
 flex:0 0 74px!important;width:74px!important;min-width:74px!important;max-width:74px!important;
 height:56px!important;min-height:56px!important;max-height:56px!important
}
.aptv-partner-remote .apm-ordered-main-remote .apm-fixed-music{position:relative!important}
.aptv-partner-remote .apm-ordered-main-remote .apm-music-config-trigger{
 position:absolute!important;right:2px!important;top:2px!important;z-index:5!important;
 background:#272b35!important;border:1px solid #8895ad!important;border-radius:5px!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 width:17px!important;height:17px!important;font-size:11px!important;cursor:pointer!important;
 color:#fff!important;line-height:1!important
}
@media(max-width:820px){
 .aptv-partner-remote .apm-ordered-main-remote{
   align-items:stretch!important;gap:9px!important
 }
 .aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote{
   width:100%!important;justify-content:flex-start!important;flex-wrap:wrap!important
 }
 .aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track{
   width:100%!important;flex:1 1 100%!important;padding-left:0!important;padding-top:8px!important;
   border-left:0!important;border-top:1px solid rgba(140,160,190,.45)!important
 }
}

/* 0.1.42: partner rettangolari con larghezza maggiore, senza cambiare i 4 tasti AP. */
.aptv-partner-remote .apm-ordered-main-remote > .aptv-partner-remote-track > .aptv-channel-tile:not(.apm-original-hidden),
.aptv-partner-remote .apm-ordered-main-remote > .aptv-partner-remote-track > button:not(.apm-original-hidden){
 flex:0 0 68px!important;
 width:68px!important;min-width:68px!important;max-width:68px!important;
 height:56px!important;min-height:56px!important;max-height:56px!important;
 box-sizing:border-box!important;border-radius:9px!important;margin:0!important;
 padding:4px 3px!important;white-space:normal!important;overflow-wrap:anywhere!important;
 font-size:8px!important;line-height:1.1!important;
}
.aptv-partner-remote .apm-ordered-main-remote > .aptv-partner-remote-track{
 align-items:center!important;overflow-x:auto!important;scrollbar-width:thin!important;
}
@media(max-width:820px){
 .aptv-partner-remote .apm-ordered-main-remote > .aptv-partner-remote-track > .aptv-channel-tile:not(.apm-original-hidden),
 .aptv-partner-remote .apm-ordered-main-remote > .aptv-partner-remote-track > button:not(.apm-original-hidden){
  flex:0 0 68px!important;width:68px!important;min-width:68px!important;max-width:68px!important;
  height:56px!important;min-height:56px!important;max-height:56px!important;
 }
}

.apm-visual iframe.apm-yt-direct{width:100%!important;height:100%!important;min-height:260px!important;border:0!important;display:block!important}

/* 0.1.46: player condiviso con iframe API e stato di caricamento visibile */
.apm-inline-dock .apm-visual .apm-yt-direct,.apm-inline-dock .apm-visual .apm-yt-direct iframe{width:100%!important;height:100%!important;min-height:260px!important;display:block!important;border:0!important}

/* 0.1.47 standalone share + force music dock above TV iframe */
.aptv-screen.apm-host-active>.apm-inline-dock{position:absolute!important;inset:0!important;z-index:100!important;display:block!important;background:#05050a!important}.aptv-screen.apm-host-active>.apm-inline-dock .apm-visual{position:relative!important;min-height:260px!important}.aptv-share-page .apm-launcher{display:none!important}

/* AP Music 0.1.48: identificativo durante la connessione */
.apm-visual{position:relative!important}
.apm-channel-loader{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:radial-gradient(ellipse at center,#25102f,#060610 75%);z-index:2;color:#fff;text-align:center;padding:15px}
.apm-loading-emblem{display:flex;align-items:center;flex-direction:column;gap:6px}
.apm-loading-emblem img{width:clamp(90px,28%,190px);height:auto;object-fit:contain}
.apm-loading-emblem strong{color:#f752cb;font-weight:900;letter-spacing:.12em;font-size:clamp(20px,3vw,35px)}
.apm-loading-ring{width:40px;height:40px;border:4px solid #d45bc455;border-top-color:#f656db;border-radius:50%;animation:apmSpin .85s linear infinite}
@keyframes apmSpin{to{transform:rotate(360deg)}}
.apm-loading-count{font-size:13px;color:#ddd}
.apm-yt-direct{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;z-index:1!important}

/* 0.1.50: YouTube player without hover controls; AP manages the overlay */
.apm-yt-direct iframe{border:0!important;display:block!important}

/* 0.1.52: do not expose YouTube overlays until explicit control action */
.apm-visual .apm-yt-direct iframe{pointer-events:none!important}
.apm-visual:has(.apm-yt-direct) .apm-yt-direct{pointer-events:none!important}
.apm-manager-shell .apm-yt-controls-on{outline:2px solid #e4bf14!important}
.aptv-topbar button.apm-audio-on,.aptv-header button.apm-audio-on,.aptv-global-controls button.apm-audio-on,.aptv-header-actions button.apm-audio-on,.aptv-top-controls button.apm-audio-on{background:#116b3d!important;border-color:#38d984!important;color:white!important}
.aptv-topbar button.apm-audio-off,.aptv-header button.apm-audio-off,.aptv-global-controls button.apm-audio-off,.aptv-header-actions button.apm-audio-off,.aptv-top-controls button.apm-audio-off{background:#951b25!important;border-color:#ed4552!important;color:white!important}

.apm-visual.apm-controls-unlocked .apm-yt-direct,.apm-visual.apm-controls-unlocked .apm-yt-direct iframe{pointer-events:auto!important}

/* AP Music 0.1.53: barra reazioni indipendente dal player YouTube */
.apm-screen{position:relative!important}
.apm-engagement{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);z-index:25;display:flex;gap:5px;align-items:center;justify-content:center;flex-wrap:wrap;max-width:calc(100% - 20px);padding:5px 7px;border-radius:12px;background:rgba(8,11,21,.65);backdrop-filter:blur(8px);opacity:0;pointer-events:none;transition:opacity .2s ease}
.apm-screen:hover .apm-engagement,.apm-screen:focus-within .apm-engagement{opacity:1;pointer-events:auto}
.apm-engagement button{cursor:pointer!important;background:rgba(41,40,55,.86)!important;color:white!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:10px!important;font-size:11px!important;font-weight:800!important;line-height:1.2!important;padding:9px 11px!important;white-space:nowrap!important}
.apm-engagement button.is-active{border-color:#f04da9!important;background:rgba(127,39,94,.9)!important}
.apm-engagement .apm-share-whatsapp{background:rgba(30,87,60,.88)!important}
.apm-engagement small{font-size:10px!important;margin-left:4px}
.apm-reaction-message{flex-basis:100%;text-align:center;font-size:11px;color:#fff}
@media(hover:none){.apm-engagement{opacity:1;pointer-events:auto;bottom:8px}.apm-engagement button{font-size:10px!important;padding:7px!important}}

/* 0.1.54: layout condiviso con AP TV Player 3.10.218.
   Nessun riordino periodico, i partner rimangono nel track originale. */
.aptv-partner-remote .apm-remote-layout.apm-ordered-main-remote{
 display:flex!important; flex-direction:column!important;align-items:stretch!important;
 width:100%!important;max-width:100%!important;gap:10px!important;min-width:0!important;
}
.aptv-partner-remote .apm-remote-layout.apm-ordered-main-remote>.apm-fixed-remote{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
 grid-template-rows:1fr!important;gap:clamp(5px,1vw,12px)!important;
 width:min(100%,440px)!important;max-width:100%!important;
 min-width:0!important;align-items:stretch!important;flex-wrap:nowrap!important;
 margin:0!important;padding:0!important;
}
.aptv-partner-remote .apm-remote-layout.apm-ordered-main-remote>.apm-fixed-remote>.apm-fixed-proxy,
.aptv-partner-remote .apm-remote-layout.apm-ordered-main-remote>.apm-fixed-remote>.aptv-epg,
.aptv-partner-remote .apm-remote-layout.apm-ordered-main-remote>.apm-fixed-remote>.aptv-meta-telecommand{
 position:relative!important;display:flex!important;flex-direction:column!important;
 align-items:center!important;justify-content:center!important;
 width:100%!important;max-width:100%!important;min-width:0!important;
 height:auto!important;min-height:0!important;max-height:none!important;
 aspect-ratio:1/1!important;flex:initial!important;box-sizing:border-box!important;
 padding:3px!important;margin:0!important;overflow:visible!important;border-radius:10px!important;
}
.aptv-partner-remote .apm-fixed-remote>.aptv-epg>button,
.aptv-partner-remote .apm-fixed-remote>.aptv-meta-telecommand>button{
 width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
 max-width:100%!important;box-sizing:border-box!important;display:flex!important;
 flex-direction:column!important;align-items:center!important;justify-content:center!important;
 padding:2px!important;margin:0!important;border-radius:10px!important;
}
.aptv-partner-remote .apm-fixed-remote .aptv-quick-label,
.aptv-partner-remote .apm-fixed-remote>.apm-fixed-proxy span:not(.apm-music-config-trigger){
 font-size:clamp(7px,1.65vw,10px)!important;line-height:1.1!important;
 text-align:center!important;white-space:normal!important;overflow-wrap:anywhere!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track{
 display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
 position:relative!important;align-items:center!important;gap:8px!important;
 width:100%!important;max-width:100%!important;min-width:0!important;
 flex:0 0 auto!important;overflow-x:auto!important;overflow-y:hidden!important;
 padding:5px 2px 10px!important;margin:0!important;
 border:0!important;scrollbar-width:thin!important;
 scroll-snap-type:x proximity!important;overscroll-behavior-x:contain!important;
 -webkit-overflow-scrolling:touch!important;touch-action:pan-x!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track>.aptv-channel-partner{
 position:static!important;display:flex!important;flex:0 0 76px!important;
 width:76px!important;min-width:76px!important;max-width:76px!important;
 height:62px!important;min-height:62px!important;max-height:62px!important;
 margin:0!important;transform:none!important;box-sizing:border-box!important;
 scroll-snap-align:start!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track>.apm-original-hidden{
 display:none!important;
}
.aptv-partner-remote .apm-fixed-remote .apm-fixed-music{position:relative!important}
.aptv-partner-remote .apm-fixed-remote .apm-music-config-trigger{
 position:absolute!important;top:3px!important;right:3px!important;z-index:4!important;
 width:18px!important;height:18px!important;border-radius:5px!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 background:#263044!important;border:1px solid #91a0b4!important;color:#fff!important;
 cursor:pointer!important;font-size:12px!important;
}
@media(min-width:821px){
 .aptv-partner-remote .apm-ordered-main-remote{flex-direction:row!important;align-items:center!important}
 .aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote{width:340px!important;flex:0 0 340px!important}
 .aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track{flex:1 1 0!important;width:auto!important}
 .aptv-partner-remote .apm-fixed-remote>.apm-fixed-proxy,
 .aptv-partner-remote .apm-fixed-remote>.aptv-epg,
 .aptv-partner-remote .apm-fixed-remote>.aptv-meta-telecommand{aspect-ratio:auto!important;height:63px!important}
}
@media(max-width:820px){
 .aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote{width:100%!important}
}

/* 0.1.55: regole finali limitate al telecomando comune, senza riordinamenti continui. */
.aptv-partner-remote .apm-remote-layout.apm-ordered-main-remote{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
 gap:10px!important;width:100%!important;max-width:100%!important;min-width:0!important;
 position:relative!important;overflow:hidden!important;box-sizing:border-box!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:clamp(4px,1vw,8px)!important;align-items:stretch!important;justify-content:start!important;
 flex:none!important;min-width:0!important;width:min(100%,440px)!important;max-width:100%!important;
 margin:0!important;padding:0!important;overflow:visible!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>*{
 position:relative!important;inset:auto!important;transform:none!important;
 float:none!important;grid-row:1!important;display:flex!important;
 flex-direction:column!important;align-items:center!important;justify-content:center!important;
 box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;
 height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:1/1!important;
 flex:initial!important;margin:0!important;padding:2px!important;overflow:hidden!important;border-radius:10px!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.apm-fixed-ap{grid-column:1!important}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.apm-fixed-music{grid-column:2!important}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.aptv-epg{grid-column:3!important}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.aptv-meta-telecommand{grid-column:4!important}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.aptv-epg>button,
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.aptv-meta-telecommand>button{
 display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
 position:static!important;transform:none!important;float:none!important;box-sizing:border-box!important;
 width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:none!important;
 margin:0!important;padding:2px!important;gap:2px!important;overflow:hidden!important;
 border-radius:9px!important;white-space:normal!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote .aptv-quick-label,
.aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>.apm-fixed-proxy>span:not(.apm-music-config-trigger){
 font-size:clamp(7px,1.65vw,10px)!important;line-height:1.15!important;text-align:center!important;
 overflow-wrap:anywhere!important;white-space:normal!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track{
 display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:stretch!important;
 flex:none!important;position:relative!important;float:none!important;transform:none!important;
 width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;max-height:none!important;
 margin:0!important;padding:4px 0 10px!important;gap:8px!important;
 overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;
 -webkit-overflow-scrolling:touch!important;touch-action:pan-x!important;overscroll-behavior-x:contain!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track>.aptv-channel-partner{
 display:flex!important;position:static!important;float:none!important;transform:none!important;
 flex:0 0 76px!important;width:76px!important;min-width:76px!important;max-width:76px!important;
 height:66px!important;min-height:66px!important;max-height:66px!important;
 box-sizing:border-box!important;margin:0!important;scroll-snap-align:start!important;
}
.aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track>.apm-original-hidden{display:none!important}
.aptv-partner-remote .apm-ordered-main-remote .apm-music-config-trigger{
 position:absolute!important;top:3px!important;right:3px!important;z-index:5!important;
 width:18px!important;height:18px!important;display:flex!important;align-items:center!important;justify-content:center!important;
 background:#202638!important;color:white!important;border:1px solid #b4bed1!important;border-radius:5px!important;font-size:12px!important;
}
@media(min-width:821px){
 .aptv-partner-remote .apm-remote-layout.apm-ordered-main-remote{flex-direction:row!important;align-items:center!important}
 .aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote{width:340px!important;max-width:340px!important;flex:0 0 340px!important}
 .aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote>*{height:68px!important;aspect-ratio:auto!important}
 .aptv-partner-remote .apm-ordered-main-remote>.aptv-partner-remote-track{flex:1 1 0!important;width:0!important;min-width:0!important}
}
@media(max-width:820px){
 .aptv-partner-remote .apm-ordered-main-remote>.apm-fixed-remote{width:100%!important}
}

/* 0.1.56: due righe reali e pulite. Gli elementi non sono clonati. */
.aptv-partner-remote.apm56-active>.apm56-shell{display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important;max-width:100%!important;gap:10px!important;box-sizing:border-box!important}
.aptv-partner-remote.apm56-active .apm56-primary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:clamp(5px,1vw,10px)!important;align-items:stretch!important;justify-content:start!important;width:min(100%,420px)!important;min-width:0!important;max-width:100%!important;height:auto!important;padding:0!important;margin:0!important;box-sizing:border-box!important;overflow:visible!important}
.aptv-partner-remote.apm56-active .apm56-primary>.aptv-channel-ap,
.aptv-partner-remote.apm56-active .apm56-primary>.aptv-channel-music,
.aptv-partner-remote.apm56-active .apm56-primary>.aptv-quick-tile{
 display:flex!important;flex-direction:column!important;position:relative!important;align-items:center!important;justify-content:center!important;grid-column:auto!important;grid-row:auto!important;order:unset!important;transform:none!important;float:none!important;flex:none!important;min-width:0!important;max-width:100%!important;width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:1/1!important;margin:0!important;padding:0!important;box-sizing:border-box!important;overflow:hidden!important;border-radius:10px!important}
.aptv-partner-remote.apm56-active .apm56-primary>.aptv-quick-tile>button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;box-sizing:border-box!important;margin:0!important;padding:3px!important;border-radius:10px!important}
.aptv-partner-remote.apm56-active .apm56-primary .aptv-quick-label,
.aptv-partner-remote.apm56-active .apm56-primary>.aptv-channel-tile>span:last-of-type{font-size:clamp(7px,1.55vw,10px)!important;line-height:1.12!important;overflow-wrap:anywhere!important;word-break:normal!important;white-space:normal!important;text-align:center!important}
.aptv-partner-remote.apm56-active .apm56-primary>.aptv-channel-music{overflow:visible!important}
.aptv-partner-remote.apm56-active .apm56-primary>.aptv-channel-music .apm56-config{position:absolute!important;right:3px!important;top:3px!important;width:19px!important;height:19px!important;min-width:19px!important;min-height:19px!important;padding:0!important;margin:0!important;display:grid!important;place-items:center!important;z-index:8!important;border:1px solid #809cb7!important;border-radius:5px!important;background:#243748!important;color:white!important;font-size:13px!important;line-height:1!important;cursor:pointer!important}
.aptv-partner-remote.apm56-active .apm56-shell>.aptv-partner-remote-track{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;position:relative!important;width:100%!important;max-width:100%!important;min-width:0!important;gap:8px!important;height:auto!important;overflow-x:auto!important;overflow-y:hidden!important;box-sizing:border-box!important;padding:4px 0 10px!important;margin:0!important;scroll-snap-type:x proximity!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-x!important;overscroll-behavior-x:contain!important}
.aptv-partner-remote.apm56-active .apm56-shell>.aptv-partner-remote-track>.aptv-channel-partner{display:flex!important;position:relative!important;flex:0 0 72px!important;min-width:72px!important;max-width:72px!important;width:72px!important;height:72px!important;max-height:72px!important;min-height:72px!important;aspect-ratio:1/1!important;margin:0!important;padding:4px!important;float:none!important;transform:none!important;order:unset!important;scroll-snap-align:start!important}
.aptv-partner-remote.apm56-active .apm56-shell>.aptv-partner-remote-track>.apm56-manage-source{display:none!important}
@media(max-width:700px){.aptv-partner-remote.apm56-active .apm56-primary{width:100%!important}.aptv-partner-remote.apm56-active .apm56-shell>.aptv-partner-remote-track>.aptv-channel-partner{flex-basis:66px!important;min-width:66px!important;max-width:66px!important;width:66px!important;height:66px!important;min-height:66px!important;max-height:66px!important}}

/* 0.1.57: no legacy AP Music layout selectors are used by this structure. */
.aptv-home .aptv-partner-remote.apm57-active > .apm57-shell {display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important}
.aptv-home .aptv-partner-remote.apm57-active .apm57-primary {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-rows:auto!important;gap:clamp(5px,1vw,10px)!important;width:min(100%,420px)!important;max-width:100%!important;min-width:0!important;align-items:stretch!important;box-sizing:border-box!important;position:relative!important}
.aptv-home .aptv-partner-remote.apm57-active .apm57-primary > * {position:relative!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;grid-column:auto!important;grid-row:auto!important;order:0!important;float:none!important;transform:none!important;flex:unset!important;min-width:0!important;max-width:100%!important;width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:1/1!important;margin:0!important;padding:0!important;box-sizing:border-box!important;overflow:hidden!important;border-radius:10px!important}
.aptv-home .aptv-partner-remote.apm57-active .apm57-primary > .aptv-channel-music {overflow:visible!important}
.aptv-home .aptv-partner-remote.apm57-active .apm57-primary > .aptv-quick-tile > button {display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;box-sizing:border-box!important;padding:3px!important;margin:0!important;border-radius:10px!important;white-space:normal!important}
.aptv-home .aptv-partner-remote.apm57-active .apm57-primary > * span:last-child {font-size:clamp(7px,1.65vw,10px)!important;line-height:1.1!important;text-align:center!important;overflow-wrap:anywhere!important}
.aptv-home .aptv-partner-remote.apm57-active .apm57-primary > .aptv-channel-music > .apm57-config {display:grid!important;place-items:center!important;position:absolute!important;top:2px!important;right:2px!important;z-index:9!important;background:#273344!important;border:1px solid #9ca4bb!important;border-radius:5px!important;color:#fff!important;font-size:12px!important;width:19px!important;height:19px!important;min-width:19px!important;min-height:19px!important;cursor:pointer!important}
.aptv-home .aptv-partner-remote.apm57-active .apm57-shell > .aptv-partner-remote-track {display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;position:relative!important;float:none!important;transform:none!important;min-width:0!important;max-width:100%!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:3px 0 8px!important;overflow-x:auto!important;overflow-y:hidden!important;box-sizing:border-box!important;scrollbar-width:thin!important;touch-action:pan-x!important;-webkit-overflow-scrolling:touch!important}
.aptv-home .aptv-partner-remote.apm57-active .apm57-shell > .aptv-partner-remote-track > .aptv-channel-partner {display:flex!important;position:relative!important;float:none!important;transform:none!important;flex:0 0 72px!important;min-width:72px!important;max-width:72px!important;width:72px!important;height:72px!important;min-height:72px!important;max-height:72px!important;aspect-ratio:1/1!important;margin:0!important;order:0!important}
.aptv-home .aptv-partner-remote.apm57-active .apm57-shell > .aptv-partner-remote-track > .apm57-manage-source {display:none!important}
@media(max-width:700px){.aptv-home .aptv-partner-remote.apm57-active .apm57-primary{width:100%!important}.aptv-home .aptv-partner-remote.apm57-active .apm57-shell > .aptv-partner-remote-track > .aptv-channel-partner {flex-basis:66px!important;min-width:66px!important;max-width:66px!important;width:66px!important;height:66px!important;min-height:66px!important}}

/* 0.1.58 | Desktop: same size for AP buttons and partner buttons.
   No DOM reorder, no observers. Mobile/tablet retain the two distinct rows. */
@media screen and (min-width:1025px) {
 .aptv-home .aptv-partner-remote.apm57-active > .apm57-shell {
   display:flex!important;flex-direction:row!important;align-items:center!important;
   justify-content:flex-start!important;gap:14px!important;overflow:hidden!important;
 }
 .aptv-home .aptv-partner-remote.apm57-active .apm57-primary {
   display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
   flex:0 0 auto!important;width:auto!important;max-width:none!important;
   align-items:center!important;gap:8px!important;min-width:0!important;
 }
 .aptv-home .aptv-partner-remote.apm57-active .apm57-primary > .aptv-channel-ap,
 .aptv-home .aptv-partner-remote.apm57-active .apm57-primary > .aptv-channel-music,
 .aptv-home .aptv-partner-remote.apm57-active .apm57-primary > .aptv-quick-tile {
   flex:0 0 72px!important;width:72px!important;min-width:72px!important;
   max-width:72px!important;height:72px!important;min-height:72px!important;
   max-height:72px!important;aspect-ratio:1/1!important;
   position:relative!important;margin:0!important;transform:none!important;
 }
 .aptv-home .aptv-partner-remote.apm57-active .apm57-shell > .aptv-partner-remote-track {
   flex:1 1 0!important;width:0!important;min-width:0!important;max-width:none!important;
   padding:3px 0 8px 14px!important;margin:0!important;
   border-left:1px solid rgba(185,199,225,.45)!important;
   overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;
 }
 .aptv-home .aptv-partner-remote.apm57-active .apm57-shell > .aptv-partner-remote-track > .aptv-channel-partner {
   flex:0 0 72px!important;width:72px!important;min-width:72px!important;
   max-width:72px!important;height:72px!important;min-height:72px!important;max-height:72px!important;
   aspect-ratio:1/1!important;position:relative!important;transform:none!important;
 }
}
