/* IPTV365 LIVE TV ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â consolidated visual stylesheet.
   Layout and behavior are preserved; theme colors match Movies.
   Live TV only. No selectors target Movies, Series, or Dashboard.
*/

/* IPTV365 Premium Live TV workspace only. No selectors target Movies/Series. */
#liveWorkspaceScreen.iptv-live-screen {
  --live-cyan:#16d9ff;
  --live-blue:#087dff;
  --live-purple:#087dff;
  --live-magenta:#087dff;
  --live-panel:rgba(5,8,24,.88);
  --live-text:#f7f8ff;
  position:fixed !important;
  inset:0 !important;
  z-index:8000 !important;
  width:100vw !important;
  height:100vh !important;
  height:100dvh !important;
  min-height:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  display:flex;
  flex-direction:column;
  color:var(--live-text);
  background:
    radial-gradient(ellipse at 12% 8%,rgba(8,125,255,.16),transparent 30%),
    radial-gradient(ellipse at 88% 10%,rgba(22,185,255,.16),transparent 34%),
    radial-gradient(ellipse at 52% 100%,rgba(22,185,255,.10),transparent 38%),
    transparent !important;
  font-family:Arial,Helvetica,sans-serif;
}
#liveWorkspaceScreen.iptv-live-screen::before {
  content:none !important;
  display:none !important;
}
#liveWorkspaceScreen .iptv-live-premium-header {
  position:relative; z-index:1; flex:0 0 76px; min-height:76px;
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; padding:0 clamp(18px,3.5vw,58px);
  border-bottom:1px solid rgba(22,185,255,.30);
  background:linear-gradient(90deg,rgba(6,5,26,.94),rgba(5,14,45,.82),rgba(13,4,31,.94));
  box-shadow:0 8px 28px rgba(0,0,0,.3),0 1px 18px rgba(29,117,255,.13);
}
#liveWorkspaceScreen .iptv-live-brand,
#liveWorkspaceScreen .iptv-live-header-right {display:flex;align-items:center;gap:16px;min-width:0}
#liveWorkspaceScreen .iptv-live-brand-name {font-size:clamp(23px,2.5vw,36px);font-weight:900;letter-spacing:-1.5px;color:#fff;white-space:nowrap}
#liveWorkspaceScreen .iptv-live-brand-name strong {color:#f000d8}
#liveWorkspaceScreen .iptv-live-brand-divider,
#liveWorkspaceScreen .iptv-live-header-divider {width:1px;height:34px;background:rgba(22,185,255,.62)}
#liveWorkspaceScreen .iptv-live-tv-mark {font-size:32px;color:#fff;line-height:1}
#liveWorkspaceScreen .iptv-live-heading {font-size:clamp(20px,2vw,30px);font-weight:800;white-space:nowrap}
#liveWorkspaceScreen .iptv-live-live-pill {display:inline-flex;align-items:center;gap:7px;padding:7px 13px;border-radius:20px;background:#087dff;color:#fff;font-weight:900;font-size:13px;letter-spacing:.5px;box-shadow:0 0 16px rgba(237,23,75,.42)}
#liveWorkspaceScreen .iptv-live-live-pill i {width:7px;height:7px;border-radius:50%;background:#fff;display:inline-block}
#liveWorkspaceScreen .iptv-live-header-right {gap:18px}
#liveWorkspaceScreen .iptv-live-datetime {font-size:14px;color:#e7eaff;white-space:nowrap}
#liveWorkspaceScreen .iptv-live-wifi {font-size:29px;font-weight:900;color:#3aff72;line-height:1}
#liveWorkspaceScreen .iptv-live-icon-btn {width:42px;height:42px;border:0;background:transparent;color:#fff;font-size:28px;font-weight:900;cursor:pointer;border-radius:12px}
#liveWorkspaceScreen .iptv-live-icon-btn:hover {background:rgba(255,255,255,.1);color:#fff;filter:drop-shadow(0 0 8px var(--live-cyan))}
#liveWorkspaceScreen .iptv-live-layout {
  position:relative;z-index:1;display:grid !important;
  grid-template-columns:minmax(280px,29%) minmax(0,1fr) !important;
  gap:0 !important;flex:1 1 auto;min-height:0;height:auto !important;
  margin:0 clamp(12px,1.4vw,24px) clamp(12px,1.4vw,22px);
  border:1px solid rgba(22,185,255,.38);border-radius:24px;
  overflow:hidden;background:rgba(3,6,22,.78);
  box-shadow:0 0 24px rgba(119,25,255,.18),inset 0 0 24px rgba(30,118,255,.06);
}
#liveWorkspaceScreen .iptv-live-sidebar {
  display:flex;flex-direction:column;min-width:0;min-height:0;
  padding:14px 13px 12px;background:linear-gradient(180deg,rgba(6,10,31,.96),rgba(5,7,22,.91));
  border-right:1px solid rgba(22,185,255,.34);overflow:hidden;
}
#liveWorkspaceScreen .iptv-live-splitbar {display:grid;grid-template-columns:minmax(95px,.72fr) minmax(0,1.28fr);gap:10px;margin-bottom:14px}
#liveWorkspaceScreen .iptv-live-back-action,
#liveWorkspaceScreen .iptv-live-search-action {
  height:44px;min-width:0;border:1px solid rgba(160,177,255,.55);border-radius:13px;
  background:rgba(10,14,35,.94);color:#fff;display:flex;align-items:center;justify-content:center;gap:9px;
}
#liveWorkspaceScreen .iptv-live-back-action {font-weight:800;font-size:14px;cursor:pointer}
#liveWorkspaceScreen .iptv-live-back-arrow {font-size:21px}
#liveWorkspaceScreen .iptv-live-search-action {padding:0 12px;justify-content:flex-start}
#liveWorkspaceScreen .iptv-live-search-icon {font-size:22px;color:#fff}
#liveWorkspaceScreen .iptv-live-search-action input {width:100%;min-width:0;background:transparent!important;border:0!important;outline:0!important;color:#fff!important;font-size:14px!important;box-shadow:none!important}
#liveWorkspaceScreen .iptv-live-search-action input::placeholder {color:#b7c2e5}
#liveWorkspaceScreen .iptv-live-account-card {
  flex:0 0 48px;display:flex;align-items:center;gap:12px;padding:0 14px;margin:0 0 10px;
  border:1px solid rgba(43,201,255,.95);border-radius:13px;
  background:linear-gradient(100deg,rgba(3,90,150,.55),rgba(12,28,61,.9));
  color:#fff;font-size:14px;font-weight:800;text-align:left;cursor:pointer;
  box-shadow:0 0 12px rgba(0,190,255,.15);
}
#liveWorkspaceScreen .iptv-live-account-icon {font-size:24px}
#liveWorkspaceScreen .iptv-live-account-chevron {margin-left:auto;font-size:25px}
#liveWorkspaceScreen .iptv-category-list {flex:1 1 auto;min-height:0;overflow:auto;padding:0 2px 4px;display:flex;flex-direction:column;gap:6px}
#liveWorkspaceScreen .iptv-category-list::-webkit-scrollbar,
#liveWorkspaceScreen .iptv-channel-grid-inner::-webkit-scrollbar {width:6px}
#liveWorkspaceScreen .iptv-category-list::-webkit-scrollbar-thumb,
#liveWorkspaceScreen .iptv-channel-grid-inner::-webkit-scrollbar-thumb {background:linear-gradient(var(--live-purple),var(--live-cyan));border-radius:10px}
#liveWorkspaceScreen .iptv-category-row {
  position:relative;display:flex!important;align-items:center!important;gap:11px!important;
  min-height:43px!important;width:100%;padding:8px 12px!important;
  border:1px solid rgba(22,185,255,.34)!important;border-radius:12px!important;
  background:linear-gradient(100deg,rgba(17,22,50,.92),rgba(7,10,29,.94))!important;
  color:#f4f5ff!important;text-align:left!important;font-size:13px!important;font-weight:800!important;
  box-shadow:inset 0 1px rgba(255,255,255,.04);transition:all .18s ease;
}
#liveWorkspaceScreen .iptv-category-row:hover {border-color:rgba(0,212,255,.9)!important;box-shadow:0 0 13px rgba(0,190,255,.22)}
#liveWorkspaceScreen .iptv-category-row.active,
#liveWorkspaceScreen .iptv-category-row[aria-pressed="true"] {
  background:linear-gradient(100deg,#075bbd,#087dff)!important;border:1px solid #16bfff!important;
  box-shadow:0 0 8px #16bfff,0 0 20px rgba(205,0,255,.48),inset 0 0 12px rgba(255,255,255,.15)!important;
}
#liveWorkspaceScreen .iptv-category-count {margin-left:auto;flex:0 0 auto;padding:4px 9px;border:1px solid rgba(230,235,255,.52);border-radius:18px;background:rgba(255,255,255,.11);font-size:12px}
#liveWorkspaceScreen .iptv-live-content {display:flex;flex-direction:column;min-width:0;min-height:0;padding:13px 14px 14px;background:linear-gradient(135deg,rgba(3,8,27,.78),rgba(5,6,24,.92))}
#liveWorkspaceScreen .iptv-live-channel-toolbar {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;margin-bottom:12px}
#liveWorkspaceScreen .iptv-live-tabs,
#liveWorkspaceScreen .iptv-live-toolbar-actions {display:flex;align-items:center;gap:9px;min-width:0}
#liveWorkspaceScreen .iptv-live-tab {height:42px;padding:0 15px;border:1px solid rgba(22,185,255,.34);border-radius:12px;background:rgba(7,11,31,.9);color:#fff;font-size:15px;font-weight:800;white-space:nowrap;cursor:pointer}
#liveWorkspaceScreen .iptv-live-tab.active {border-color:#16bfff;background:linear-gradient(110deg,#075bbd,#087dff);box-shadow:0 0 8px #a000ff,0 0 17px rgba(210,0,255,.55)}
#liveWorkspaceScreen .iptv-live-tab b {font-size:12px}
#liveWorkspaceScreen .iptv-live-sort-wrap {height:42px;display:flex;align-items:center;gap:6px;padding:0 11px;border:1px solid rgba(22,185,255,.34);border-radius:11px;background:rgba(7,11,31,.9);font-size:12px;color:#dce4ff;white-space:nowrap}
#liveWorkspaceScreen .iptv-live-sort-wrap select {background:transparent;border:0;color:#fff;font-weight:800;outline:0;min-width:65px}
#liveWorkspaceScreen .iptv-live-sort-wrap option {background:#0a1028;color:#fff}
#liveWorkspaceScreen .iptv-live-view-toggle {display:flex;padding:3px;border:1px solid rgba(22,185,255,.34);border-radius:11px;background:rgba(7,11,31,.9)}
#liveWorkspaceScreen .iptv-live-view-toggle button {width:36px;height:34px;border:0;border-radius:8px;background:transparent;color:#dce4ff;font-size:20px;cursor:pointer}
#liveWorkspaceScreen .iptv-live-view-toggle button.active {background:linear-gradient(120deg,#075bbd,#087dff);color:#fff;box-shadow:0 0 12px rgba(205,0,255,.55)}
#liveWorkspaceScreen #liveBrowsePanel {flex:1 1 auto;min-height:0;overflow:hidden}
#liveWorkspaceScreen #liveChannelGrid {height:100%;min-height:0;overflow:auto;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-auto-rows:minmax(145px,1fr)!important;gap:12px!important;padding:3px 4px 8px;align-content:start}
#liveWorkspaceScreen .iptv-channel-card {
  position:relative;display:flex!important;flex-direction:column;align-items:center;justify-content:center;
  gap:7px;min-width:0;min-height:145px;padding:12px 9px 30px!important;
  border:1.5px solid rgba(22,185,255,.70)!important;border-radius:17px!important;
  background:linear-gradient(145deg,rgba(7,17,42,.98),rgba(3,6,18,.98))!important;
  color:#fff!important;box-shadow:0 0 8px rgba(175,38,255,.3),inset 0 0 16px rgba(20,117,255,.12)!important;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
#liveWorkspaceScreen .iptv-channel-card:nth-child(3n+1) {border-color:rgba(82,196,255,.95)!important}
#liveWorkspaceScreen .iptv-channel-card:hover,
#liveWorkspaceScreen .iptv-channel-card.active {transform:translateY(-2px);border-color:#16bfff!important;box-shadow:0 0 10px #9b22ff,0 0 21px rgba(223,0,255,.43)!important}
#liveWorkspaceScreen .iptv-channel-logo {display:flex;align-items:center;justify-content:center;width:100%;height:76px;min-height:50px;overflow:hidden}
#liveWorkspaceScreen .iptv-channel-logo img {display:block;max-width:88%;max-height:72px;object-fit:contain}
#liveWorkspaceScreen .iptv-logo-fallback {font-size:clamp(25px,3vw,42px);font-weight:1000;letter-spacing:-1px;color:#1389ec;line-height:1}
#liveWorkspaceScreen .iptv-channel-label {display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;width:100%;color:#fff;font-size:clamp(11px,.95vw,14px);font-weight:800;line-height:1.25;text-align:center;text-transform:uppercase;overflow-wrap:anywhere}
/* Channel-card LIVE badges removed for a cleaner premium grid. Header LIVE indicator remains. */
#liveWorkspaceScreen .iptv-channel-card::after {content:none!important;display:none!important}
#liveWorkspaceScreen .iptv-channel-fav {position:absolute;top:7px;right:8px;z-index:2;color:#fff;font-size:19px;line-height:1;cursor:pointer;text-shadow:0 0 5px #000}
#liveWorkspaceScreen .iptv-channel-fav.is-fav {color:#ffe34a}
#liveWorkspaceScreen #liveChannelGrid.live-list-mode {display:flex!important;flex-direction:column;gap:7px}
#liveWorkspaceScreen #liveChannelGrid.live-list-mode .iptv-channel-card {flex-direction:row;justify-content:flex-start;min-height:66px;padding:8px 46px 8px 12px!important;border-radius:12px!important}
#liveWorkspaceScreen #liveChannelGrid.live-list-mode .iptv-channel-logo {width:76px;height:48px;flex:0 0 76px}
#liveWorkspaceScreen #liveChannelGrid.live-list-mode .iptv-channel-logo img {max-height:45px}
#liveWorkspaceScreen #liveChannelGrid.live-list-mode .iptv-channel-label {text-align:left;-webkit-line-clamp:2}
#liveWorkspaceScreen #liveChannelGrid.live-list-mode .iptv-channel-card::after {content:none!important;display:none!important}
#liveWorkspaceScreen .iptv-grid-empty {grid-column:1/-1;color:#cbd7ff;text-align:center;padding:40px 15px;font-weight:700}
#liveWorkspaceScreen .iptv-playback-view {flex:1;min-height:0;overflow:auto}
#liveWorkspaceScreen .iptv-playback-toolbar {display:flex;align-items:center;gap:12px;padding:8px 0 12px}
#liveWorkspaceScreen .iptv-playback-title {color:#fff;font-weight:900}
#liveWorkspaceScreen .iptv-toolbar-btn {border:1px solid rgba(22,185,255,.55);border-radius:10px;background:#071a32;color:#fff;padding:9px 13px}
#liveWorkspaceScreen .right-player-panel {min-height:300px}
#liveWorkspaceScreen .player-stage {border:1px solid rgba(58,206,255,.8);border-radius:16px;overflow:hidden;box-shadow:0 0 20px rgba(0,151,255,.16)}
#liveWorkspaceScreen .epg-panel {margin-top:12px;border:1px solid rgba(22,185,255,.34);border-radius:14px;background:rgba(7,11,31,.9);padding:14px}
#liveWorkspaceScreen .epg-panel[hidden] {display:none!important}
#liveWorkspaceScreen .iptv-live-channel-toolbar[hidden] {display:none!important}

@media(max-width:1200px) {
 #liveWorkspaceScreen #liveChannelGrid {grid-template-columns:repeat(4,minmax(0,1fr))!important}
 #liveWorkspaceScreen .iptv-live-layout {grid-template-columns:minmax(245px,31%) minmax(0,1fr)!important}
 #liveWorkspaceScreen .iptv-live-tab {padding:0 10px;font-size:13px}
}
@media(max-width:800px) {
 #liveWorkspaceScreen .iptv-live-premium-header {flex-basis:62px;min-height:62px;padding:0 12px}
 #liveWorkspaceScreen .iptv-live-datetime,#liveWorkspaceScreen .iptv-live-header-divider {display:none}
 #liveWorkspaceScreen .iptv-live-header-right {gap:5px}
 #liveWorkspaceScreen .iptv-live-layout {grid-template-columns:1fr!important;grid-template-rows:minmax(150px,34%) minmax(0,1fr)!important;margin:0 7px 7px;border-radius:15px}
 #liveWorkspaceScreen .iptv-live-sidebar {padding:8px;border-right:0;border-bottom:1px solid rgba(22,185,255,.34)}
 #liveWorkspaceScreen .iptv-live-splitbar {margin-bottom:7px}
 #liveWorkspaceScreen .iptv-live-account-card {display:none}
 #liveWorkspaceScreen .iptv-category-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:5px}
 #liveWorkspaceScreen .iptv-category-row {min-height:34px!important;padding:5px 8px!important;font-size:11px!important}
 #liveWorkspaceScreen .iptv-live-content {padding:8px}
 #liveWorkspaceScreen .iptv-live-channel-toolbar {align-items:flex-start;flex-direction:column}
 #liveWorkspaceScreen .iptv-live-tabs {width:100%;overflow-x:auto}
 #liveWorkspaceScreen .iptv-live-tab {height:37px;flex:0 0 auto}
 #liveWorkspaceScreen .iptv-live-toolbar-actions {width:100%;justify-content:flex-end}
 #liveWorkspaceScreen #liveChannelGrid {grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(118px,1fr);gap:7px}
 #liveWorkspaceScreen .iptv-channel-card {min-height:118px;padding:8px 6px 27px!important}
 #liveWorkspaceScreen .iptv-channel-logo {height:56px}
 #liveWorkspaceScreen .iptv-channel-logo img {max-height:54px}
}
@media(max-width:480px) {
 #liveWorkspaceScreen .iptv-live-heading {font-size:17px}
 #liveWorkspaceScreen .iptv-live-brand-name {font-size:22px}
 #liveWorkspaceScreen .iptv-live-tv-mark {font-size:22px}
 #liveWorkspaceScreen .iptv-live-live-pill {padding:5px 8px;font-size:10px}
 #liveWorkspaceScreen #liveChannelGrid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Final specificity layer: neutralize legacy Live-only workspace layout rules. */
#liveWorkspaceScreen.iptv-live-screen:not(.hidden) {display:flex!important;flex-direction:column!important}
#liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-layout {
  display:grid!important;grid-template-columns:minmax(280px,29%) minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;height:auto!important;max-height:none!important;
  min-height:0!important;padding:0!important;gap:0!important;overflow:hidden!important;
}
#liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-sidebar {
  padding:14px 13px 12px!important;border:0!important;border-right:1px solid rgba(22,185,255,.34)!important;
  border-radius:0!important;background:linear-gradient(180deg,rgba(6,10,31,.96),rgba(5,7,22,.91))!important;
}
#liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-content {
  display:flex!important;flex-direction:column!important;grid-template-columns:none!important;
  grid-template-rows:none!important;gap:0!important;height:auto!important;min-height:0!important;
  padding:13px 14px 14px!important;border:0!important;border-radius:0!important;
  background:linear-gradient(135deg,rgba(3,8,27,.78),rgba(5,6,24,.92))!important;
}
#liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row {
  display:flex!important;min-height:43px!important;padding:8px 12px!important;
  border:1px solid rgba(22,185,255,.34)!important;border-radius:12px!important;
  background:linear-gradient(100deg,rgba(17,22,50,.92),rgba(7,10,29,.94))!important;
  color:#f4f5ff!important;
}
#liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row.active {
  background:linear-gradient(100deg,#075bbd,#087dff)!important;
  border:1px solid #16bfff!important;box-shadow:0 0 8px #16bfff,0 0 20px rgba(205,0,255,.48)!important;
}
#liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-channel-card {
  min-height:145px!important;padding:12px 9px 30px!important;
  border:1.5px solid rgba(22,185,255,.70)!important;border-radius:17px!important;
  background:linear-gradient(145deg,rgba(7,17,42,.98),rgba(3,6,18,.98))!important;
  color:#fff!important;
}
@media(max-width:800px) {
 #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-layout {
  grid-template-columns:1fr!important;grid-template-rows:minmax(150px,34%) minmax(0,1fr)!important;
 }
 #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-sidebar {
  padding:8px!important;border:0!important;border-bottom:1px solid rgba(22,185,255,.34)!important;
 }
 #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-content {padding:8px!important}
}

/* =========================================================
   IPTV365 LIVE TV - APPROVED SIDEBAR + CHANNEL CARD UPDATE
   ========================================================= */

/* Hide the separate Account Information button.
   Keep its HTML node hidden for compatibility with existing JS. */
#liveWorkspaceScreen.iptv-live-screen .iptv-live-account-card {
  display:none !important;
}

/* Match Back and Search backgrounds to the former Account button. */
#liveWorkspaceScreen.iptv-live-screen .iptv-live-splitbar .iptv-live-back-action,
#liveWorkspaceScreen.iptv-live-screen .iptv-live-splitbar .iptv-live-search-action {
  border:1px solid rgba(43,201,255,.95) !important;
  background:linear-gradient(100deg,rgba(3,90,150,.55),rgba(12,28,61,.9)) !important;
  color:#fff !important;
  box-shadow:0 0 12px rgba(0,190,255,.15) !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-splitbar .iptv-live-back-action:hover,
#liveWorkspaceScreen.iptv-live-screen .iptv-live-splitbar .iptv-live-search-action:focus-within {
  border-color:#62e5ff !important;
  box-shadow:0 0 14px rgba(0,190,255,.28) !important;
}

/* Keep the responsive logo area and pin each channel name to the card bottom. */
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-card {
  display:flex !important;
  flex-direction:column !important;
  justify-content:space-between !important;
  align-items:center !important;
  gap:5px !important;
  padding:10px 9px 10px !important;
}
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-logo {
  flex:0 0 76px !important;
  width:100% !important;
  height:76px !important;
  min-height:50px !important;
  margin:0 !important;
}
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-logo img {
  max-width:88% !important;
  max-height:72px !important;
  width:auto !important;
  height:auto !important;
  object-fit:contain !important;
}
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-label {
  flex:0 0 auto !important;
  width:100% !important;
  min-height:2.5em !important;
  margin-top:auto !important;
  display:-webkit-box !important;
  -webkit-line-clamp:3 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
  text-align:center !important;
  line-height:1.25 !important;
}

/* Scale down logo space on smaller devices; labels remain bottom-aligned. */
@media(max-width:800px) {
  #liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-card {
    padding:8px 6px 8px !important;
  }
  #liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-logo {
    flex-basis:56px !important;
    height:56px !important;
  }
  #liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-logo img {
    max-height:54px !important;
  }
}


/* IPTV365 Live TV: premium burgundy + gold browsing cards (Live TV only). */
#liveWorkspaceScreen.iptv-live-screen .iptv-live-content {
  background:linear-gradient(135deg,#030814 0%,#061329 48%,#030814 100%) !important;
}
#liveWorkspaceScreen.iptv-live-screen #liveBrowsePanel {
  overflow:hidden !important;
  min-height:0 !important;
}
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid {
  display:block !important;
  height:100% !important;
  overflow:auto !important;
  padding:3px 5px 14px !important;
  align-content:initial !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-section {
  margin:0 0 19px !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-heading {
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  margin:0 0 10px !important;
  color:#d9f6ff !important;
  font-size:clamp(19px,1.65vw,27px) !important;
  line-height:1.15 !important;
  font-weight:950 !important;
  letter-spacing:.25px !important;
  text-shadow:0 0 10px rgba(255,190,38,.22) !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-heading::after {
  content:"";
  height:2px;
  flex:1 1 auto;
  min-width:24px;
  background:linear-gradient(90deg,#16bfff,#087dff 70%,rgba(217,154,34,.08));
  box-shadow:0 0 7px rgba(255,197,54,.35);
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-grid {
  display:grid !important;
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:11px !important;
  align-items:stretch !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-card {
  position:relative !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;
  min-width:0 !important;
  min-height:116px !important;
  padding:10px 8px !important;
  overflow:hidden !important;
  border:1.5px solid #168fce !important;
  border-radius:16px !important;
  background:
    radial-gradient(ellipse at 50% 0%,rgba(119,31,24,.25),transparent 66%),
    linear-gradient(145deg,#071a32 0%,#030814 55%,#092342 100%) !important;
  color:#fff !important;
  box-shadow:0 0 5px rgba(255,191,57,.35),inset 0 0 15px rgba(121,25,18,.24) !important;
  cursor:pointer !important;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-card:hover,
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-card:focus-visible {
  transform:translateY(-2px) !important;
  border-color:#a8efff !important;
  outline:0 !important;
  box-shadow:0 0 9px rgba(255,207,73,.65),0 0 19px rgba(180,87,20,.28),inset 0 0 18px rgba(160,46,20,.24) !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-mark {
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:66px !important;
  width:100% !important;
  font-size:clamp(38px,4.2vw,58px) !important;
  line-height:1 !important;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.45)) !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-label {
  display:block !important;
  width:100% !important;
  color:#fff !important;
  font-size:clamp(11px,.95vw,15px) !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  text-align:center !important;
  text-transform:uppercase !important;
  overflow-wrap:anywhere !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-card small {
  color:#e8c875 !important;
  font-size:10px !important;
  line-height:1.1 !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-country-context {
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:12px !important;
  margin:0 0 14px !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-country-context h2 {
  margin:0 !important;
  color:#d9f6ff !important;
  font-size:clamp(18px,1.5vw,25px) !important;
  font-weight:950 !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-back {
  border:1px solid #d5a63b !important;
  border-radius:10px !important;
  padding:8px 12px !important;
  background:linear-gradient(145deg,#26090d,#100408) !important;
  color:#d9f6ff !important;
  font-weight:800 !important;
  cursor:pointer !important;
}
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-card {
  min-height:145px !important;
  justify-content:space-between !important;
  padding:10px 9px 10px !important;
  border:1.5px solid #168fce !important;
  border-radius:16px !important;
  background:
    radial-gradient(ellipse at 50% 0%,rgba(119,31,24,.22),transparent 66%),
    linear-gradient(145deg,#071a32 0%,#030814 55%,#092342 100%) !important;
  box-shadow:0 0 6px rgba(255,191,57,.3),inset 0 0 14px rgba(121,25,18,.22) !important;
}
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-card:nth-child(3n+1) {
  border-color:#168fce !important;
}
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-card:hover,
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid:not(.live-list-mode) .iptv-channel-card.active {
  border-color:#a8efff !important;
  box-shadow:0 0 9px rgba(255,207,73,.62),0 0 18px rgba(180,87,20,.25) !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-channel-fav {
  color:#fff !important;
  text-shadow:0 1px 4px #000,0 0 5px #000 !important;
}
#liveWorkspaceScreen.iptv-live-screen .iptv-channel-fav.is-fav {color:#ffdf45 !important}
#liveWorkspaceScreen.iptv-live-screen .iptv-channel-label {
  color:#fff !important;
  font-weight:900 !important;
}
@media(max-width:1450px) {
  #liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-grid {grid-template-columns:repeat(5,minmax(0,1fr)) !important}
}
@media(max-width:1100px) {
  #liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-grid {grid-template-columns:repeat(4,minmax(0,1fr)) !important}
}
@media(max-width:900px) {
  #liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-grid {grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important}
  #liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-card {min-height:100px !important}
  #liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-mark {min-height:54px !important;font-size:42px !important}
}
@media(max-width:560px) {
  #liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-grid {grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  #liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-heading {font-size:17px !important}
  #liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-card {min-height:94px !important;padding:8px 6px !important}
  #liveWorkspaceScreen.iptv-live-screen .iptv-live-browse-mark {min-height:48px !important;font-size:36px !important}
}

#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid.has-channel-cards {
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  grid-auto-rows:minmax(145px,1fr) !important;
  gap:11px !important;
  align-content:start !important;
}
#liveWorkspaceScreen.iptv-live-screen #liveChannelGrid.has-channel-cards.live-list-mode {
  display:flex !important;
  flex-direction:column !important;
}
@media(max-width:1250px) {
  #liveWorkspaceScreen.iptv-live-screen #liveChannelGrid.has-channel-cards {grid-template-columns:repeat(4,minmax(0,1fr)) !important}
}
@media(max-width:900px) {
  #liveWorkspaceScreen.iptv-live-screen #liveChannelGrid.has-channel-cards {grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important}
}
@media(max-width:560px) {
  #liveWorkspaceScreen.iptv-live-screen #liveChannelGrid.has-channel-cards {grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}

/* IPTV365 fix: remove the duplicate burgundy Account Information card.
   Keep the HTML element and its JS hook for compatibility; hide only this card. */
#liveWorkspaceScreen.iptv-live-screen .iptv-live-sidebar .iptv-live-account-card {
  display:none !important;
}

/* Consolidated Live TV workspace rules migrated from galaxy-workspace-fix.css. */
#liveWorkspaceScreen:not(.hidden) {
  position: fixed !important;
  inset: 7px !important;
  z-index: 500 !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  color: #f7f7fa !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  isolation: isolate !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-layout {
  display: grid !important;
  grid-template-columns: minmax(230px, 30%) minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px !important;
  padding-top: 48px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: 0 !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-sidebar {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 9px 0 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid rgba(220, 220, 235, .28) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}#liveWorkspaceScreen:not(.hidden) #livePanelList,
#liveWorkspaceScreen:not(.hidden) .iptv-category-list {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 6px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(185, 185, 200, .48) transparent !important;
  background: rgba(8, 9, 14, .55) !important;
  border: 1px solid rgba(22, 185, 255, .30) !important;
  border-radius: 11px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045) !important;
  -webkit-backdrop-filter: blur(12px) saturate(105%) !important;
  backdrop-filter: blur(12px) saturate(105%) !important;
}#liveWorkspaceScreen:not(.hidden) #livePanelList > *,
#liveWorkspaceScreen:not(.hidden) .iptv-category-list > * {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: clamp(28px, 3.1vw, 42px) !important;
  margin: 0 !important;
  padding: 5px 9px !important;
  color: #f7f7fa !important;
  background: rgba(5, 7, 17, .91) !important;
  background-color: rgba(5, 7, 17, .91) !important;
  border: 1px solid rgba(22, 185, 255, .34) !important;
  border-radius: 9px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
  font-size: clamp(11px, .92vw, 14px) !important;
  font-weight: 750 !important;
  line-height: 1.18 !important;
  text-align: left !important;
  white-space: normal !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}#liveWorkspaceScreen:not(.hidden) #livePanelList > *.active,
#liveWorkspaceScreen:not(.hidden) #livePanelList > *.selected,
#liveWorkspaceScreen:not(.hidden) #livePanelList > *[aria-current="true"],
#liveWorkspaceScreen:not(.hidden) .iptv-category-list > *.active,
#liveWorkspaceScreen:not(.hidden) .iptv-category-list > *.selected {
  color: #fff !important;
  background: linear-gradient(105deg, #6419c8 0%, #bd00d5 100%) !important;
  border-color: rgba(255,255,255,.92) !important;
  box-shadow: 0 0 10px rgba(168, 25, 225, .20),
              inset 0 1px 0 rgba(255,255,255,.12) !important;
}#liveWorkspaceScreen:not(.hidden) #livePanelList > *:hover,
#liveWorkspaceScreen:not(.hidden) .iptv-category-list > *:hover {
  border-color: rgba(22,185,255,.78) !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-content {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  border: 0 !important;
}#liveWorkspaceScreen:not(.hidden) #liveBrowsePanel:not(.hidden) {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 8px !important;
  overflow: hidden !important;
  background: rgba(0, 0, 0, .48) !important;
  border: 1px solid rgba(22, 185, 255, .16) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035) !important;
  -webkit-backdrop-filter: blur(7px) !important;
  backdrop-filter: blur(7px) !important;
}#liveWorkspaceScreen:not(.hidden) #liveChannelGrid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(clamp(90px, 10vw, 145px), 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-rows: max-content !important;
  align-content: start !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  gap: clamp(7px, .85vw, 13px) !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 2px 2px 12px 2px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scroll-behavior: smooth !important;
  background: transparent !important;
  box-sizing: border-box !important;
}#liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card,
#liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card:hover,
#liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card:focus,
#liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card:focus-within {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
  height: clamp(120px, 16vw, 155px) !important;
  min-height: clamp(120px, 16vw, 155px) !important;
  margin: 0 !important;
  padding: 7px 6px 6px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  color: #fff !important;
  background: rgba(3, 8, 20, .94) !important;
  background-color: rgba(3, 8, 20, .94) !important;
  background-image: none !important;
  border: 1.5px solid rgba(22, 185, 255, .72) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18) !important;
  -webkit-backdrop-filter: blur(9px) saturate(105%) !important;
  backdrop-filter: blur(9px) saturate(105%) !important;
  transform: none !important;
}#liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card:hover {
  border-color: #fff !important;
  background: rgba(8, 24, 44, .98) !important;
  transform: translateY(-1px) !important;
}#liveWorkspaceScreen:not(.hidden) #liveChannelGrid .iptv-channel-logo {
  display: flex !important;
  flex: 0 0 clamp(62px, 7.2vw, 76px) !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: clamp(62px, 7.2vw, 76px) !important;
  min-height: clamp(62px, 7.2vw, 76px) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: rgba(0, 0, 0, .46) !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.24) !important;
}#liveWorkspaceScreen:not(.hidden) #liveChannelGrid .iptv-channel-logo img {
  display: block !important;
  width: 96% !important;
  height: 96% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}#liveWorkspaceScreen:not(.hidden) #liveChannelGrid .iptv-channel-label {
  display: -webkit-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 2.6em !important;
  max-height: 2.6em !important;
  margin: 0 !important;
  padding: 0 2px !important;
  overflow: hidden !important;
  color: #fff !important;
  background: transparent !important;
  font-size: clamp(10px, .88vw, 13px) !important;
  font-weight: 750 !important;
  line-height: 1.22 !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.70) !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}#liveWorkspaceScreen:not(.hidden) #livePlaybackPanel:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  gap: 10px !important;
  overflow: auto !important;
  background: transparent !important;
}#liveWorkspaceScreen:not(.hidden) #livePlaybackPanel .player-stage {
  width: 100% !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  background: #000 !important;
  border-radius: 10px !important;
}#liveWorkspaceScreen:not(.hidden) #livePlaybackPanel .epg-panel {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-height: 150px !important;
  overflow: auto !important;
  background: rgba(22,22,25,.96) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 10px !important;
}@media (min-width: 761px) and (max-width: 1100px) {
#liveWorkspaceScreen:not(.hidden) .iptv-live-layout {
    grid-template-columns: minmax(190px, 31%) minmax(0, 1fr) !important;
    gap: 8px !important;
  }#liveWorkspaceScreen:not(.hidden) > .iptv-live-home-btn {
    width: calc(31% - 16px) !important;
  }#liveWorkspaceScreen:not(.hidden) #liveChannelGrid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}@media (max-width: 760px) {
#liveWorkspaceScreen:not(.hidden) {
    inset: 5px !important;
  }#liveWorkspaceScreen:not(.hidden) .iptv-live-layout {
    grid-template-columns: minmax(125px, 32%) minmax(0, 1fr) !important;
    gap: 7px !important;
    padding: 8px !important;
    padding-top: 47px !important;
  }#liveWorkspaceScreen:not(.hidden) > .iptv-live-home-btn {
    left: 8px !important;
    top: 7px !important;
    width: calc(32% - 13px) !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 11px !important;
  }#liveWorkspaceScreen:not(.hidden) .iptv-live-sidebar {
    padding-right: 6px !important;
  }#liveWorkspaceScreen:not(.hidden) #livePanelSearch,
  #liveWorkspaceScreen:not(.hidden) .iptv-category-search {
    flex-basis: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 11px !important;
  }#liveWorkspaceScreen:not(.hidden) #livePanelList > *,
  #liveWorkspaceScreen:not(.hidden) .iptv-category-list > * {
    min-height: 30px !important;
    padding: 5px 6px !important;
    font-size: 10px !important;
  }#liveWorkspaceScreen:not(.hidden) #liveChannelGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    padding: 2px !important;
  }#liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card {
    height: 116px !important;
    min-height: 116px !important;
    padding: 5px 4px !important;
    gap: 4px !important;
  }#liveWorkspaceScreen:not(.hidden) #liveChannelGrid .iptv-channel-logo {
    flex-basis: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
  }#liveWorkspaceScreen:not(.hidden) #liveChannelGrid .iptv-channel-label {
    font-size: 9px !important;
    min-height: 2.4em !important;
    max-height: 2.4em !important;
  }
}@media (max-width: 420px) {
#liveWorkspaceScreen:not(.hidden) #liveChannelGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}@media (prefers-reduced-motion: reduce) {
#liveWorkspaceScreen:not(.hidden) #liveChannelGrid,
  #liveWorkspaceScreen:not(.hidden) #livePanelList {
    scroll-behavior: auto !important;
  }
}#liveWorkspaceScreen:not(.hidden) .iptv-live-sidebar > .iptv-live-splitbar {
  display: flex !important;
  flex: 0 0 46px !important;
  width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(22,185,255,.62) !important;
  border-radius: 11px !important;
  background: #050610 !important;
  box-shadow: 0 5px 16px rgba(0,0,0,.25) !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-back-action,
#liveWorkspaceScreen:not(.hidden) .iptv-live-search-action {
  display: flex !important;
  flex: 1 1 50% !important;
  width: 50% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #050610 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-back-action {
  border-right: 1px solid rgba(22,185,255,.34) !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-back-arrow {
  display: inline-block !important;
  color: #fff !important;
  font-size: 23px !important;
  font-weight: 800 !important;
  line-height: .8 !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-search-action {
  justify-content: flex-start !important;
  gap: 7px !important;
  cursor: text !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-search-icon {
  flex: 0 0 auto !important;
  color: #fff !important;
  font-size: 21px !important;
  line-height: 1 !important;
}#liveWorkspaceScreen:not(.hidden) #livePanelSearch,
#liveWorkspaceScreen:not(.hidden) .iptv-live-search-action .iptv-category-search {
  display: block !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
}#liveWorkspaceScreen:not(.hidden) #livePanelSearch::placeholder {
  color: rgba(255,255,255,.88) !important;
  opacity: 1 !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-back-action:hover,
#liveWorkspaceScreen:not(.hidden) .iptv-live-back-action:focus-visible,
#liveWorkspaceScreen:not(.hidden) .iptv-live-search-action:hover,
#liveWorkspaceScreen:not(.hidden) .iptv-live-search-action:focus-within {
  background: #252a38 !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(22,185,255,.34) !important;
  outline: none !important;
}#liveWorkspaceScreen:not(.hidden) .iptv-live-back-action:focus-visible {
  background: #343b4c !important;
}#liveWorkspaceScreen:not(.hidden) > .iptv-live-home-btn {
  display: none !important;
}@media (max-width: 760px) {
#liveWorkspaceScreen:not(.hidden) .iptv-live-sidebar > .iptv-live-splitbar {
    flex-basis: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }#liveWorkspaceScreen:not(.hidden) .iptv-live-back-action,
  #liveWorkspaceScreen:not(.hidden) .iptv-live-search-action {
    font-size: 12px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* ================================================================
   IPTV365 LIVE TV ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â MOVIES-MATCHED FULLSCREEN HEADER + GLASS FRAME
   Visual/layout update only. Existing playback, category, search and
   favourite state handlers are retained and connected by their IDs/data.
   ================================================================ */

html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) {
  position:fixed !important;
  inset:0 !important;
  z-index:8000 !important;
  display:flex !important;
  flex-direction:column !important;
  width:100vw !important;
  height:100vh !important;
  height:100dvh !important;
  min-height:0 !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  background:transparent !important;
}

html body #liveWorkspaceScreen:not(.hidden) .iptv-live-premium-header {
  position:relative !important;
  z-index:5 !important;
  display:grid !important;
  grid-template-columns:minmax(150px,1fr) auto minmax(300px,1fr) !important;
  align-items:center !important;
  gap:clamp(10px,1.2vw,20px) !important;
  flex:0 0 clamp(72px,9vh,94px) !important;
  width:100% !important;
  height:clamp(72px,9vh,94px) !important;
  min-height:72px !important;
  max-height:94px !important;
  margin:0 !important;
  padding:5px clamp(18px,2.5vw,44px) !important;
  box-sizing:border-box !important;
  border:0 !important;
  border-bottom:1px solid rgba(0,150,255,.16) !important;
  border-radius:0 !important;
  background:linear-gradient(90deg,rgba(1,6,13,.97),rgba(2,13,27,.90),rgba(1,6,13,.97)) !important;
  box-shadow:0 8px 24px rgba(0,0,0,.34),inset 0 -1px rgba(255,255,255,.035) !important;
  -webkit-backdrop-filter:blur(16px) saturate(125%) !important;
  backdrop-filter:blur(16px) saturate(125%) !important;
}

#liveWorkspaceScreen .iptv365-live-brand-logo {
  display:flex !important;
  align-items:center !important;
  justify-self:start !important;
  width:max-content !important;
  min-width:0 !important;
  color:#fff !important;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.55)) !important;
  white-space:nowrap !important;
}
#liveWorkspaceScreen .iptv365-live-brand-word {
  font-size:clamp(18px,1.95vw,31px) !important;
  font-style:italic !important;
  font-weight:950 !important;
  letter-spacing:-1.6px !important;
}
#liveWorkspaceScreen .iptv365-live-brand-play {
  position:relative !important;
  display:grid !important;
  place-items:center !important;
  width:clamp(50px,5.5vw,84px) !important;
  height:clamp(38px,4.6vw,62px) !important;
  margin-left:5px !important;
  padding-right:10px !important;
  clip-path:polygon(0 0,100% 50%,0 100%) !important;
  border-radius:12px !important;
  background:linear-gradient(145deg,#fff06a 0%,#ffc400 48%,#ff8b00 100%) !important;
  color:#050505 !important;
}
#liveWorkspaceScreen .iptv365-live-brand-play b {
  font-size:clamp(17px,1.7vw,27px) !important;
  font-weight:1000 !important;
  transform:translateX(-5px) !important;
}
#liveWorkspaceScreen .iptv-live-centered-title {
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:0 !important;
  justify-self:center !important;
}
#liveWorkspaceScreen .iptv-live-centered-title .iptv-live-heading {
  color:#f7fbff !important;
  font-size:clamp(20px,2.3vw,35px) !important;
  font-style:italic !important;
  font-weight:950 !important;
  letter-spacing:-1.3px !important;
  line-height:1 !important;
  text-align:center !important;
  text-shadow:0 2px 12px rgba(0,130,255,.22) !important;
  white-space:nowrap !important;
}
html body #liveWorkspaceScreen:not(.hidden) .iptv-live-header-right {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  justify-self:end !important;
  gap:clamp(7px,.8vw,13px) !important;
  width:100% !important;
  min-width:0 !important;
  margin:0 !important;
}
#liveWorkspaceScreen .iptv-live-header-search {
  display:flex !important;
  flex:0 1 clamp(190px,22vw,330px) !important;
  align-items:center !important;
  width:clamp(190px,22vw,330px) !important;
  min-width:150px !important;
  max-width:330px !important;
  height:42px !important;
  margin:0 !important;
  padding:0 13px !important;
  box-sizing:border-box !important;
  border:1px solid rgba(0,160,255,.58) !important;
  border-radius:12px !important;
  background:rgba(1,10,20,.82) !important;
  box-shadow:inset 0 0 12px rgba(0,140,255,.07) !important;
}
#liveWorkspaceScreen .iptv-live-header-search:focus-within {
  border-color:#20bdff !important;
  box-shadow:0 0 12px rgba(0,166,255,.24),inset 0 0 12px rgba(0,140,255,.10) !important;
}
html body #liveWorkspaceScreen:not(.hidden) .iptv-live-header-search #livePanelSearch {
  display:block !important;
  flex:1 1 auto !important;
  width:100% !important;
  min-width:0 !important;
  height:100% !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 28px 0 0 !important;
  border:0 !important;
  border-radius:0 !important;
  outline:0 !important;
  background-color:transparent !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23d9f4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right center !important;
  background-size:19px 19px !important;
  color:#fff !important;
  box-shadow:none !important;
  font-size:13px !important;
  font-weight:650 !important;
}
#liveWorkspaceScreen .iptv-live-header-search #livePanelSearch::placeholder {
  color:rgba(217,244,255,.76) !important;
  opacity:1 !important;
}
#liveWorkspaceScreen .iptv-live-header-favorites {
  display:grid !important;
  flex:0 0 48px !important;
  place-items:center !important;
  width:48px !important;
  height:44px !important;
  min-height:44px !important;
  margin:0 !important;
  padding:0 !important;
  border:1px solid rgba(0,166,255,.48) !important;
  border-radius:13px !important;
  background:linear-gradient(135deg,rgba(5,29,49,.96),rgba(1,13,27,.96)) !important;
  color:#f8fbff !important;
  cursor:pointer !important;
  box-shadow:inset 0 0 12px rgba(0,140,255,.07) !important;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease !important;
}
#liveWorkspaceScreen .iptv-live-header-favorites span {
  color:#ff4d83 !important;
  font-size:29px !important;
  line-height:1 !important;
  text-shadow:0 0 10px rgba(255,48,111,.38) !important;
}
#liveWorkspaceScreen .iptv-live-header-favorites:hover,
#liveWorkspaceScreen .iptv-live-header-favorites:focus-visible,
#liveWorkspaceScreen .iptv-live-header-favorites.active,
#liveWorkspaceScreen .iptv-live-header-favorites[aria-selected="true"] {
  border-color:#20bdff !important;
  box-shadow:0 0 12px rgba(0,166,255,.34),inset 0 0 12px rgba(0,140,255,.12) !important;
  outline:none !important;
}
#liveWorkspaceScreen .iptv-live-header-favorites.active span,
#liveWorkspaceScreen .iptv-live-header-favorites[aria-selected="true"] span {
  color:#ff4d83 !important;
}
#liveWorkspaceScreen .iptv-live-header-divider {
  display:block !important;
  flex:0 0 3px !important;
  width:3px !important;
  height:30px !important;
  border-radius:99px !important;
  background:linear-gradient(180deg,rgba(50,199,255,.25),rgba(50,199,255,.85),rgba(50,199,255,.25)) !important;
  box-shadow:0 0 9px rgba(0,165,255,.28) !important;
}
#liveWorkspaceScreen .iptv-live-icon-btn {
  flex:0 0 38px !important;
  width:38px !important;
  height:38px !important;
  border:1px solid rgba(0,166,255,.22) !important;
  border-radius:10px !important;
  background:rgba(1,13,27,.72) !important;
  color:#eaf8ff !important;
  font-size:22px !important;
}
#liveWorkspaceScreen .iptv-live-icon-btn:hover {
  border-color:#20bdff !important;
  background:rgba(5,29,49,.96) !important;
  filter:drop-shadow(0 0 7px rgba(0,166,255,.25)) !important;
}

/* The workspace now begins below the Movies-matched header and fills the
   remaining viewport; no old floating-header spacer is retained. */
html body #liveWorkspaceScreen:not(.hidden) .iptv-live-layout {
  display:grid !important;
  grid-template-columns:minmax(220px,24%) minmax(0,1fr) !important;
  grid-template-rows:minmax(0,1fr) !important;
  flex:1 1 auto !important;
  width:auto !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  margin:0 clamp(10px,1.4vw,22px) clamp(10px,1.4vw,20px) !important;
  padding:10px !important;
  gap:12px !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  border:1px solid rgba(0,150,255,.22) !important;
  border-radius:20px !important;
  background:linear-gradient(135deg,rgba(1,8,18,.58),rgba(2,13,27,.48)) !important;
  box-shadow:0 12px 34px rgba(0,0,0,.30),inset 0 1px 0 rgba(255,255,255,.055) !important;
  -webkit-backdrop-filter:blur(16px) saturate(120%) !important;
  backdrop-filter:blur(16px) saturate(120%) !important;
}
html body #liveWorkspaceScreen:not(.hidden) .iptv-live-sidebar {
  min-width:0 !important;
  min-height:0 !important;
  padding:4px 10px 4px 4px !important;
  border:0 !important;
  border-right:1px solid rgba(0,150,255,.22) !important;
  border-radius:0 !important;
  background:transparent !important;
}
html body #liveWorkspaceScreen:not(.hidden) .iptv-live-sidebar > .iptv-live-splitbar {
  display:flex !important;
  flex:0 0 40px !important;
  width:100% !important;
  height:40px !important;
  min-height:40px !important;
  margin:0 0 10px !important;
  padding:0 !important;
  overflow:hidden !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
html body #liveWorkspaceScreen:not(.hidden) .iptv-live-sidebar > .iptv-live-splitbar .iptv-live-back-action {
  display:inline-flex !important;
  flex:0 0 auto !important;
  width:auto !important;
  min-width:84px !important;
  height:36px !important;
  min-height:36px !important;
  padding:0 13px !important;
  border:1px solid rgba(0,160,255,.36) !important;
  border-radius:10px !important;
  background:rgba(1,10,20,.70) !important;
  color:#eaf8ff !important;
}
html body #liveWorkspaceScreen:not(.hidden) .iptv-live-account-card {
  flex:0 0 42px !important;
  min-height:42px !important;
  margin:0 0 10px !important;
  border:1px solid rgba(0,150,255,.28) !important;
  border-radius:11px !important;
  background:rgba(2,13,27,.60) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045) !important;
  -webkit-backdrop-filter:blur(10px) !important;
  backdrop-filter:blur(10px) !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList,
html body #liveWorkspaceScreen:not(.hidden) .iptv-category-list {
  border-color:rgba(0,150,255,.22) !important;
  border-radius:12px !important;
  background:rgba(1,8,18,.48) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045) !important;
  -webkit-backdrop-filter:blur(13px) saturate(115%) !important;
  backdrop-filter:blur(13px) saturate(115%) !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList > *,
html body #liveWorkspaceScreen:not(.hidden) .iptv-category-list > * {
  border-color:rgba(0,150,255,.27) !important;
  border-radius:9px !important;
  background:rgba(2,12,24,.68) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04) !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList > *.active,
html body #liveWorkspaceScreen:not(.hidden) #livePanelList > *.selected,
html body #liveWorkspaceScreen:not(.hidden) #livePanelList > *[aria-current="true"],
html body #liveWorkspaceScreen:not(.hidden) .iptv-category-list > *.active,
html body #liveWorkspaceScreen:not(.hidden) .iptv-category-list > *.selected {
  border-color:rgba(0,175,255,.78) !important;
  background:linear-gradient(105deg,rgba(0,86,145,.88),rgba(3,33,58,.94)) !important;
  box-shadow:0 0 12px rgba(0,150,255,.18),inset 0 1px 0 rgba(255,255,255,.10) !important;
}
html body #liveWorkspaceScreen:not(.hidden) .iptv-live-content {
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  background:transparent !important;
}
html body #liveWorkspaceScreen:not(.hidden) #liveBrowsePanel:not(.hidden) {
  padding:8px !important;
  border:1px solid rgba(0,150,255,.18) !important;
  border-radius:13px !important;
  background:rgba(1,8,18,.44) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045) !important;
  -webkit-backdrop-filter:blur(13px) saturate(115%) !important;
  backdrop-filter:blur(13px) saturate(115%) !important;
}
html body #liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card {
  border-color:rgba(0,160,255,.42) !important;
  border-radius:12px !important;
  background:linear-gradient(145deg,rgba(5,20,36,.82),rgba(1,8,18,.86)) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055),0 3px 12px rgba(0,0,0,.20) !important;
  -webkit-backdrop-filter:blur(12px) saturate(115%) !important;
  backdrop-filter:blur(12px) saturate(115%) !important;
}
html body #liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card:hover,
html body #liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card:focus,
html body #liveWorkspaceScreen:not(.hidden) #liveChannelGrid > .iptv-channel-card:focus-within {
  border-color:rgba(80,195,255,.88) !important;
  background:linear-gradient(145deg,rgba(5,31,54,.92),rgba(2,12,25,.92)) !important;
  box-shadow:0 0 14px rgba(0,150,255,.16),inset 0 1px 0 rgba(255,255,255,.08) !important;
}

/* Laptop/tablet and phone sizing: preserve the same three-part header. */
@media (max-width:1100px) {
  html body #liveWorkspaceScreen:not(.hidden) .iptv-live-layout {
    grid-template-columns:minmax(190px,27%) minmax(0,1fr) !important;
  }
  #liveWorkspaceScreen .iptv-live-header-search {
    flex-basis:clamp(155px,20vw,250px) !important;
    width:clamp(155px,20vw,250px) !important;
  }
}
@media (max-width:760px) {
  html body #liveWorkspaceScreen:not(.hidden) .iptv-live-premium-header {
    flex-basis:62px !important;
    height:62px !important;
    min-height:62px !important;
    grid-template-columns:minmax(78px,.8fr) auto minmax(0,1.4fr) !important;
    gap:5px !important;
    padding:4px 8px !important;
  }
  #liveWorkspaceScreen .iptv365-live-brand-word {font-size:15px !important;letter-spacing:-.8px !important;}
  #liveWorkspaceScreen .iptv365-live-brand-play {width:39px !important;height:31px !important;margin-left:3px !important;padding-right:7px !important;}
  #liveWorkspaceScreen .iptv365-live-brand-play b {font-size:14px !important;transform:translateX(-4px) !important;}
  #liveWorkspaceScreen .iptv-live-centered-title .iptv-live-heading {font-size:17px !important;letter-spacing:-.5px !important;}
  html body #liveWorkspaceScreen:not(.hidden) .iptv-live-header-right {gap:4px !important;}
  #liveWorkspaceScreen .iptv-live-header-search {
    flex:1 1 100px !important;
    width:100% !important;
    min-width:0 !important;
    height:34px !important;
    padding:0 7px !important;
  }
  html body #liveWorkspaceScreen:not(.hidden) .iptv-live-header-search #livePanelSearch {
    font-size:10px !important;
    padding-right:21px !important;
    background-size:15px 15px !important;
  }
  #liveWorkspaceScreen .iptv-live-header-favorites {
    flex-basis:34px !important;
    width:34px !important;
    height:34px !important;
    min-height:34px !important;
    border-radius:9px !important;
  }
  #liveWorkspaceScreen .iptv-live-header-favorites span {font-size:23px !important;}
  #liveWorkspaceScreen .iptv-live-header-divider {display:none !important;}
  #liveWorkspaceScreen .iptv-live-icon-btn {
    flex-basis:29px !important;
    width:29px !important;
    height:31px !important;
    font-size:17px !important;
  }
  html body #liveWorkspaceScreen:not(.hidden) .iptv-live-layout {
    grid-template-columns:minmax(118px,31%) minmax(0,1fr) !important;
    margin:0 6px 6px !important;
    padding:6px !important;
    gap:6px !important;
    border-radius:13px !important;
  }
  html body #liveWorkspaceScreen:not(.hidden) .iptv-live-sidebar {padding:2px 5px 2px 2px !important;}
  html body #liveWorkspaceScreen:not(.hidden) .iptv-live-account-card {display:none !important;}
  html body #liveWorkspaceScreen:not(.hidden) #liveChannelGrid {grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}
@media (max-width:420px) {
  #liveWorkspaceScreen .iptv365-live-brand-word {font-size:13px !important;}
  #liveWorkspaceScreen .iptv365-live-brand-play {width:32px !important;height:27px !important;}
  #liveWorkspaceScreen .iptv-live-centered-title .iptv-live-heading {font-size:15px !important;}
  #liveWorkspaceScreen .iptv-live-icon-btn {display:none !important;}
  html body #liveWorkspaceScreen:not(.hidden) #liveChannelGrid {grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}

/* ================================================================
   IPTV365 FINAL REFERENCE-BASED LIVE TV REFINEMENT
   Header is intentionally excluded from all overrides below.
   Only Live TV sidebar, toolbar, grid canvas and background are affected.
   ================================================================ */

html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) {
  background:
    linear-gradient(180deg, rgba(1,8,14,.22), rgba(1,8,14,.32)),
    var(--iptv365-global-bg) center center / cover no-repeat !important;
  background-color:#02080d !important;
}

/* Keep the existing header untouched; content below it uses the full viewport. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-layout {
  grid-template-columns:minmax(250px,26%) minmax(0,1fr) !important;
  grid-template-rows:minmax(0,1fr) !important;
  flex:1 1 auto !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  margin:0 !important;
  padding:12px !important;
  gap:12px !important;
  border:0 !important;
  border-radius:0 !important;
  background:rgba(1,8,15,.24) !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

/* Reference 2: Back + category search in one compact sidebar row. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-sidebar {
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:4px 10px 4px 4px !important;
  border-right:1px solid rgba(0,165,220,.28) !important;
  background:rgba(2,8,14,.34) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-splitbar {
  display:grid !important;
  grid-template-columns:minmax(82px,.72fr) minmax(0,1.28fr) !important;
  align-items:center !important;
  gap:9px !important;
  flex:0 0 44px !important;
  min-height:44px !important;
  margin:0 0 12px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-back-action {
  min-width:0 !important;
  width:100% !important;
  height:40px !important;
  min-height:40px !important;
  padding:0 12px !important;
  border:1px solid rgba(0,158,211,.48) !important;
  border-radius:11px !important;
  background:rgba(3,12,20,.82) !important;
  color:#f3fbff !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-search-action {
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  min-width:0 !important;
  width:100% !important;
  height:40px !important;
  padding:0 11px !important;
  border:1px solid rgba(0,158,211,.48) !important;
  border-radius:11px !important;
  background:rgba(3,12,20,.82) !important;
  color:#dff7ff !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-search-icon {
  flex:0 0 auto !important;
  font-size:21px !important;
  line-height:1 !important;
  color:#c7f0ff !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveCategorySearchInline {
  flex:1 1 auto !important;
  width:100% !important;
  min-width:0 !important;
  height:100% !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  outline:0 !important;
  background:transparent !important;
  color:#fff !important;
  box-shadow:none !important;
  font-size:12px !important;
  font-weight:650 !important;
}
#liveCategorySearchInline::placeholder {color:rgba(220,239,248,.68) !important;opacity:1 !important}

/* Reference 2 category list: clean text rows, no decorative prefix glyphs. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-list {
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  padding:3px 2px 5px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:6px !important;
  border:1px solid rgba(0,155,205,.18) !important;
  border-radius:12px !important;
  background:rgba(1,7,13,.43) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  min-height:42px !important;
  width:100% !important;
  padding:8px 12px !important;
  gap:8px !important;
  border:1px solid rgba(95,115,128,.30) !important;
  border-radius:11px !important;
  background:linear-gradient(100deg,rgba(12,14,19,.88),rgba(5,10,15,.90)) !important;
  color:#f4f7fa !important;
  text-align:left !important;
  font-size:13px !important;
  font-weight:750 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035) !important;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease !important;
}
#liveWorkspaceScreen .iptv365-category-icon,
#liveWorkspaceScreen .iptv365-category-flag {
  display:none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row .iptv365-category-label {
  flex:1 1 auto !important;
  min-width:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row .iptv-category-count {
  margin-left:auto !important;
  flex:0 0 auto !important;
  min-width:22px !important;
  padding:2px 7px !important;
  border:1px solid rgba(165,183,193,.36) !important;
  border-radius:20px !important;
  background:rgba(180,205,218,.08) !important;
  color:#b8cbd4 !important;
  font-size:10px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row:hover,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row:focus-visible {
  border-color:rgba(0,184,224,.76) !important;
  background:linear-gradient(100deg,rgba(3,46,59,.92),rgba(5,18,25,.96)) !important;
  box-shadow:0 0 10px rgba(0,181,225,.16) !important;
  outline:none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row.active,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row[aria-pressed="true"] {
  border-color:#c79b37 !important;
  background:linear-gradient(100deg,rgba(55,22,34,.96),rgba(20,12,18,.98)) !important;
  box-shadow:0 0 10px rgba(190,139,40,.16),inset 0 1px 0 rgba(255,255,255,.06) !important;
  color:#fff !important;
}

/* Reference 2 content toolbar. It is intentionally visible and uses existing JS handlers. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #iptvLiveChannelToolbar {
  display:flex !important;
  visibility:visible !important;
  flex:0 0 52px !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  width:100% !important;
  min-width:0 !important;
  min-height:52px !important;
  height:52px !important;
  margin:0 0 10px !important;
  padding:5px 8px !important;
  border:1px solid rgba(0,157,205,.22) !important;
  border-radius:12px !important;
  background:rgba(2,9,15,.72) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045) !important;
}
#liveWorkspaceScreen .iptv-live-tabs,
#liveWorkspaceScreen .iptv-live-toolbar-actions {
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  min-width:0 !important;
}
#liveWorkspaceScreen .iptv-live-tab {
  height:39px !important;
  min-height:39px !important;
  padding:0 13px !important;
  border:1px solid rgba(151,169,181,.25) !important;
  border-radius:10px !important;
  background:rgba(8,13,18,.92) !important;
  color:#eaf3f7 !important;
  font-size:12px !important;
  font-weight:750 !important;
  box-shadow:none !important;
}
#liveWorkspaceScreen .iptv-live-tab.active,
#liveWorkspaceScreen .iptv-live-tab[aria-selected="true"] {
  border-color:#c69a37 !important;
  background:linear-gradient(110deg,rgba(58,25,37,.96),rgba(23,14,20,.98)) !important;
  box-shadow:0 0 9px rgba(190,143,50,.12) !important;
  color:#fff !important;
}
#liveWorkspaceScreen .iptv-live-sort-wrap {
  height:39px !important;
  border-color:rgba(151,169,181,.28) !important;
  border-radius:10px !important;
  background:rgba(8,13,18,.92) !important;
}
#liveWorkspaceScreen .iptv-live-view-toggle {
  border-color:rgba(151,169,181,.28) !important;
  border-radius:10px !important;
  background:rgba(8,13,18,.92) !important;
}
#liveWorkspaceScreen .iptv-live-view-toggle button.active {
  background:linear-gradient(135deg,#075b83,#06354e) !important;
  box-shadow:0 0 9px rgba(0,165,220,.22) !important;
}

/* Grid keeps the established blue/cyan card style from Reference 1. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-content {
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  background:transparent !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveBrowsePanel:not(.hidden) {
  flex:1 1 auto !important;
  min-height:0 !important;
  padding:8px !important;
  border:1px solid rgba(0,153,204,.20) !important;
  border-radius:13px !important;
  background:rgba(1,8,15,.48) !important;
  overflow:hidden !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card {
  border:1px solid rgba(0,164,220,.38) !important;
  border-radius:14px !important;
  background:linear-gradient(145deg,rgba(7,19,29,.90),rgba(2,9,15,.92)) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055),0 3px 12px rgba(0,0,0,.18) !important;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card:hover,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card:focus-visible,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card.active,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card[aria-pressed="true"] {
  border-color:#20c8ff !important;
  background:linear-gradient(145deg,rgba(5,30,45,.96),rgba(2,12,21,.97)) !important;
  box-shadow:0 0 0 1px rgba(32,200,255,.28),0 0 16px rgba(0,171,230,.42),inset 0 0 15px rgba(0,171,230,.10) !important;
  transform:translateY(-2px) !important;
  outline:none !important;
}

/* Desktop 5-column reference grid; smaller screens adapt without clipping. */
@media (min-width:1101px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid.has-channel-cards:not(.live-list-mode) {
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  }
}
@media (max-width:900px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #iptvLiveChannelToolbar {
    flex-wrap:wrap !important;
    flex-basis:auto !important;
    height:auto !important;
    min-height:52px !important;
  }
  #liveWorkspaceScreen .iptv-live-tabs {overflow-x:auto !important;max-width:100% !important}
  #liveWorkspaceScreen .iptv-live-tab {flex:0 0 auto !important}
}
@media (max-width:760px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-layout {
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:minmax(150px,34%) minmax(0,1fr) !important;
    padding:7px !important;
    gap:7px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-sidebar {
    border-right:0 !important;
    border-bottom:1px solid rgba(0,155,205,.25) !important;
    padding:2px 4px 7px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-splitbar {
    grid-template-columns:minmax(78px,.7fr) minmax(0,1.3fr) !important;
    margin-bottom:7px !important;
  }
}

/* ================================================================
   LIVE TV â€” PREMIUM GLASS CHANNEL CARDS + ADAPTIVE HEADER SEARCH
   Scoped strictly to Live TV. Existing header geometry is unchanged.
   ================================================================ */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid.has-channel-cards:not(.live-list-mode) {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  grid-auto-rows: 166px !important;
  align-content: start !important;
  align-items: stretch !important;
  gap: 12px !important;
  padding: 4px 6px 12px !important;
  overflow: auto !important;
}

html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 166px !important;
  padding: 12px 12px 11px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  border: 1px solid rgba(190, 215, 232, .18) !important;
  border-radius: 15px !important;
  background: linear-gradient(145deg, rgba(32, 48, 62, .42), rgba(7, 15, 24, .56)) !important;
  -webkit-backdrop-filter: blur(12px) saturate(125%) !important;
  backdrop-filter: blur(12px) saturate(125%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 4px 12px rgba(0,0,0,.16) !important;
  transform: none !important;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease !important;
}

html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo {
  flex: 0 0 78px !important;
  width: 100% !important;
  height: 78px !important;
  min-height: 78px !important;
  border-radius: 10px !important;
  background: rgba(0, 0, 0, .28) !important;
  overflow: hidden !important;
}

html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo img {
  max-width: 90% !important;
  max-height: 68px !important;
  object-fit: contain !important;
}

html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card .iptv-channel-label {
  display: -webkit-box !important;
  width: 100% !important;
  min-height: 32px !important;
  max-height: 34px !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  overflow-wrap: anywhere !important;
  text-align: center !important;
  font-size: clamp(11px, .88vw, 13px) !important;
  line-height: 1.25 !important;
  font-weight: 750 !important;
}

html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card .iptv-channel-fav {
  top: 8px !important;
  right: 9px !important;
  z-index: 3 !important;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.8));
}

/* The glass surface is quiet until a pointer, keyboard focus, remote focus,
   or selected-channel state calls attention to one card. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card:hover,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card:focus-visible,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card.active,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card[aria-pressed="true"] {
  border-color: rgba(88, 213, 255, .95) !important;
  background: linear-gradient(145deg, rgba(37, 69, 88, .68), rgba(13, 25, 39, .78)) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.28),
    0 0 12px rgba(35,190,255,.38),
    0 0 20px rgba(231,105,207,.16),
    inset 0 0 16px rgba(255,255,255,.09) !important;
  transform: translateY(-2px) !important;
  outline: none !important;
}

html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid.live-list-mode > .iptv-channel-card {
  height: auto !important;
  min-height: 66px !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
}

@media (max-width: 1200px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid.has-channel-cards:not(.live-list-mode) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 900px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid.has-channel-cards:not(.live-list-mode) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: 158px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card {
    height: 158px !important;
  }
}
@media (max-width: 600px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid.has-channel-cards:not(.live-list-mode) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: 150px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid > .iptv-channel-card {
    height: 150px !important;
    padding: 10px !important;
  }
}

/* Keep the sidebar category search independent from the adaptive header search. */
#liveWorkspaceScreen #liveCategorySearchInline {
  /* Sidebar field continues to search categories at all times. */
}
/* ===== IPTV365 Step 1 (user spec): Live TV sidebar + background aligned
   to the Movies/Series design system. CSS-only — no markup, JS or API
   behaviour changes. All values below are the exact Movies sidebar
   values (media-visual-fix.css): photo background, panel gradient,
   list spacing, category card dimensions/typography, hover/focus and
   the gold selected state. Selectors mirror the strongest existing
   live selectors (html body + screen IDs) so they take effect. ===== */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) {
  background-color:#020812 !important;
  background-image:var(--iptv365-global-bg) !important;
  background-position:center center !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-layout { background:transparent !important; }
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-content { background:transparent !important; }
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-sidebar {
  background:linear-gradient(180deg,rgba(1,8,17,.72),rgba(1,13,25,.82)) !important;
  border-right:0 !important;
  padding-right:clamp(8px,.9vw,15px) !important;
  padding-left:0 !important;
}
@media (min-width:901px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-layout { grid-template-columns:minmax(250px,22.5vw) minmax(0,1fr) !important; }
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-search-action {
  height:44px !important;
  border:1px solid rgba(0,157,255,.5) !important;
  border-radius:12px !important;
  background:rgba(2,13,27,.92) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-search-action input::placeholder { color:rgba(255,255,255,.72) !important; }
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList { gap:7px !important; padding:0 5px 12px !important; }
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-row {
  min-height:clamp(43px,5.7vh,58px) !important;
  padding:7px clamp(10px,1.15vw,19px) !important;
  border:1px solid rgba(0,126,205,.13) !important;
  border-radius:12px !important;
  background:linear-gradient(105deg,rgba(3,19,34,.92),rgba(1,10,21,.9)) !important;
  color:#f8fbff !important;
  font-size:clamp(12px,.98vw,17px) !important;
  font-weight:650 !important;
  gap:clamp(10px,1vw,17px) !important;
  box-shadow:none !important;
  text-align:left !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-row .iptv365-category-icon {
  display:grid !important; place-items:center; width:30px; flex:0 0 30px;
  font-size:clamp(17px,1.55vw,26px) !important; line-height:1;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-row:hover,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-row:focus-visible {
  border-color:rgba(0,174,255,.72) !important;
  background:rgba(0,55,94,.68) !important;
  outline:none;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-row.active,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-row[aria-pressed="true"] {
  border:1px solid #ffd72e !important;
  background:linear-gradient(100deg,#ffdf32,#ffb900 72%,#ff8b00) !important;
  color:#050b13 !important;
  box-shadow:0 0 10px rgba(255,208,0,.75),0 0 26px rgba(255,196,0,.4),inset 0 0 12px rgba(255,255,255,.28) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-row.active .iptv365-category-icon,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-row[aria-pressed="true"] .iptv365-category-icon { color:#050b13; }
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-count {
  margin-left:auto !important; flex:0 0 auto; padding:3px 8px !important;
  border:1px solid rgba(255,255,255,.28) !important; border-radius:999px !important;
  background:rgba(255,255,255,.08) !important; color:#eaf6ff !important;
  font-size:11px !important; font-weight:800; line-height:1; white-space:nowrap;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-count:empty { display:none !important; }

/* ===== Step 1 follow-up (user-approved from preview): the Live channel
   toolbar row (All Channels / Favourites / Recently Watched tabs, Sort
   select, grid/list toggle) is hidden; the channel grid moves up under
   the header. CSS-only — markup and JS stay in place, so the feature
   can be restored by removing this one rule. Favourites remain
   reachable from the header heart button. ===== */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #iptvLiveChannelToolbar { display:none !important; }

/* ===== Change #14 (user-approved): the user's 365 PLAYER badge (transparent
   assets/player365-badge.png) replaces the old logo in the Live TV header
   brand. (Change #36 supersedes the missing-logo fallback half of this
   block: the fallback is now the new neon logo <img>, centered, never
   stretched — the old badge background is gone.) ===== */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv365-live-brand-logo {
  width:167px !important; height:56px !important;
  background:url("assets/player365-fallback-logo.png") center / contain no-repeat !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv365-live-brand-logo > span { display:none !important; }
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-logo-fallback {
  display:grid !important; place-items:center !important; width:100% !important; height:100% !important; min-height:40px;
  font-size:0 !important;
  background:none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-logo-fallback img {
  max-width:86% !important; max-height:70px !important; object-fit:contain !important;
}

/* ===== Change #17/#18 (user report): (1) the channel grid's first row could
   slide up under the Live header — give the grid a guaranteed top
   clearance inside its own scroll box so the first row always starts
   fully below the header; (2) channel logos in grid mode balanced to a
   consistent 60px (real logos and the badge fallback alike) instead of
   filling the whole 76px logo area. Grid mode only; list view, header,
   sidebar and everything else untouched. ===== */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) {
  padding-top:52px !important;
  scroll-padding-top:52px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) .iptv-channel-logo img {
  max-height:60px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) .iptv-logo-fallback img {
  max-height:60px !important;
}

/* ===== Change #19 (user spec): Live channel grid — (1) the grid box
   itself moves down (margin-top cannot be scrolled or clipped away)
   with inner top padding + scroll-padding, so the first row is always
   fully visible below the header; (2) channel cards become premium
   transparent WHITE GLASS by default (soft white border, top highlight,
   NO permanent neon), with a cyan neon glow only on hover / keyboard
   focus / TV-remote focus / the active channel. Grid mode only; card
   sizes, header, list view and all functionality untouched. ===== */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) {
  margin-top:18px !important;
  padding-top:34px !important;
  scroll-padding-top:34px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) .iptv-channel-card {
  background:linear-gradient(150deg,rgba(255,255,255,.15),rgba(255,255,255,.055) 55%,rgba(255,255,255,.03)) !important;
  border:1px solid rgba(255,255,255,.30) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 6px 18px rgba(0,0,0,.28) !important;
  -webkit-backdrop-filter:blur(6px) saturate(135%) !important;
  backdrop-filter:blur(6px) saturate(135%) !important;
  transition:background .25s ease,border-color .25s ease,box-shadow .25s ease,transform .18s ease !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) .iptv-channel-card:hover,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) .iptv-channel-card:focus,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) .iptv-channel-card:focus-visible,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) .iptv-channel-card.active {
  background:linear-gradient(150deg,rgba(130,215,255,.20),rgba(255,255,255,.07) 55%,rgba(0,150,255,.06)) !important;
  border:1px solid rgba(0,195,255,.85) !important;
  border-color:rgba(0,195,255,.85) !important;
  box-shadow:0 0 0 1px rgba(0,195,255,.35),0 0 18px rgba(0,170,255,.45),0 0 36px rgba(0,110,255,.22),inset 0 0 18px rgba(0,150,255,.10) !important;
}

/* ===== Change #21 (user-approved from the Phase 1 reference): Live TV
   alignment — make the grid's top clearance actually apply, and protect
   the category list's first row. ROOT CAUSE (Phase 1 report): the #17 /
   #18 / #19 padding rules lost the cascade to the pre-existing
   `#liveChannelGrid.has-channel-cards` rule (specificity 2,4,2 with
   `padding:4px 6px 12px`), which applies whenever channels render
   (app.js adds .has-channel-cards). These selectors include
   .has-channel-cards, tie that rule's specificity, and win by coming
   later in this file — so the intended 34px top padding + scroll
   padding finally take effect. The #livePanelList rule adds scroll
   protection for the first category row. Header height/design, card
   sizes, columns, glass effects, list view, Movies/Series untouched. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid.has-channel-cards:not(.live-list-mode),
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) {
  padding-top:34px !important;
  scroll-padding-top:34px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList {
  scroll-padding-top:12px !important;
}

/* ===== Change #22 (user-approved from the reference player view):
   Live TV playing-state layout — 3 columns (channel list | player |
   channel/programme panel), stage overlay chrome, action buttons, and
   gold playing row. Playing-state only: every rule is scoped under
   #liveWorkspaceScreen/#livePlaybackPanel, so the category grid, list
   view, Movies and Series are untouched. The old bottom "UPCOMING
   FIXTURES" section is hidden: its rows were hardcoded placeholder
   text, not programme data, and the honest programme panel now lives
   on the right. Programme boxes are never filled with invented data. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-player-top {
  display:flex !important;
  gap:14px !important;
  align-items:stretch !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .right-player-panel {
  flex:1 1 auto !important;
  min-width:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .player-stage {
  position:relative !important;
  aspect-ratio:16 / 9 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .player-stage video {
  width:100% !important;
  height:100% !important;
  display:block !important;
  background:#000 !important;
}
/* Stage overlay chrome: visible only while the player panel is shown,
   and never intercepting clicks on the native video controls. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-stage-live,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-stage-chip {
  position:absolute !important;
  z-index:3 !important;
  pointer-events:none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-stage-live {
  top:12px !important;
  left:12px !important;
  background:#e11d48 !important;
  color:#fff !important;
  border-radius:7px !important;
  padding:5px 11px !important;
  font-size:12.5px !important;
  font-weight:900 !important;
  letter-spacing:1px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-stage-chip {
  top:12px !important;
  right:12px !important;
  max-width:55% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  background:rgba(0,0,0,.62) !important;
  border:1px solid rgba(255,255,255,.3) !important;
  border-radius:999px !important;
  padding:6px 13px !important;
  color:#fff !important;
  font-size:12.5px !important;
  font-weight:800 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel.hidden .iptv365-stage-live,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel.hidden .iptv365-stage-chip {
  display:none !important;
}
/* Right-side channel / programme panel. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-info-panel {
  flex:0 0 330px !important;
  width:330px !important;
  min-width:0 !important;
  overflow-y:auto !important;
  border:1px solid rgba(255,211,77,.45) !important;
  border-radius:16px !important;
  background:linear-gradient(170deg,rgba(255,255,255,.07),rgba(255,255,255,.02)) !important;
  padding:14px !important;
  box-shadow:0 0 24px rgba(0,0,0,.5) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-channel-card {
  display:flex !important;
  gap:12px !important;
  align-items:center !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-logo {
  flex:0 0 auto !important;
  width:58px !important;
  height:58px !important;
  display:grid !important;
  place-items:center !important;
  overflow:hidden !important;
  border:1px solid rgba(255,211,77,.6) !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.07) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-logo img {
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  display:block !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-logo-fallback {
  color:#fff !important;
  font-size:16px !important;
  font-weight:900 !important;
  letter-spacing:.5px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-channel-meta {
  flex:1 1 auto !important;
  min-width:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-channel-meta h2 {
  margin:0 !important;
  color:#fff !important;
  font-size:18px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  overflow-wrap:anywhere !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-channel-meta p {
  margin:4px 0 0 !important;
  color:#aeb8d8 !important;
  font-size:12.5px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-live {
  flex:0 0 auto !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  color:#fff !important;
  font-size:11.5px !important;
  font-weight:900 !important;
  letter-spacing:.5px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-live-dot {
  width:9px !important;
  height:9px !important;
  border-radius:50% !important;
  background:#e11d48 !important;
  box-shadow:0 0 8px #e11d48 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-divider {
  height:1px !important;
  margin:13px 0 !important;
  background:rgba(255,255,255,.14) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-box {
  border:1px solid rgba(255,211,77,.4) !important;
  border-radius:13px !important;
  overflow:hidden !important;
  margin-bottom:12px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-box:last-child {
  margin-bottom:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-box h3 {
  margin:0 !important;
  padding:9px 12px !important;
  background:rgba(255,211,77,.09) !important;
  border-bottom:1px solid rgba(255,211,77,.25) !important;
  color:#ffd34d !important;
  font-size:13.5px !important;
  font-weight:900 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-empty {
  margin:0 !important;
  padding:11px 12px !important;
  color:#a7b1cf !important;
  font-size:13px !important;
  line-height:1.5 !important;
}
/* Action buttons row under the player. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-actions {
  display:flex !important;
  gap:12px !important;
  margin-top:14px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-action {
  flex:1 1 0 !important;
  min-width:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  padding:12px 6px !important;
  border:1px solid rgba(255,211,77,.55) !important;
  border-radius:999px !important;
  background:rgba(0,0,0,.35) !important;
  color:#fff !important;
  font-size:13.5px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
  cursor:pointer !important;
  transition:border-color .2s, box-shadow .2s, background .2s !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-action:hover,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-action:focus-visible {
  border-color:#ffd34d !important;
  box-shadow:0 0 16px rgba(255,211,77,.35) !important;
  outline:none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-action.is-fav,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-action.is-locked {
  background:linear-gradient(100deg,#ffd34d,#ff9d00) !important;
  border-color:#ffd34d !important;
  color:#1a1200 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-action.is-on {
  border-color:rgba(22,217,255,.7) !important;
}
/* EPG toggle: hide the right panel, player takes the full width. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel.iptv365-epg-collapsed .iptv365-live-info-panel {
  display:none !important;
}
/* The bottom fixtures section is superseded by the right panel. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .epg-panel {
  display:none !important;
}
/* Playing row: gold. Specificity note (same lesson as Change #21): the
   blue active-row rule above uses TWO ids (#liveWorkspaceScreen +
   #livePanelList), so this override must include #livePanelList too —
   otherwise the blue gradient wins despite this block coming later. */
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel.active {
  background:linear-gradient(100deg,#ffd34d,#ff9d00) !important;
  border-color:#ffd34d !important;
  box-shadow:0 0 18px rgba(255,211,77,.4), inset 3px 0 0 #ff9d00 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel.active .iptv-sidebar-channel-number,
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel.active .iptv-sidebar-channel-name {
  color:#1a1200 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-sidebar .iptv-sidebar-channel.is-locked .iptv-sidebar-channel-name::after {
  content:' 🔒' !important;
}
/* Narrow screens: stack the programme panel under the player. */
@media (max-width:1100px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-player-top {
    flex-direction:column !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-info-panel {
    flex:1 1 auto !important;
    width:100% !important;
    overflow-y:visible !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-actions {
    flex-wrap:wrap !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-action {
    flex:1 1 30% !important;
  }
}

/* Change #22 (continued): playing-state channel rows — number + logo +
   name. A leftover "text-only sidebar" rule in style.css hides sidebar
   logos with visibility:hidden !important and width/height 0, and the
   later reference-style block never restores visibility, so logos
   stayed invisible. These rules (two ids, like the gold active-row
   override above) define the complete row geometry and restore logo
   visibility. Category buttons (.list-item-btn) are unaffected. */
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel {
  display:grid !important;
  grid-template-columns:34px 58px minmax(0,1fr) !important;
  column-gap:12px !important;
  align-items:center !important;
  min-height:64px !important;
  padding:8px 12px !important;
  text-align:left !important;
}
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-number {
  display:block !important;
  color:#dce7f5 !important;
  font-size:16px !important;
  font-weight:800 !important;
  line-height:1 !important;
  text-align:center !important;
  font-variant-numeric:tabular-nums !important;
}
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-logo {
  display:flex !important;
  visibility:visible !important;
  width:58px !important;
  height:48px !important;
  flex:none !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  border-radius:6px !important;
  background:rgba(255,255,255,.08) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-logo img {
  display:block !important;
  visibility:visible !important;
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
}
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-logo-fallback {
  display:flex !important;
  visibility:visible !important;
  width:100% !important;
  height:100% !important;
  align-items:center !important;
  justify-content:center !important;
  color:#fff !important;
  font-size:15px !important;
  font-weight:900 !important;
  letter-spacing:.5px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-name {
  display:block !important;
  width:auto !important;
  min-width:0 !important;
  color:#f5f8ff !important;
  font-size:15px !important;
  font-weight:800 !important;
  line-height:1.25 !important;
  letter-spacing:.15px !important;
  text-transform:uppercase !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}
@media (max-width:600px) {
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel {
    grid-template-columns:26px 44px minmax(0,1fr) !important;
    column-gap:9px !important;
    min-height:56px !important;
    padding:7px 9px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-logo {
    width:44px !important;
    height:38px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-number {
    font-size:14px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-name {
    font-size:13px !important;
  }
}

/* Change #22 (continued): on wide screens the player fills the available
   height instead of leaving dead space under the stage (the hidden
   fixtures section used to occupy it). Narrow screens keep 16:9. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel {
  display:flex !important;
  flex-direction:column !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-player-top {
  flex:1 1 auto !important;
  min-height:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .right-player-panel {
  display:flex !important;
  flex-direction:column !important;
  min-height:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .player-stage {
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:auto !important;
}
@media (max-width:1100px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-player-top {
    flex:none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .player-stage {
    flex:none !important;
    max-height:62vh !important;
    aspect-ratio:16 / 9 !important;
  }
}

/* ===== Change #23 (user-approved Variant 2 + full-screen player spec):
   the playing view is re-laid-out: the stage goes back to a contained
   16:9 player box (no more full-height stretch), the right side holds
   only the channel card + action icons, and the EPG moves BELOW the
   playback as three horizontal cards. The EPG toggle now collapses the
   strip instead of the channel card. Live category rows show the
   provider-country flag in the icon slot. Every rule is scoped under
   #liveWorkspaceScreen/#livePlaybackPanel (or #livePanelList for the
   flags), so the grid, Movies and Series are untouched. This block is
   appended last so it wins ties against the Change #22 rules above;
   the narrow-screen rules are re-asserted here for the same reason. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-player-top {
  flex:none !important;
  align-items:flex-start !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .player-stage {
  flex:none !important;
  width:100% !important;
  aspect-ratio:16 / 9 !important;
  max-height:none !important;
  border:2px solid #ffd34d !important;
  box-shadow:0 0 30px rgba(255,211,77,.22) !important;
}
/* Right side: channel card + action icons only. Wider than Change #22
   so the channel title and logo have room (Variant 2). */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-info-panel {
  flex:0 0 400px !important;
  width:400px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-logo {
  width:92px !important;
  height:92px !important;
  border-radius:14px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-logo-fallback {
  font-size:22px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-channel-meta h2 {
  font-size:20px !important;
}
/* Action buttons inside the channel card: icon grid (Variant 2). */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-info-panel .iptv365-player-actions {
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:8px !important;
  margin-top:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-info-panel .iptv365-player-action {
  flex-direction:column !important;
  gap:5px !important;
  padding:11px 2px 9px !important;
  border-radius:13px !important;
  font-size:11px !important;
  line-height:1.2 !important;
  white-space:normal !important;
  text-align:center !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-info-panel .iptv365-player-action > span:first-child {
  font-size:19px !important;
  line-height:1 !important;
}
/* EPG toggle: the channel card stays; the strip below the player hides. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel.iptv365-epg-collapsed .iptv365-live-info-panel {
  display:block !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel.iptv365-epg-collapsed .iptv365-epg-strip {
  display:none !important;
}
/* EPG strip below the playback: three horizontal cards (Variant 2).
   The .iptv365-epg-box / h3 / .iptv365-epg-empty rules from Change #22
   still style the cards; only the strip layout is new. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-strip {
  margin-top:14px !important;
  min-width:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-strip-head {
  display:flex !important;
  align-items:baseline !important;
  gap:10px !important;
  margin-bottom:10px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-strip-head h2 {
  margin:0 !important;
  color:#ffd34d !important;
  font-size:16px !important;
  font-weight:900 !important;
  letter-spacing:.3px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-strip-channel {
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  color:#aeb8d8 !important;
  font-size:12.5px !important;
  font-weight:700 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-strip-cards {
  display:grid !important;
  grid-template-columns:1.15fr 1fr 1fr !important;
  gap:10px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-strip .iptv365-epg-box {
  margin-bottom:0 !important;
}
/* Category flags (spec section 1): the flag span was display:none in
   Live; show it with the same geometry as the Step 1 category icon it
   replaces. Two ids beat the older one-id hide rule. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePanelList .iptv-category-row .iptv365-category-flag {
  display:grid !important;
  place-items:center !important;
  width:30px !important;
  flex:0 0 30px !important;
  font-size:clamp(17px,1.55vw,26px) !important;
  line-height:1 !important;
}
/* Narrow screens: keep the Change #22 stacking (panel under the player,
   62vh stage cap) and stack the EPG cards on small phones. Re-asserted
   here because this block comes after the Change #22 media queries. */
@media (max-width:1100px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-player-top {
    flex-direction:column !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-info-panel {
    flex:1 1 auto !important;
    width:100% !important;
    overflow-y:visible !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .player-stage {
    max-height:62vh !important;
  }
}
@media (max-width:600px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-strip-cards {
    grid-template-columns:1fr !important;
  }
}

/* ===== Change #24 (user spec — two visual changes only):
   (1) The video stage loses its 2px gold border and takes the exact
   Movies premium-glass border + shadow (Change #2 values from
   media-visual-fix.css: 1px rgba(255,255,255,.16), inset white
   highlight, soft drop shadow). No hover/neon state: the stage stays
   calm. Size, position and layout are untouched — same selector as
   the Change #23 stage rule, later in the file, so only the border
   and shadow change. (Note: the Series card border differs slightly
   — 1px rgba(164,205,230,.62) — so the subtler Movies glass values
   are used, matching the "extremely thin, delicate" requirement.)
   (2) The right-side channel information panel background becomes
   solid pure black (#000000) so the logo and text stand out. Only
   the background changes: border, radius, padding, shadow, logo,
   LIVE badge, channel name and buttons are untouched. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .player-stage {
  border:1px solid rgba(255,255,255,.16) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 0 0 0 1px rgba(255,255,255,.03),0 10px 26px rgba(0,0,0,.5) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-live-info-panel {
  background:#000000 !important;
}

/* ===== Change #25 (user spec — spacing & alignment hardening only):
   Investigation note: the live files were verified byte-identical to
   the delivered Change #24 files, and the layout renders correctly
   (splitbar visible, clear header gap) in every state and viewport
   tested, so the cramped state in the user's 03:39 screenshot could
   not be reproduced from the code — it was most likely a transient
   browser state. This block makes the intended spacing explicit and
   immune to rule-order accidents, without changing any component
   size, theme, or functionality:
   (1) The layout gains an explicit 12px top margin, so a clear gap
   below the header is guaranteed instead of incidental. The shift
   applies uniformly to both columns, preserving the Change #21
   first-row alignment.
   (2) The sidebar top padding (4px) is removed and the splitbar's
   bottom margin grows by the same 4px (12px -> 16px), so the
   splitbar's top edge aligns exactly with the video stage and
   channel panel tops, while the first list row stays at exactly the
   same height as before (Change #21 alignment preserved).
   (3) The layout column gap becomes 14px, matching the player-top
   gap and the EPG gap, so all inter-section gaps are consistent.
   (4) The splitbar's fixed 44px height is restated here (same
   selector, later in the file) so it can never collapse or shrink.
   No yellow border is reintroduced; the Change #24 glass border
   and black panel are untouched. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-layout {
  margin-top:12px !important;
  gap:14px !important;
  /* Revision (2026-11-12, after the user's 03:48 screenshots showed a ~58px
     upward shift no code path can produce): neutralize any positional
     interference from outside the app's own stylesheets. Both are no-ops
     for the app's own layout (relative positioning, no transform). */
  top:auto !important;
  transform:none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-sidebar {
  padding-top:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-live-splitbar {
  flex:0 0 44px !important;
  min-height:44px !important;
  margin:0 0 16px !important;
}

/* ===== Change #26 (user spec — grid position + solid background only):
   (1) The whole channel grid moves up as one unit: the grid's own
   top margin goes from 18px (Change #19) to 0, using the exact
   Change #19 selector so it wins by file order. The Change #21
   inner top padding (34px) and scroll padding are NOT touched, so
   the first row keeps its clearance and can never slide under the
   header; no card, logo, gap, column or sidebar value changes.
   (2) The right-side grid background becomes solid pure black
   (#000000) on both the browse panel and the grid itself, so the
   translucent layout/body background no longer shows through the
   grid area. The browse-panel frame (border, radius, padding) and
   the cards' own glass styling are untouched. The browse panel is
   hidden while playing, so the player view is unaffected. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) {
  margin-top:0 !important;
  background:#000000 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveBrowsePanel:not(.hidden) {
  background:#000000 !important;
}

/* ===== Change #27 (user spec — grid logo/banner visual enhancement only):
   Grid mode only; list view, sidebar, player, card size, columns, gaps
   and all functionality untouched. The provider's original logo assets
   are never replaced and no per-channel brand colours are invented
   (no colour data exists): the logo box gets one neutral, subtle
   radial glow that complements any brand artwork, and the image gets
   only a mild, branding-safe clarity lift (no hue/invert/distortion).
   The 365-badge fallback is NOT touched (its 60px size is the balance
   the user approved in Change #17/#18). Small screens (<=800px) keep
   their 54px logo scaling: the size rules below live inside a
   min-width:801px query so they never override it. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo {
  background:radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.10), rgba(255,255,255,.02) 55%, rgba(0,0,0,.30) 100%) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09), inset 0 0 0 1px rgba(255,255,255,.04) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo img {
  filter:saturate(1.08) contrast(1.06) brightness(1.02) drop-shadow(0 3px 8px rgba(0,0,0,.45)) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-label {
  color:#ffffff !important;
  font-weight:800 !important;
  letter-spacing:.01em !important;
  text-shadow:0 1px 3px rgba(0,0,0,.65), 0 0 1px rgba(0,0,0,.4) !important;
}
@media (min-width:801px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo img {
    width:auto !important;
    height:auto !important;
    max-width:92% !important;
    max-height:74px !important;
    object-fit:contain !important;
  }
}

/* ===== Change #28 (user spec — dynamic logo-based card backgrounds):
   Grid mode only; list view, sidebar, player, card size, columns, gaps
   and all functionality untouched. Each card's background is the
   channel's OWN logo artwork, shown blurred, saturated and darkened
   behind the sharp logo — so the colour always complements the real
   logo (ESPN red glows red, UEFA blue glows blue) without any colour
   being invented, any canvas/CORS work, or any server proxy. The logo
   URL arrives via the --iptv-logo-url variable set in app.js; cards
   without a logo have no variable and keep their current glass look.
   The logo box's own glass/glow (Change #27) and the card border,
   hover neon and favourite star are all preserved. The grid container
   background stays solid black (Change #26). */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card {
  position:relative !important;
  overflow:hidden !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card::before {
  content:"" !important;
  position:absolute !important;
  inset:1px !important;
  border-radius:13px !important;
  background-image:var(--iptv-logo-url, none) !important;
  background-size:cover !important;
  background-position:center center !important;
  background-repeat:no-repeat !important;
  filter:blur(20px) saturate(1.5) brightness(.52) !important;
  transform:scale(1.8) !important;
  pointer-events:none !important;
  z-index:0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card > :not(.iptv-channel-fav) {
  position:relative !important;
  z-index:1 !important;
}

/* ===== Change #29 (user: card background colours MORE VIBRANT):
   Only the Change #28 wash filter changes, using the exact same
   selector so it wins by file order: saturation 1.5 -> 1.9 and
   brightness .52 -> .68, so each card glows in a richer, brighter
   version of its own logo's colours. Blur (20px) and scale (1.8)
   are unchanged, and the wash stays dark enough for the bold white
   channel names (with their text shadow) to stay readable. Nothing
   else — logo, glass, grid, sidebar, player, functionality — is
   touched. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card::before {
  filter:blur(20px) saturate(1.9) brightness(.68) !important;
}

/* ===== Change #36 (user-approved): the missing-logo fallback in the
   player/EPG card now shows the new neon "player 365" logo <img>
   instead of the 3-letter text. The fallback span fills the logo box
   (the box centers its content) so the wide pill artwork letterboxes
   correctly at 86%, never stretched. Sidebar fallback <img>s need no
   rule here: the existing logo-box img rules already size them
   contain/centered in every mode. ===== */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-logo-fallback {
  display:flex !important; width:100% !important; height:100% !important;
  align-items:center !important; justify-content:center !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-logo-fallback img {
  width:86% !important; height:86% !important; object-fit:contain !important;
}

/* ===== Change #38 (user-approved): wide responsive toolbar logo. The new
   neon pill logo (assets/player365-fallback-logo.png) is 3:1, so the brand
   grows wider with the header; smaller sizes at narrow widths so the
   centered title and header tools never collide. ===== */
@media (max-width:1100px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv365-live-brand-logo { width:143px !important; height:48px !important; }
}
@media (max-width:600px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv365-live-brand-logo { width:119px !important; height:40px !important; }
}

/* ===== Change #43 (user-approved from preview): Live TV grid like
   Movies/Series — no black glass panel + grid close under the toolbar.
   Browse view ONLY: rule (1) is scoped with :has() to the browse state
   so the playing view is untouched, and the browse panel is hidden
   while playing. (1) .iptv-live-layout margin-top 12px -> 0, backdrop
   blur none. (2) #liveBrowsePanel: black glass -> transparent, no
   border/shadow/blur. (3) #liveChannelGrid: black -> transparent,
   padding-top + scroll-padding-top 34px -> 2px. The grid selectors
   include .has-channel-cards to tie Change #21's (2,4,2) rule and win
   by file order. Cards, logos, names, sidebar, header, Movies/Series,
   dashboard, login untouched. ===== */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-layout {
  margin-top: 0 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveBrowsePanel:not(.hidden) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid.has-channel-cards:not(.live-list-mode),
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) {
  background: transparent !important;
  padding-top: 2px !important;
  scroll-padding-top: 2px !important;
}

/* ===== Change #44 (user-approved Variant 2 "uniform cards" from preview):
   Live TV grid — 6 columns + taller cards + single glass + uniform cards
   + visible scroll. (1) 6 columns at >=1251px; the selector includes
   .has-channel-cards to beat the (2,4,2) grid rule; existing breakpoints
   (<=1250->4, <=900->3, <=560->2) untouched. (2) Taller cards:
   grid-auto-rows 196px, logo box 108px, img max-height 98px, card side
   padding 5px (so wide logos do not shrink). (3) Single glass: inner
   logo-container radial glow + inset shadow removed; the card's own
   white glass (Change #19) untouched. (4) Uniform cards: per-card
   colour wash ::before hidden. (5) Prominent 14px gold scrollbar + dark
   track + bottom fade cue on the browse panel (beats Change #43's
   box-shadow:none by file order at equal specificity). Sidebar, playing
   view, player, EPG, Movies/Series, dashboard, login untouched. ===== */
@media (min-width:1251px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid.has-channel-cards:not(.live-list-mode) {
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    grid-auto-rows:minmax(196px,1fr) !important;
  }
}
@media (min-width:801px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card {
    min-height:196px !important;
    padding-left:5px !important;
    padding-right:5px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo {
    flex:0 0 108px !important;
    height:108px !important;
    min-height:108px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo img {
    max-height:98px !important;
    max-width:96% !important;
  }
}
/* single glass: inner logo-container glass removed */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo {
  background:transparent !important;
  box-shadow:none !important;
  border-radius:0 !important;
}
/* uniform cards (Variant 2): per-card colour wash hidden */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card::before {
  display:none !important;
}
/* prominent scrollbar on the grid */
html body #liveWorkspaceScreen #liveChannelGrid {
  scrollbar-width:auto !important;
  scrollbar-color:#f0c94f rgba(0,0,0,.45) !important;
}
#liveWorkspaceScreen #liveChannelGrid::-webkit-scrollbar {
  width:14px !important;
}
#liveWorkspaceScreen #liveChannelGrid::-webkit-scrollbar-track {
  background:rgba(0,0,0,.45) !important;
  border-radius:8px !important;
}
#liveWorkspaceScreen #liveChannelGrid::-webkit-scrollbar-thumb {
  background:linear-gradient(180deg,#ffd76a,#c9962e) !important;
  border-radius:8px !important;
  border:2px solid rgba(0,0,0,.5) !important;
}
/* bottom fade cue: more rows below */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveBrowsePanel:not(.hidden) {
  box-shadow:inset 0 -48px 36px -30px rgba(0,0,0,.7) !important;
}

/* ===== Change #45: Live TV sidebar redesign (no Back/Search) + black-logo halo =====
   Sidebar rules are scoped with :has(#liveBrowsePanel:not(.hidden)) so the
   PLAYING view sidebar is untouched. The splitbar (Back + Search row) is
   hidden via CSS only — markup stays in place (JS guards rely on it).
   The halo applies to GRID card logos only, never sidebar/playing logos. */

/* --- #45 sidebar: splitbar gone, list fit to toolbar, refined rows --- */
/* New sidebar: Back + Search row gone; list starts close under the
   toolbar, aligned with the grid; clean transparent container; refined
   rows with a gold active treatment; gold list scrollbar to match #44. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar {
  padding: 0 10px 4px 2px !important;
  background: transparent !important;
  border-right: 1px solid rgba(240,201,79,.16) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-splitbar {
  display: none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-category-list {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  padding: 10px 2px 6px !important;
  gap: 8px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(240,201,79,.55) transparent !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList::-webkit-scrollbar,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-category-list::-webkit-scrollbar {
  width: 6px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList::-webkit-scrollbar-thumb,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-category-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f0c94f, #8a6a1c) !important;
  border-radius: 6px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-category-list .iptv-category-row {
  min-height: 50px !important;
  padding: 9px 14px !important;
  gap: 12px !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 12px !important;
  background: linear-gradient(100deg, rgba(16,20,36,.72), rgba(8,10,22,.72)) !important;
  color: #f6f8ff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: .01em !important;
  box-shadow: none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row .iptv365-category-flag,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row .iptv365-category-icon {
  display: inline-flex !important;
  flex: 0 0 26px !important;
  width: 26px !important;
  align-items: center !important;
  justify-content: center !important;
  color: #f0c94f !important;
  font-size: 17px !important;
  line-height: 1 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row .iptv-category-count {
  border-color: rgba(255,255,255,.16) !important;
  background: rgba(255,255,255,.06) !important;
  color: #c9d4e8 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row:hover,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row:focus-visible {
  border-color: rgba(240,201,79,.45) !important;
  background: linear-gradient(100deg, rgba(28,32,54,.82), rgba(12,14,28,.82)) !important;
  box-shadow: none !important;
  outline: none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"] {
  border: 1px solid #ffd76a !important;
  background: linear-gradient(100deg, #ffd76a, #e8a90c 72%, #d18f00) !important;
  color: #1a1206 !important;
  box-shadow: 0 0 12px rgba(240,201,79,.35), inset 0 1px 0 rgba(255,255,255,.35) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active .iptv365-category-flag,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"] .iptv365-category-flag,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active .iptv365-category-icon,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"] .iptv365-category-icon {
  color: #1a1206 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active .iptv-category-count,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"] .iptv-category-count {
  border-color: rgba(26,18,6,.35) !important;
  background: rgba(26,18,6,.12) !important;
  color: #1a1206 !important;
}

/* --- #45 halo: white drop-shadow on grid card logo imgs --- */
/* ADVICE-ONLY demo: soft white halo + drop-shadow behind/around the
   GRID card logo image so black/dark logos stay visible on the uniform
   dark cards. CSS-only, no panel/box reintroduced. Scoped to grid card
   logos in the browse state ONLY — never sidebar or playing-view logos.
   Replaces the existing L2559 filter (dark drop-shadow) while keeping
   its saturate/contrast/brightness. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo img {
  filter: saturate(1.08) contrast(1.06) brightness(1.02) drop-shadow(0 0 3px rgba(255,255,255,.8)) drop-shadow(0 0 9px rgba(255,255,255,.28)) !important;
}

/* ===== Change #46 (user-approved Revised Frame C — playing view):
   (1) white halo on the right-card channel logo; (2) gold scrollbar on
   the playing sidebar list; (3) restack for the EPG strip once JS
   moves it into the right column on desktop (>1100px); (4) the
   below-player caption: channel logo + white name, no background.
   The gold playing-row highlight and the Favourite active state are
   NOT re-asserted here — both already exist in the live rules above
   (L2169 / L2148); only the auto-scroll is new, and that is JS.
   Every rule is scoped under #liveWorkspaceScreen/#livePlaybackPanel,
   so the browse grid, Movies, Series, dashboard and login are
   untouched. The sidebar-search guard is deliberately NOT part of
   this change (never picked). */

/* (1) HALO: soft white halo + drop-shadow around the right-card
   channel logo image, so black/dark logos stay visible on the dark
   card. Same halo values as the #45 grid halo. The img currently has
   NO filter rule, so this is purely additive. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-epg-logo img {
  filter: saturate(1.08) contrast(1.06) brightness(1.02) drop-shadow(0 0 3px rgba(255,255,255,.8)) drop-shadow(0 0 9px rgba(255,255,255,.28)) !important;
}

/* (2) SCROLLBAR: gold scrollbar on the PLAYING sidebar list, matching
   the #44 grid scrollbar and the #45 browse-list scrollbar. Scoped
   with :has(#livePlaybackPanel:not(.hidden)) so it applies only while
   a channel is playing. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(240,201,79,.55) transparent !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList::-webkit-scrollbar {
  width: 6px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f0c94f, #8a6a1c) !important;
  border-radius: 6px !important;
}

/* (3) RIGHTCOL: the EPG strip once JS has moved it into the right
   column under the action buttons (desktop only, >1100px — the move
   itself is one appendChild in app.js; CSS cannot move an element
   across containers). Single-column cards in the 400px aside. The EPG
   toggle keeps working after the move because its hide rule targets
   .iptv365-epg-strip as a descendant of #livePlaybackPanel. The strip
   keeps its honest empty-state text — no programme data is invented. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel #liveEpgPanel #liveEpgStrip {
  margin-top: 16px !important;
  min-width: 0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel #liveEpgPanel #liveEpgStrip .iptv365-epg-strip-cards {
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

/* (4) CAPTION: channel NAME + LOGO BELOW THE PLAYER, WITHOUT
   background, WHITE text. The caption sits in the space freed below
   the stage (where the EPG strip was before the right-column move):
   logo left, name beside it, horizontal. NO background / panel /
   border / shadow-box on the caption itself: background is
   transparent and the name is plain white bold text. The soft
   text-shadow is legibility only (not a background) and the logo
   carries the SAME white halo as the #45 grid halo — a glow
   following the artwork's alpha, not a box — so black logos stay
   visible on the dark backdrop. The caption is populated by JS in
   renderLiveEpgPanel(channel); it is NOT tied to the EPG toggle
   (collapsing the strip hides only the strip) and shows in ALL
   layouts — only the EPG reparent is desktop-only. Small-screen
   compaction at <=600px. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-playing-caption {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 14px 0 0 0 !important;
  padding: 0 2px !important;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  min-width: 0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-playing-caption-logo {
  /* Defeats the pre-existing style.css L1882 "no artwork in the right
     playback column" rule (#livePlaybackPanel .right-player-panel img
     { display:none !important; visibility:hidden !important; width:0;
     height:0 }): display + visibility MUST be re-asserted here, or
     the logo measures 0x0 even though filter/size rules apply. The
     defeat is scoped to the caption logo only. */
  display: block !important;
  visibility: visible !important;
  height: 46px !important;
  width: auto !important;
  max-width: 150px !important;
  flex: 0 0 auto !important;
  object-fit: contain !important;
  filter: saturate(1.08) contrast(1.06) brightness(1.02) drop-shadow(0 0 3px rgba(255,255,255,.8)) drop-shadow(0 0 9px rgba(255,255,255,.28)) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-playing-caption-name {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: .2px !important;
  line-height: 1.2 !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.55) !important;
}
@media (max-width:600px) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-playing-caption-logo {
    height: 34px !important;
    max-width: 110px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-playing-caption-name {
    font-size: 17px !important;
  }
}

/* ===== Change #51: Live TV sidebar "Search category" field (variant B, user-approved) =====
   Restores SEARCH ONLY at the top of the category list in browse view; Back
   stays hidden (the Change #45 choice). Same :has(#liveBrowsePanel:not(.hidden))
   browse scope as #45, so the PLAYING view splitbar is untouched. A second
   rule (L1189) fixes the splitbar at height:40px + overflow:hidden — this
   block defeats it with height:auto + overflow:visible, or the 50px field
   clips by 10px (measured in the preview). Values ported from the approved
   preview simulation (smoke24/livesearch/override.css, MAIN section). */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-splitbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  overflow: visible !important;
  gap: 0 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-back-action {
  display: none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-search-action {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(240, 201, 79, 0.85) !important;
  border-radius: 12px !important;
  background: linear-gradient(100deg, rgba(240, 201, 79, 0.30), rgba(240, 201, 79, 0.13)) !important;
  box-shadow: 0 4px 18px rgba(240, 201, 79, 0.14) !important;
  color: #fff7dd !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-search-icon {
  flex: 0 0 auto !important;
  font-size: 22px !important;
  line-height: 1 !important;
  color: #ffd76a !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveCategorySearchInline {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveCategorySearchInline::placeholder {
  color: rgba(255, 238, 190, 0.88) !important;
  opacity: 1 !important;
  font-weight: 650 !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-search-action:focus-within {
  border-color: #ffd76a !important;
  box-shadow: 0 0 0 3px rgba(240, 201, 79, 0.35), 0 4px 22px rgba(240, 201, 79, 0.25) !important;
  background: linear-gradient(100deg, rgba(240, 201, 79, 0.38), rgba(240, 201, 79, 0.18)) !important;
}

/* ================================================================
   Change #64 (2026-11-14): portrait playing view — player on top.
   User-approved preview. Portrait phones only; desktop, landscape
   and TV are untouched (every rule lives inside the portrait query).
   Playing-view scope is :has(#livePlaybackPanel:not(.hidden)), the
   mirror of the browse-view scoping used since Change #45, so the
   browse grid and category sidebar are unaffected.
   1) The grid rows swap: the player block moves to row 1 (auto height,
      16:9 stage + caption) and the sidebar list to row 2, filling the
      rest of the viewport. Back + Search ride with the sidebar, right
      under the player.
   2) The info card (#liveEpgPanel: big channel name + Favourite/Lock/
      Share/EPG/PiP actions) is hidden in portrait playing view only.
      The caption below the player stays. The card and its actions are
      untouched on desktop/landscape and may return later in a new style.
   3) Channel rows compact (56px -> 44px, name 13px -> 12px, smaller
      logos) so more channels show at once and scrolling is easier.
   4) The list gets bottom padding so the last row scrolls clear of the
      fixed bottom bar.
   The :has() argument contributes its ID, so the layout selectors are
   (3,4,2) and beat every earlier layout rule. Browsers without :has()
   keep the previous portrait layout (graceful degradation).
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv-live-layout {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv-live-content {
    grid-row: 1 !important;
    min-height: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv-live-sidebar {
    grid-row: 2 !important;
    min-height: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #liveEpgPanel {
    display: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel {
    grid-template-columns: 24px 38px minmax(0, 1fr) !important;
    column-gap: 8px !important;
    min-height: 44px !important;
    padding: 5px 8px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-logo {
    width: 38px !important;
    height: 32px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-number {
    font-size: 12px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-name {
    font-size: 12px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList {
    padding-bottom: 96px !important;
  }
}

/* ================================================================
   Change #65 (2026-11-14): Picture-1 portrait browse view.
   User-approved example (preview67). Portrait phones only; desktop,
   landscape, TV and the PLAYING view are untouched (every rule lives
   inside the portrait query + the :has(#liveBrowsePanel:not(.hidden))
   browse scope used since Change #45).
   1) Two-column layout: 148px category sidebar (left) + channel
      content (right), each scrolling independently.
   2) Scrollbars HIDDEN on both panes (user instruction 13:05: the
      scroll toggles on the right of categories + channels go, so the
      space is saved). Scrolling itself is unchanged.
   3) Category rows compact (48px, 12px, 2-line clamp); count pills
      hidden (the provider sends no live counts).
   4) The splitbar is hidden in portrait browse: the search field is
      moved by the Change #65 script into the content pane (same node,
      same handler), and Back stays hidden (the Change #45 choice).
   5) Channel cards render as ROWS by default (logo left, name +
      subtitle, favourite heart right). The rows/grid toggle flips the
      .iptv365-p1-grid class on the section; grid mode reuses the
      existing card rules untouched (only the stamped subtitle hides).
   Specificity: browse-scope selectors carry 3 IDs once the list/grid
   ID joins, beating the Change #45 row rule (3,4,2) on ties by later
   position, and the :not(.iptv365-never) trick wins outright where
   the Change #63 dashboard-injected rules compete. Browsers without
   :has() keep the previous portrait layout (graceful degradation).
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-layout:not(.iptv365-never) {
    grid-template-columns: 148px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 8px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar:not(.iptv365-never) {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-height: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-content:not(.iptv365-never) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-height: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-splitbar:not(.iptv365-never) {
    display: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList:not(.iptv365-never) {
    padding: 6px 2px !important;
    gap: 6px !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row:not(.iptv365-never) {
    min-height: 48px !important;
    padding: 8px 10px !important;
    gap: 8px !important;
    font-size: 12px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row .iptv365-category-label {
    font-size: 12px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row .iptv365-category-flag {
    font-size: 18px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row .iptv-category-count {
    display: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.iptv365-never) {
    scrollbar-width: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar,
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-content {
    scrollbar-width: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar::-webkit-scrollbar,
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  /* Rows mode (default): the section carries no .iptv365-p1-grid. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):not(.iptv365-p1-grid):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.iptv365-never) {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 4px 2px 96px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):not(.iptv365-p1-grid):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card:not(.iptv365-never) {
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    height: 62px !important;
    min-height: 62px !important;
    padding: 8px 10px !important;
    gap: 10px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):not(.iptv365-p1-grid):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) .iptv-channel-logo:not(.iptv365-never) {
    flex: 0 0 52px !important;
    width: 52px !important;
    height: 40px !important;
    min-height: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):not(.iptv365-p1-grid):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) .iptv-channel-logo img {
    max-height: 36px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):not(.iptv365-p1-grid):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-fav:not(.iptv365-never) {
    position: static !important;
    order: 3 !important;
    flex: 0 0 auto !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    top: auto !important;
    right: auto !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):not(.iptv365-p1-grid):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-fav svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):not(.iptv365-p1-grid):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv365-p1-rowtext {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 1px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):not(.iptv365-p1-grid):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-label {
    text-align: left !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):not(.iptv365-p1-grid):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv365-p1-rowsub {
    display: block !important;
    color: rgba(255, 255, 255, .55) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  /* Grid mode: existing card rules apply; only the subtitle hides. */
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv365-p1-rowsub {
    display: none !important;
  }
  /* The moved search field shares its row with the sort button. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-searchrow .iptv-live-search-action:not(.iptv365-never) {
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  /* Change #65 chrome (new elements, portrait only). */
  .iptv365-p1-banner {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 0 7px 8px;
    border-radius: 14px;
    border: 1px solid rgba(240, 201, 79, .35);
    background: linear-gradient(100deg, rgba(60, 20, 80, .65), rgba(10, 14, 35, .85));
  }
  .iptv365-p1-banner-icon {
    font-size: 26px;
    line-height: 1;
  }
  .iptv365-p1-banner-title {
    display: block;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.2;
  }
  .iptv365-p1-banner-sub {
    display: block;
    color: rgba(255, 255, 255, .6);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
  }
  .iptv365-p1-filters {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 2px;
    margin-bottom: 8px;
  }
  .iptv365-p1-filter {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(12, 16, 34, .8);
    color: #e8ecff;
    text-align: left;
    cursor: pointer;
    font: 700 12px/1.3 Inter, Arial, sans-serif;
  }
  .iptv365-p1-filter.is-active {
    background: linear-gradient(100deg, #f0c94f, #c9a227);
    color: #1a1405;
    border-color: rgba(240, 201, 79, .9);
    box-shadow: 0 4px 16px rgba(240, 201, 79, .25);
  }
  .iptv365-p1-filter-icon {
    font-size: 16px;
    flex: 0 0 auto;
  }
  .iptv365-p1-filter-name {
    flex: 1 1 auto;
    min-width: 0;
  }
  .iptv365-p1-filter-count {
    flex: 0 0 auto;
    font-size: 11px;
    opacity: .7;
  }
  .iptv365-p1-heading {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px;
    margin-bottom: 2px;
  }
  .iptv365-p1-heading-name {
    flex: 1 1 auto;
    min-width: 0;
    color: #fff;
    font: 800 15px/1.3 Inter, Arial, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .iptv365-p1-viewtoggle {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
  }
  .iptv365-p1-viewtoggle button {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(10, 14, 35, .94);
    color: rgba(255, 255, 255, .6);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .iptv365-p1-viewtoggle button.is-active {
    color: #f0c94f;
    border-color: rgba(240, 201, 79, .6);
  }
}

/* ================================================================
   Change #66 (2026-11-14): Picture-1 sidebar + Picture-2 grid,
   combined (user-approved Example B: original-case labels).
   (1) Flat-black sidebar: no gaps/pills, one continuous black list,
       selected row = full-bleed bright yellow band, unselected rows
       plain text on black; filter buttons get the same treatment plus
       one divider line under the filter group.
   (2) Full-black fill: the whole portrait browse section + layout are
       painted black and the pane gap is removed; ONE thin glass
       divider line separates the sidebar from the grid pane.
   (3) P2 grid: pure-black cards, gold 2px border + glow, 12px radius,
       HD corner badge (inside top-right; the favourite star moves to
       bottom-right in grid mode). The badge element is stamped by the
       Change #66 script ONLY when the channel NAME itself contains
       HD/FHD/UHD/4K — never faked.
   (4) Selective halo (GLOBAL, mirrors the #45 scope): the blanket #45
       white halo is neutralised; the halo applies ONLY to logo spans
       the Change #66 script marked .iptv365-dark-logo (near-black
       logos, detected by pixel sampling). Unmarked logos keep the
       pre-#45 dark drop-shadow. The playing-view caption/right-card
       halos are untouched.
   Portrait rules are scoped to the browse state; desktop, landscape,
   TV and the playing view keep their existing look. Browsers without
   :has() keep the previous portrait layout (graceful degradation).
   ================================================================ */
/* --- Selective halo: neutralise the blanket #45 halo. Same selector
   as #45, later position wins. --- */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo img {
  filter: saturate(1.08) contrast(1.06) brightness(1.02) drop-shadow(0 3px 8px rgba(0,0,0,.45)) !important;
}
/* --- Selective halo: halo ONLY on marked (near-black logo) spans. --- */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo.iptv365-dark-logo img {
  filter: saturate(1.08) contrast(1.06) brightness(1.02) drop-shadow(0 0 3px rgba(255,255,255,.8)) drop-shadow(0 0 9px rgba(255,255,255,.28)) !important;
}
@media (max-width: 950px) and (orientation: portrait) {
  /* Full-black fill: section + layout, pane gap removed. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)):not(.iptv365-never) {
    background: #000000 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-layout:not(.iptv365-never) {
    gap: 0 !important;
    background: #000000 !important;
  }
  /* Flat sidebar: black pane, no gaps, no pills. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar:not(.iptv365-never) {
    background: #000000 !important;
    position: relative !important;
  }
  /* ONE thin glass divider line between the panes. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: 0;
    width: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.35) 18%, rgba(255,255,255,.35) 82%, rgba(255,255,255,0));
    pointer-events: none;
    z-index: 5;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList:not(.iptv365-never) {
    background: #000000 !important;
    gap: 0 !important;
    padding: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row:not(.iptv365-never) {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"]:not(.iptv365-never) {
    background: #ffd600 !important;
    color: #111111 !important;
    border-radius: 0 !important;
  }
  /* Filter buttons: same flat treatment + one divider under the group. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-filters {
    gap: 0 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.14) !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-filter:not(.iptv365-never) {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-filter.is-active:not(.iptv365-never) {
    background: #ffd600 !important;
    color: #111111 !important;
    border-radius: 0 !important;
  }
  /* Black content pane + black cards (rows AND grid modes). */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-content:not(.iptv365-never) {
    background: #000000 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveBrowsePanel {
    background: transparent !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card:not(.iptv365-never) {
    background: #000000 !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    box-shadow: none !important;
  }
  /* Flatten the logo-span radial wash in the P1 view. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo:not(.iptv365-never) {
    background: transparent !important;
    box-shadow: none !important;
  }
  /* Heading TV glyph (stamped by the Change #66 script). */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-heading-glyph {
    font-size: 16px;
    margin-right: 6px;
    flex: 0 0 auto;
  }
  /* HD badge: hidden unless grid mode. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-hd-badge {
    display: none;
  }
  /* Grid mode: gold border + glow + 12px radius. */
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) > .iptv-channel-card:not(.iptv365-never) {
    border: 2px solid #d4af37 !important;
    border-radius: 12px !important;
    box-shadow: 0 0 10px rgba(212,175,55,.18) !important;
  }
  /* Grid mode: HD badge inside top-right. The full card-child chain
     beats the (2,5,2) rule that forces position:relative on every
     card child except the favourite star. */
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card > .iptv365-p1-hd-badge:not(.iptv365-never) {
    display: block;
    position: absolute !important;
    top: 6px;
    right: 6px;
    z-index: 3;
    background: linear-gradient(100deg, #f0c94f, #c9a227);
    color: #1a1405;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 4px;
    letter-spacing: .4px;
    pointer-events: none;
  }
  /* Grid mode: favourite star moves to bottom-right (badge owns top-right). */
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-fav:not(.iptv365-never) {
    top: auto !important;
    bottom: 6px !important;
    right: 8px !important;
  }
}

/* ================================================================
   Change #67 (2026-11-14): remove the P1 "Live TV / N Categories"
   banner from the portrait browse view (user instruction). The
   banner element stays in the DOM (the Change #65 script keeps
   updating it, harmlessly) but is hidden, so the sidebar and the
   channel list move up and more categories/channels are visible.
   Reversible: delete this rule to bring the banner back. Portrait
   browse scope only; desktop, landscape, TV and the playing view
   are untouched (the banner is already removed there by the #65
   script when leaving the browse view).
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-banner:not(.iptv365-never) {
    display: none !important;
  }
}

/* ================================================================
   Change #77 (2026-11-14): Live TV search rework, portrait browse
   only (user-approved Preview82). The category search sits at the
   top of the sidebar; the search above the channels is icon-only
   until tapped. The sidebar label keeps the gold #51/#65 styling;
   only its fit inside the 148px sidebar is adjusted. The channel
   box reuses the search-row geometry (50px tall, 12px radius).
   Desktop, landscape, TV and the playing view are untouched.
   Change #81 (2026-11-14): the channel box + sort button above
   the grid are GONE (the header search is now the only search);
   only the sidebar label rules below survive from this block.
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  /* Category search as the first item of the sidebar filters stack. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-filters .iptv-live-search-action:not(.iptv365-never) {
    flex: none !important;
    gap: 8px !important;
    padding: 0 10px !important;
    margin-bottom: 2px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-filters #liveCategorySearchInline:not(.iptv365-never) {
    font-size: 13px !important;
  }

  /* Change #79: grouped-sidebar back row. It keeps the compact row
     geometry and only restyles itself as the way back to the full
     list. Rendered only while a group is active (portrait only).
     The full two-id chain beats the compact row rules (2,4,2). */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.iptv365-group-back:not(.iptv365-never) {
    justify-content: flex-start !important;
    padding-left: 10px !important;
    border: 1px solid rgba(212, 175, 55, .7) !important;
    background: rgba(20, 16, 8, .9) !important;
    color: #f5d76e !important;
    font-weight: 700 !important;
  }
}

/* Change #83: the playing-view Favourite button shows RED when the
   channel is favourited (gold = not favourited). The :not() point
   beats the grouped .is-fav/.is-locked rule above; .is-locked keeps
   its gold. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-player-action.is-fav:not(.iptv365-never) {
  background:linear-gradient(100deg,#e5484d,#a3122e)!important;
  border-color:#e5484d!important;
  color:#fff!important;
}

/* Change #86: every selected control in the portrait Live view uses
   the desktop nav's rainbow sky-glass style (same 3-layer gradients
   + glow), with yellow text as the user asked. The flat #66 band
   shape (radius 0) is kept for rows and filter buttons. These rules
   repeat the Change #66 selector chains and sit later in the file,
   so they win the same-specificity contests. */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"]:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-filter.is-active:not(.iptv365-never),
  .iptv365-p1-viewtoggle button.is-active:not(.iptv365-never) {
    color: #ffe27a !important;
    border: 1px solid transparent !important;
    background-color: transparent !important;
    background-image:
      linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.10) 42%, rgba(255,255,255,0.00) 58%),
      linear-gradient(90deg, rgba(255,138,0,0.92), rgba(255,45,149,0.92), rgba(138,43,226,0.92), rgba(0,217,255,0.92)),
      linear-gradient(90deg, #FF8A00, #FF2D95, #8A2BE2, #00D9FF) !important;
    background-origin: padding-box, padding-box, border-box !important;
    background-clip: padding-box, padding-box, border-box !important;
    -webkit-backdrop-filter: blur(8px) saturate(150%) !important;
    backdrop-filter: blur(8px) saturate(150%) !important;
    box-shadow:
      0 0 16px rgba(255, 45, 149, 0.55),
      0 0 32px rgba(138, 43, 226, 0.35),
      0 4px 14px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
    text-shadow: 0 1px 6px rgba(0,0,0,0.35) !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"]:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-filter.is-active:not(.iptv365-never) {
    border-radius: 0 !important;
  }
}

/* ================================================================
   Change #110 (user order 2026-11-15): portrait Live browse — the
   category list must scroll so the LAST category clears the fixed
   bottom bar. ROOT CAUSE (harness-measured on the #109 copy at
   390x722): the #66 P1 rule sets #livePanelList padding: 0, the
   list bottom sits at y=710 while the bottom bar covers y=642-710,
   so at max scroll the last row rendered at y=662-710 — fully
   under the bar, and a hit test at its centre returned the bar
   item, not the row. Fix: 96px bottom padding (same clearance the
   playing view already uses) on the identical selector chain, later
   in this file, so it wins the cascade for the bottom side only.
   The #66 flat look (padding 0 elsewhere, gap 0) is untouched.
   Portrait browse scope only; desktop/landscape/playing untouched.
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList:not(.iptv365-never) {
    padding-bottom: 96px !important;
  }
}

/* ================================================================
   Change #111 (2026-11-15): portrait playing view per the user's
   reference picture — group chips + small channel search + sort
   toggle + favourite hearts on the channel rows. Portrait MQ +
   :has(#livePlaybackPanel:not(.hidden)) playing scope only (the #64
   pattern). Desktop/landscape playing, portrait browse (#110),
   Movies/Series, dashboard, header, bottom bar and the player
   itself are untouched.
   The below-player caption is hidden in this scope only: the
   reference has no caption, and the channel name already shows in
   the stage chip and the gold playing row. The splitbar (Back +
   category search) is hidden here too: the back chip + the new
   channel search replace it. The row logos need no new restore
   rule — style.css already re-shows them below its hide rule.
   ================================================================ */
.iptv365-playview-chrome { display: none !important; }
.iptv-sidebar-channel-fav { display: none !important; }

@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv-live-splitbar:not(.iptv365-never) {
    display: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePlayingCaption:not(.iptv365-never) {
    display: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chrome:not(.iptv365-never) {
    display: block !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    padding: 2px 2px 8px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chips:not(.iptv365-never) {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    padding: 4px 2px 6px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chips::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chip:not(.iptv365-never) {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 34px !important;
    padding: 0 13px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 120, 160, .38) !important;
    background: rgba(255, 255, 255, .06) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chip.is-active:not(.iptv365-never) {
    background: linear-gradient(135deg, #ff2d78 0%, #ff6a35 100%) !important;
    border-color: rgba(255, 211, 77, .95) !important;
    box-shadow: 0 0 14px rgba(255, 45, 120, .5) !important;
    color: #fff !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-back:not(.iptv365-never) {
    padding: 0 11px !important;
    font-size: 16px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chip-icon:not(.iptv365-never) {
    font-size: 15px !important;
    line-height: 1 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-searchrow:not(.iptv365-never) {
    display: flex !important;
    gap: 8px !important;
    align-items: stretch !important;
    margin-top: 4px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-search:not(.iptv365-never) {
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 40px !important;
    min-width: 0 !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 120, 160, .38) !important;
    background: rgba(255, 255, 255, .06) !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-search-icon:not(.iptv365-never) {
    color: #ffb3c8 !important;
    font-size: 17px !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-search input:not(.iptv365-never) {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 13px !important;
    box-shadow: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-search input::placeholder {
    color: rgba(255, 255, 255, .55) !important;
    opacity: 1 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-sort:not(.iptv365-never) {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 40px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 120, 160, .38) !important;
    background: rgba(255, 255, 255, .06) !important;
    color: #fff !important;
    cursor: pointer !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-sort svg:not(.iptv365-never) {
    width: 19px !important;
    height: 19px !important;
    display: block !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-sort-dir:not(.iptv365-never) {
    font-size: 8px !important;
    font-weight: 800 !important;
    letter-spacing: .4px !important;
    line-height: 1.2 !important;
    color: #ffd34d !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-sort.is-sorted:not(.iptv365-never) {
    border-color: rgba(255, 211, 77, .9) !important;
    color: #ffd34d !important;
  }
  /* Channel rows: number + logo + name + heart, matching the
     reference proportions. The #64 compact rules lose to this
     block (extra :has() ID + later position). */
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel:not(.iptv365-never) {
    grid-template-columns: 26px 46px minmax(0, 1fr) 30px !important;
    column-gap: 9px !important;
    min-height: 56px !important;
    padding: 6px 9px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-logo:not(.iptv365-never) {
    width: 46px !important;
    height: 38px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-number:not(.iptv365-never) {
    font-size: 13px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-name:not(.iptv365-never) {
    font-size: 13px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-fav:not(.iptv365-never) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 auto !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-fav svg:not(.iptv365-never) {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
  }
}

/* ================================================================
   Change #112 (2026-11-15): clamp playing-view channel-row names
   to 2 lines. DEFENCE IN DEPTH behind the app.js name sanitizer:
   a base64 blob in a channel's name field rendered verbatim and,
   with white-space:normal + overflow-wrap:anywhere and no clamp,
   exploded the gold playing row to 34 lines / 567px (seen live).
   The sanitizer keeps garbage out of the DOM; this clamp bounds
   ANY long name (legit or not) so a row can never run away again.
   Portrait playing scope only, same selector chain as #111 (extra
   :has() ID + later position wins over the base row-name rule).
   The stage chip and the caption already clamp themselves
   (single-line + ellipsis), so they need no rule here. Desktop
   rows rely on the sanitizer and keep today's wrapping behaviour.
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-name:not(.iptv365-never) {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
}

/* ================================================================
   Change #125 (2026-11-16): denser portrait playing-view channel
   list. User order + screenshot: the gaps between rows were too
   big and the gold playing row too tall, so few channels showed
   at once. Portrait MQ + :has(#livePlaybackPanel:not(.hidden))
   playing scope only, same selector chains as #111/#112 (equal
   specificity, later position wins). Row pitch 63px -> 48px:
   min-height 56 -> 44 (the agreed tappable floor), vertical
   padding 6px -> 4px, list gap 7px -> 4px, logo 46x38 -> 40x34
   so the logo never stretches the 44px row (34 + 2x4 = 42).
   Fonts, favourite button, column layout and the chips/search/
   sort chrome are untouched. The gold .active row shares the
   same geometry (explicit rule, so no active-only padding can
   keep it tall) and keeps its gold gradient, so it stays
   clearly distinct. Browse list, landscape and desktop are
   untouched: the :has() playing scope fails while the player
   is hidden, and the portrait MQ fails off-portrait.
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList:not(.iptv365-never) {
    gap: 4px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel:not(.iptv365-never) {
    grid-template-columns: 26px 40px minmax(0, 1fr) 30px !important;
    min-height: 44px !important;
    padding: 4px 9px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel.active:not(.iptv365-never) {
    min-height: 44px !important;
    padding: 4px 9px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel .iptv-sidebar-channel-logo:not(.iptv365-never) {
    width: 40px !important;
    height: 34px !important;
  }
}

/* ================================================================
   Change #128 (2026-11-16): portrait playing-view restyle, three
   parts. (A) The video goes full-bleed: the layout's top margin +
   side/top padding and the playback panel's side/bottom padding are
   zeroed in the playing scope only, so the 16:9 stage spans the
   full viewport width and moves up toward the header; the stage
   and its panel lose their rounded corners + border for a clean
   edge-to-edge look. The chips/search chrome trims a few px of
   padding so the list shifts up into the saved space. (B) The
   channel-list gap goes to 0 — rows touch, separated only by their
   own 1px borders; the #125 44px rows are untouched. (C) The gold
   playing-row highlight becomes the #86 rainbow sky-glass (same
   3-layer gradients + blur/saturate + glow, #ffe27a text) with
   rounded corners; the group chips' pink active fill becomes the
   same rainbow glass; the portrait browse selected rows/filters
   keep their #86 rainbow but gain rounded corners (the #86
   radius:0 band is replaced); the desktop/landscape category-row
   blue active fill becomes the same rainbow glass so selection
   looks identical everywhere. Same selector chains as #111/#125/
   #86 + later position win the ties; the desktop category rule
   adds a :not() point over the blue rule. Browse list, landscape
   and desktop layouts are untouched — every geometry rule lives
   inside the portrait MQ + :has(#livePlaybackPanel:not(.hidden))
   scope.
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) {
    gap: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv-live-layout:not(.iptv365-never) {
    margin-top: 0 !important;
    padding: 0 0 7px !important;
    row-gap: 6px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePlaybackPanel:not(.iptv365-never) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePlaybackPanel .right-player-panel:not(.iptv365-never) {
    border: 0 !important;
    border-radius: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePlaybackPanel .player-stage:not(.iptv365-never) {
    border: 0 !important;
    border-radius: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chrome:not(.iptv365-never) {
    padding: 0 2px 4px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chips:not(.iptv365-never) {
    padding: 2px 2px 2px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-searchrow:not(.iptv365-never) {
    margin-top: 2px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList:not(.iptv365-never) {
    gap: 0 !important;
  }
  /* (C) Group chips: rainbow sky-glass when active (was pink). */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chip.is-active:not(.iptv365-never) {
    color: #ffe27a !important;
    border: 1px solid transparent !important;
    background-color: transparent !important;
    background-image:
      linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.10) 42%, rgba(255,255,255,0.00) 58%),
      linear-gradient(90deg, rgba(255,138,0,0.92), rgba(255,45,149,0.92), rgba(138,43,226,0.92), rgba(0,217,255,0.92)),
      linear-gradient(90deg, #FF8A00, #FF2D95, #8A2BE2, #00D9FF) !important;
    background-origin: padding-box, padding-box, border-box !important;
    background-clip: padding-box, padding-box, border-box !important;
    -webkit-backdrop-filter: blur(8px) saturate(150%) !important;
    backdrop-filter: blur(8px) saturate(150%) !important;
    box-shadow:
      0 0 16px rgba(255, 45, 149, 0.55),
      0 0 32px rgba(138, 43, 226, 0.35),
      0 4px 14px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
    text-shadow: 0 1px 6px rgba(0,0,0,0.35) !important;
  }
  /* (C) Portrait browse selected rows/filters: keep the #86 rainbow,
     replace the flat radius:0 band with rounded corners. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"]:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-filter.is-active:not(.iptv365-never) {
    border-radius: 12px !important;
  }
}

/* (C) Playing channel row, all sizes: rainbow sky-glass with rounded
   corners (was the gold gradient). The :not() point beats the gold
   two-ID rule; number/name go #ffe27a like every #86 selected
   state. The favourite heart keeps its own #83 red/gold rule. */
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel.active:not(.iptv365-never) {
  color: #ffe27a !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.10) 42%, rgba(255,255,255,0.00) 58%),
    linear-gradient(90deg, rgba(255,138,0,0.92), rgba(255,45,149,0.92), rgba(138,43,226,0.92), rgba(0,217,255,0.92)),
    linear-gradient(90deg, #FF8A00, #FF2D95, #8A2BE2, #00D9FF) !important;
  background-origin: padding-box, padding-box, border-box !important;
  background-clip: padding-box, padding-box, border-box !important;
  -webkit-backdrop-filter: blur(8px) saturate(150%) !important;
  backdrop-filter: blur(8px) saturate(150%) !important;
  box-shadow:
    0 0 16px rgba(255, 45, 149, 0.55),
    0 0 32px rgba(138, 43, 226, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel.active:not(.iptv365-never) .iptv-sidebar-channel-number,
html body #liveWorkspaceScreen.iptv-live-screen.live-channel-list-mode:not(.hidden) #livePanelList > .iptv-sidebar-channel.active:not(.iptv365-never) .iptv-sidebar-channel-name {
  color: #ffe27a !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35) !important;
}

/* (C) Category rows, desktop/landscape: rainbow sky-glass (was the
   blue gradient). The :not() point beats the blue rule; in portrait
   browse the #86 block still wins the background and the radius
   rule above rounds it. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row.active:not(.iptv365-never),
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) .iptv-category-row[aria-pressed="true"]:not(.iptv365-never) {
  color: #ffe27a !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.10) 42%, rgba(255,255,255,0.00) 58%),
    linear-gradient(90deg, rgba(255,138,0,0.92), rgba(255,45,149,0.92), rgba(138,43,226,0.92), rgba(0,217,255,0.92)),
    linear-gradient(90deg, #FF8A00, #FF2D95, #8A2BE2, #00D9FF) !important;
  background-origin: padding-box, padding-box, border-box !important;
  background-clip: padding-box, padding-box, border-box !important;
  -webkit-backdrop-filter: blur(8px) saturate(150%) !important;
  backdrop-filter: blur(8px) saturate(150%) !important;
  box-shadow:
    0 0 16px rgba(255, 45, 149, 0.55),
    0 0 32px rgba(138, 43, 226, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35) !important;
}

/* Change #128, continued: the desktop (min-width:801px) sidebar block
   above carries its own gold active rule on a (3,5,2) chain, which
   the (1,5,2) category rule above cannot beat — desktop Live rows
   stayed gold in the harness. This rule repeats that exact chain
   with a :not() point, so desktop/landscape browse rows get the
   same rainbow sky-glass; in portrait browse it ties the #86 stack
   and the radius rule above rounds it. Flag/icon/count children go
   #ffe27a to match. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active:not(.iptv365-never),
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"]:not(.iptv365-never) {
  color: #ffe27a !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.10) 42%, rgba(255,255,255,0.00) 58%),
    linear-gradient(90deg, rgba(255,138,0,0.92), rgba(255,45,149,0.92), rgba(138,43,226,0.92), rgba(0,217,255,0.92)),
    linear-gradient(90deg, #FF8A00, #FF2D95, #8A2BE2, #00D9FF) !important;
  background-origin: padding-box, padding-box, border-box !important;
  background-clip: padding-box, padding-box, border-box !important;
  -webkit-backdrop-filter: blur(8px) saturate(150%) !important;
  backdrop-filter: blur(8px) saturate(150%) !important;
  box-shadow:
    0 0 16px rgba(255, 45, 149, 0.55),
    0 0 32px rgba(138, 43, 226, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35) !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active:not(.iptv365-never) .iptv365-category-flag,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"]:not(.iptv365-never) .iptv365-category-flag,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active:not(.iptv365-never) .iptv365-category-icon,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"]:not(.iptv365-never) .iptv365-category-icon {
  color: #ffe27a !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row.active:not(.iptv365-never) .iptv-category-count,
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row[aria-pressed="true"]:not(.iptv365-never) .iptv-category-count {
  border-color: rgba(255,255,255,.45) !important;
  background: rgba(0,0,0,.22) !important;
  color: #ffe27a !important;
}

/* ================================================================
   Change #129 (2026-11-16): country-overlay Live TV "See More"
   opens a full-width channel grid (user-picked Preview129
   4-per-row variant). Change #179 (2026-11-16): the default is
   now 2 columns per row (large cards — the values below are the
   former #178 density-2 geometry); 3 and 4 columns are explicit
   density classes in the #178/#179 block at the end of this
   file. The See More handler adds
   .iptv365-country-grid to #liveWorkspaceScreen; openLive,
   openLiveCategory, the showcase entry and returnToLiveCategories
   clear it, so only a country-window visit renders this way.
   Portrait browse scope only: the portrait media query + the
   :has(#liveBrowsePanel:not(.hidden)) browse scope used since #45.
   Desktop/landscape/TV and the playing view are untouched (the
   class is inert there — no rule below matches outside this scope).
   Specificity: every selector carries the section class plus the
   :not(.iptv365-never) points, reaching (3,9,2) on cards — above
   the (3,7,2) P1 grid-mode gold rule and the (3,5,2) rows rules —
   so the grid holds in BOTH rows/grid toggle states and with or
   without .live-list-mode on the grid. Values are the measured
   Preview129 geometry scaled to the #179 2-column default
   (large cards, 72px logos, 12px gap — the former #178
   density-2 values); the original 4-column geometry now lives
   in the .iptv365-country-density-4 rules at the end of this
   file.
   Preview findings honoured:
   1) P1-stamped cards: .iptv365-p1-rowtext is a centred block,
      bottom-pinned; the .iptv365-p1-rowsub category tag is KEPT.
   2) Labels wrap normally (overflow-wrap:anywhere) — the row-mode
      nowrap rule is beaten, so long names wrap instead of clipping.
   3) The favourite star is repositioned top-right and sized (the
      P1-grid bottom pin + unsized SVG renders a clipped triangle);
      colours are untouched (gold outline / red fill, per #83).
   4) -webkit-line-clamp does NOT engage on these labels in this
      Chrome build (bisected in the preview) — height-based 2-line
      clipping (25px + overflow:hidden) instead.
   5) The HD badge is hidden in this view: it would collide with
      the top-right star when the P1 grid toggle is on.
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) .iptv-live-layout:not(.iptv365-never) {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar:not(.iptv365-never) {
    display: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) .iptv-live-content:not(.iptv365-never) {
    padding: 10px 10px 12px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) .iptv-live-channel-toolbar:not(.iptv365-never) {
    margin-bottom: 10px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    gap: 12px !important;
    padding: 2px 2px 96px !important;
    overflow-y: auto !important;
    align-content: start !important;
    height: 100% !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.iptv365-never) > .iptv-channel-card:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) > .iptv-channel-card:not(.iptv365-never) {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 4px !important;
    height: auto !important;
    min-height: 152px !important;
    padding: 14px 10px 12px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    transform: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo:not(.iptv365-never) {
    flex: 0 0 72px !important;
    width: 100% !important;
    height: 72px !important;
    min-height: 0 !important;
    margin: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo img {
    max-height: 70px !important;
    max-width: 92% !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo .iptv-logo-fallback:not(.iptv365-never) {
    font-size: 28px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-fav:not(.iptv365-never) {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    bottom: auto !important;
    left: auto !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    order: 0 !important;
    flex: 0 0 auto !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-fav svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv365-p1-rowtext:not(.iptv365-never) {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-label:not(.iptv365-never) {
    display: block !important;
    line-height: 1.25 !important;
    height: 30px !important;
    min-height: 0 !important;
    max-height: 30px !important;
    overflow: hidden !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    width: 100% !important;
    min-width: 0 !important;
    font-size: 12px !important;
    margin: 0 !important;
    text-align: center !important;
    flex: 0 0 auto !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv365-p1-rowsub:not(.iptv365-never) {
    display: block !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    max-width: 100% !important;
    text-overflow: ellipsis !important;
    margin-top: 2px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card > .iptv365-p1-hd-badge:not(.iptv365-never) {
    display: none !important;
  }
  /* Empty category: the honest empty message spans the full grid
     width instead of squeezing into one 78px cell. */
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-grid-empty:not(.iptv365-never) {
    grid-column: 1 / -1 !important;
  }
}

/* ================================================================
   Change #142 (2026-11-16): Live TV Solid Black (picture E) + 3D
   badge cards + selective white stroke for dark logos.
   User-approved Preview142, with the 02:52 correction: the channel
   cards are NOT flat — they keep the raised glossy-badge 3D look
   from picture E (top highlight + vertical gradient + drop shadow).
   (1) SOLID BLACK BACKDROP, all sizes, browse state only: the
       workspace, layout, content pane, sidebar pane and browse
       panel paint solid black, covering the mybgpicture/galaxy
       wash. Same :has(#liveBrowsePanel:not(.hidden)) browse scope
       as #45/#66, so the playing view is untouched. Sidebar rows,
       the browse-panel frame (border/radius/padding) and all
       geometry are untouched.
   (2) 3D BADGE CARDS, browse grid only: vertical charcoal gradient
       (lighter top, near-black bottom) + top sheen layer + inset
       top highlight + soft drop shadow, thin light border. Beats
       the #19 white-glass surface. Radius, padding, gaps and the
       logo/label geometry are untouched. Hover/focus/active keep
       the established #19 cyan glow (same chain, border + glow
       only — the 3D surface stays).
   (3) SELECTIVE WHITE STROKE: the #66 soft-glow filter is replaced
       by an 8-way zero-blur white drop-shadow stack, applied ONLY
       to logo spans the #66 detector marked .iptv365-dark-logo
       (near-black logos, pixel-sampled; detector JS untouched).
       Grid mode (same selector as the #66 L3427 rule, later
       position wins) AND list mode (matching chain) — unmarked
       coloured logos keep their existing filter, untouched.
   The #129 country grid keeps its own border/shadow/geometry
   (higher chain); it inherits the black backdrop, the 3D card
   gradient and the stroke, which match its look. Playing-view
   halos (#46), Movies, Series, dashboard and login untouched.
   CORS HONEST NOTE: the detector reloads each logo with
   crossOrigin='anonymous'; if the panel serves logos without
   Access-Control-Allow-Origin the canvas taints, nothing is
   marked, and dark logos get no stroke. No client-side
   workaround exists; unproven against the live panel.
   ================================================================ */
/* --- (1) Change #196: the #142 solid black backdrop is superseded by
       the global background image (owner order, 2026-11-16). The
       workspace alone paints the image (one continuous backdrop);
       the inner panes go transparent so it shows through. The 3D
       card, stroke and frame rules below are untouched. --- */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)):not(.iptv365-never) {
  background-color: #000000 !important;
  background-image: var(--iptv365-global-bg) !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-layout:not(.iptv365-never),
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-content:not(.iptv365-never),
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar:not(.iptv365-never) {
  background-color: transparent !important;
  background-image: none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #liveBrowsePanel:not(.hidden):not(.iptv365-never) {
  background-color: transparent !important;
  background-image: none !important;
}
/* --- (2) 3D raised glossy-badge cards, browse grid only. --- */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card:not(.iptv365-never) {
  background:
    linear-gradient(180deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.04) 30%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, #2a2a30 0%, #17171b 45%, #0a0a0c 100%) !important;
  background-color: #141417 !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    inset 0 -1px 0 rgba(0,0,0,.55),
    0 10px 22px rgba(0,0,0,.55),
    0 2px 6px rgba(0,0,0,.45) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card:hover:not(.iptv365-never),
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card:focus:not(.iptv365-never),
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card:focus-visible:not(.iptv365-never),
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card.active:not(.iptv365-never) {
  border-color: rgba(0,195,255,.85) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 0 0 1px rgba(0,195,255,.35),
    0 0 18px rgba(0,170,255,.45),
    0 10px 22px rgba(0,0,0,.55) !important;
}
/* --- (3a) White stroke, grid mode: same selector as #66, later wins. --- */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.live-list-mode) > .iptv-channel-card .iptv-channel-logo.iptv365-dark-logo img {
  filter: drop-shadow(1px 0 0 rgba(255,255,255,.95)) drop-shadow(-1px 0 0 rgba(255,255,255,.95)) drop-shadow(0 1px 0 rgba(255,255,255,.95)) drop-shadow(0 -1px 0 rgba(255,255,255,.95)) drop-shadow(1px 1px 0 rgba(255,255,255,.95)) drop-shadow(-1px 1px 0 rgba(255,255,255,.95)) drop-shadow(1px -1px 0 rgba(255,255,255,.95)) drop-shadow(-1px -1px 0 rgba(255,255,255,.95)) !important;
}
/* --- (3b) White stroke, list mode: matching chain. --- */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.live-list-mode > .iptv-channel-card .iptv-channel-logo.iptv365-dark-logo img {
  filter: drop-shadow(1px 0 0 rgba(255,255,255,.95)) drop-shadow(-1px 0 0 rgba(255,255,255,.95)) drop-shadow(0 1px 0 rgba(255,255,255,.95)) drop-shadow(0 -1px 0 rgba(255,255,255,.95)) drop-shadow(1px 1px 0 rgba(255,255,255,.95)) drop-shadow(-1px 1px 0 rgba(255,255,255,.95)) drop-shadow(1px -1px 0 rgba(255,255,255,.95)) drop-shadow(-1px -1px 0 rgba(255,255,255,.95)) !important;
}

/* Change #162: thinner stage overlays (user order 2026-11-16, from his
   playing-view screenshot). Same selectors as the #22 rules above, later
   in the file, so these win ties; every property keeps !important.
   LIVE badge: much smaller + thinner, still red and readable. Channel
   pill: lighter + slightly smaller text, more transparent background,
   softer border — it covers less of the picture. Positions, max-width,
   pill radius and pointer-events are unchanged; nothing else in the
   playing view is touched. The #161 cast button is a separate element
   and is not affected. */
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-stage-live {
  border-radius:5px !important;
  padding:2px 7px !important;
  font-size:9px !important;
  font-weight:700 !important;
  letter-spacing:.6px !important;
}
html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden) #livePlaybackPanel .iptv365-stage-chip {
  background:rgba(0,0,0,.38) !important;
  border:1px solid rgba(255,255,255,.18) !important;
  padding:5px 12px !important;
  font-size:11.5px !important;
  font-weight:500 !important;
}

/* ================================================================
   Change #178 (2026-11-16): the country-grid window loses the P1
   grid/list view toggle and gains #166-style density +/− buttons.
   Scope: ONLY the #129 country-grid visit — every rule below
   requires .iptv365-country-grid on #liveWorkspaceScreen inside
   the portrait browse scope, so the main Live TV section,
   desktop/landscape/TV and the playing view are untouched. The
   toggle node itself is left in place (dashboard-design.js owns
   it); it is hidden here and reappears the moment the visit
   ends, because the class is cleared on every other Live entry.
   The +/− buttons are appended into the P1 heading by app.js;
   they paint only in this scope. Density classes live on the
   screen: no class = 2 columns (the default since Change #179);
   .iptv365-country-density-3 = 3; .iptv365-country-density-4
   = 4 (the original #129 4-column geometry). The extra class
   lifts specificity one point above the #129 rules, so the
   column count + logo scale win. Logos scale
   with the density — that is the point of the buttons.
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  /* 1. Hide the P1 view toggle in this window only. */
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) .iptv365-p1-viewtoggle:not(.iptv365-never) {
    display: none !important;
  }
  /* 2. Density buttons: plain gold symbols, #166 style. They exist
     in the heading in every P1 visit but paint only here. */
  html body #liveWorkspaceScreen .iptv365-country-density:not(.iptv365-never) {
    display: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) .iptv365-country-density:not(.iptv365-never) {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-density-btn:not(.iptv365-never) {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #ffe27a !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 11px 10px !important;
    margin: 0 !important;
    cursor: pointer !important;
    text-shadow: 0 1px 4px rgba(0,0,0,.5) !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-density-btn:active:not(.iptv365-never) {
    color: #fff !important;
  }
  /* 3a. Three columns: wider cards, larger logos. */
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-3:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-3:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-3:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card:not(.iptv365-never) {
    min-height: 128px !important;
    padding: 12px 8px 10px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-3:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo:not(.iptv365-never) {
    flex: 0 0 56px !important;
    height: 56px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-3:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo img {
    max-height: 54px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-3:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo .iptv-logo-fallback:not(.iptv365-never) {
    font-size: 24px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-3:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-label:not(.iptv365-never) {
    font-size: 11px !important;
    height: 28px !important;
    max-height: 28px !important;
  }
  /* 3b. Four columns: the original #129 geometry (smallest cards).
     Change #179: 4 is now an explicit density class; the no-class
     default is 2 columns (see the #129 rules above). */
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-4:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-4:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-4:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card:not(.iptv365-never) {
    min-height: 114px !important;
    padding: 10px 6px 8px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-4:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo:not(.iptv365-never) {
    flex: 0 0 46px !important;
    height: 46px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-4:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo img {
    max-height: 44px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-4:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-logo .iptv-logo-fallback:not(.iptv365-never) {
    font-size: 22px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid.iptv365-country-density-4:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv-channel-card .iptv-channel-label:not(.iptv365-never) {
    font-size: 10px !important;
    height: 25px !important;
    max-height: 25px !important;
  }
}

/* ================================================================
   Change #179 (2026-11-16): footer line at the bottom of the
   country-grid window. The footer is appended by
   renderLiveChannels (app.js) after the last channel card; it
   spans the full grid width and opens the main Live TV section
   on tap. Scope: ONLY the #129 country-grid visit in the
   portrait browse scope — the same chain as #129/#178 — so it
   never renders in main Live TV, desktop/landscape/TV, or the
   playing view (the JS gate requires the country-grid class +
   the portrait media query as well). The grid's own bottom
   padding (96px) keeps the footer clear of the bottom bar.
   ================================================================ */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv365-country-grid-footer:not(.iptv365-never) {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 52px !important;
    margin: 8px 0 0 !important;
    padding: 14px 12px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #ffe27a !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-align: center !important;
    cursor: pointer !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv365-country-grid-footer:active:not(.iptv365-never) {
    color: #ffffff !important;
  }
}

/* ===== Change #188 (owner-approved PreviewGeo 1-3): Live TV auto
   geo order — group headers, the "Your country first" strip, and
   per-group row numbers in the sidebar. These rules only match
   nodes the grouped render creates, so the flat list (Sort By
   set, no detection, demo) is untouched. The headers/strip are
   direct children of #livePanelList, so they must override the
   `#livePanelList > *` row paint (background/border/min-height)
   with a longer chain, placed after it. ===== */
html body #liveWorkspaceScreen:not(.hidden) #livePanelList > .iptv365-geo-strip:not(.iptv365-never) {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 2px 0 4px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(212, 175, 55, .45) !important;
  border-radius: 10px !important;
  background: rgba(212, 175, 55, .10) !important;
  box-shadow: none !important;
  color: #ffe27a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList .iptv365-geo-strip-text:not(.iptv365-never) {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  line-height: 1.35 !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList .iptv365-geo-strip-auto:not(.iptv365-never) {
  flex: 0 0 auto !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: #d4af37 !important;
  color: #111 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: .06em !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList > .iptv365-geo-group-head:not(.iptv365-never) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 8px 0 0 !important;
  padding: 6px 4px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList .iptv365-geo-group-icon:not(.iptv365-never) {
  flex: 0 0 auto !important;
  font-size: 16px !important;
  line-height: 1 !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList .iptv365-geo-group-name:not(.iptv365-never) {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList .iptv365-geo-group-count:not(.iptv365-never) {
  flex: 0 0 auto !important;
  min-width: 22px !important;
  padding: 2px 7px !important;
  border: 1px solid rgba(165, 183, 193, .36) !important;
  border-radius: 20px !important;
  background: rgba(180, 205, 218, .08) !important;
  color: #b8cbd4 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-align: center !important;
}
html body #liveWorkspaceScreen:not(.hidden) #livePanelList .iptv-category-row .iptv365-geo-row-num:not(.iptv365-never) {
  flex: 0 0 auto !important;
  min-width: 20px !important;
  text-align: right !important;
  color: rgba(255, 255, 255, .55) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

/* ===== Change #188: priority chips — two rows in the portrait
   playing view (live sessions only; the container carries
   .iptv365-playview-chips--priority, so the demo single row
   keeps the earlier rules byte-identically). Same selector chain
   as the #111 chips rules, plus the modifier class. ===== */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chips.iptv365-playview-chips--priority:not(.iptv365-never) {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    padding: 2px 2px 4px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chips-row:not(.iptv365-never) {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    padding: 2px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv365-playview-chips-row::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}

/* ===== Change #190 (#180): ONE search button in the country-grid
   window's P1 heading row + ONE filter field below it (owner
   correction: never repeated per category). Same scoping pattern
   as the #178/#179 density rules: the button exists in the
   heading in every P1 visit but paints only in this window; the
   field paints only while open in this window. ===== */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen .iptv365-country-search-btn:not(.iptv365-never) {
    display: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) .iptv365-country-search-btn:not(.iptv365-never) {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #ffe27a !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    text-shadow: 0 1px 4px rgba(0,0,0,.5) !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-search-field:not(.iptv365-never) {
    display: none !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) .iptv365-country-search-field.is-open:not(.iptv365-never) {
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-search-box:not(.iptv365-never) {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 42px !important;
    padding: 0 6px 0 12px !important;
    border: 1px solid rgba(212, 175, 55, .55) !important;
    border-radius: 12px !important;
    background: rgba(0, 0, 0, .45) !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-search-input:not(.iptv365-never) {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 15px !important;
    font-family: inherit !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-search-input:not(.iptv365-never)::placeholder {
    color: rgba(255, 255, 255, .55) !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-search-input:not(.iptv365-never)::-webkit-search-cancel-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: none !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-search-clear:not(.iptv365-never) {
    -webkit-appearance: none !important;
    appearance: none !important;
    flex: 0 0 auto !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .12) !important;
    color: #fff !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-search-count:not(.iptv365-never) {
    padding: 7px 4px 0 !important;
    color: rgba(255, 255, 255, .72) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
  }
  html body #liveWorkspaceScreen .iptv365-country-search-count.hidden:not(.iptv365-never) {
    display: none !important;
  }
}

/* ===== Change #195: per-category sub-headers inside the aggregated
   country-grid window. Same scoping chain as the #129/#178/#179/
   #190 rules (portrait browse scope + .iptv365-country-grid), so
   the main Live TV section, desktop/landscape/TV and the playing
   view are untouched. Each sub-header spans the full grid width
   (grid-column: 1 / -1, like the #179 footer) at every density,
   so it never sits inside a card column. The label is the
   category name with the country prefix stripped (the window
   heading already names the country); the count is the visible
   channel count in that group. ===== */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv365-country-grid-subhead:not(.iptv365-never) {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 2px 6px !important;
    border-bottom: 1px solid rgba(212, 175, 55, .28) !important;
    color: #ffe27a !important;
    font: 800 14px/1.3 Inter, Arial, sans-serif !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv365-country-grid-subhead:not(:first-child):not(.iptv365-never) {
    margin-top: 6px !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv365-country-grid-subhead .iptv365-country-grid-subhead-name:not(.iptv365-never) {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-country-grid:not(.hidden):not(.iptv365-never):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid > .iptv365-country-grid-subhead .iptv365-country-grid-subhead-count:not(.iptv365-never) {
    flex: 0 0 auto !important;
    color: rgba(255, 255, 255, .72) !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
  }
}

/* Change #197 — DESKTOP LIVE TV SIDEBAR, RAINBOW GLASS ON CHARCOAL.
   Owner pick: PreviewSidebar-2 "Rainbow Glass" + charcoal correction
   (2026-11-16, "charcoal colour, pure black nahi"). Desktop ONLY:
   @media (min-width: 951px) complements the portrait MQ
   (max-width: 950px + portrait), so the P1 sidebar is untouched.
   Browse scope only (:has(#liveBrowsePanel:not(.hidden))), like #45,
   so the PLAYING view sidebar is untouched. Charcoal is #232323,
   opaque, on the whole sidebar column from the toolbar down,
   INCLUDING the Search category box area — the burgundy #196
   artwork must not show through. Plain rows go FLAT (no fill, no
   border) so separation shows ONLY on hover / keyboard focus, as
   previewed. The #86 rainbow selected pill is NOT restyled: the
   flat/hover/focus rules exclude .active / [aria-pressed="true"] /
   .selected, and the #86/#128 selected rules keep winning by
   specificity. Hover/focus: pink/purple glow outline via box-shadow
   ring + glow, NO fill, NO border (plain rows compute 0-width
   borders). Deliberately NOT gated on (hover:hover) so real-pointer
   hover is provable headlessly via CDP. The search box keeps its
   gold outline, gold icon, white text and readable placeholder —
   only its fill becomes charcoal. The sidebar's 1px right edge,
   gold scrollbar, group headers, strip and count badges are
   unchanged. */@media (min-width: 951px) {
  /* 1. Opaque charcoal column, toolbar down, incl. search area. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar:not(.iptv365-never) {
    background-color: #232323 !important;
    background-image: none !important;
  }
  /* List stays transparent so the charcoal shows through; tighter gap. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList:not(.iptv365-never) {
    background-color: transparent !important;
    background-image: none !important;
    gap: 4px !important;
  }
  /* 2. All rows: ~52px tall (base was 50px; pitch 58px -> 56px). */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row:not(.iptv365-never) {
    min-height: 52px !important;
  }
  /* 3. Flat plain rows: no fill, no border, no shadow. Selected rows
     are excluded, so the #86 rainbow pill paints untouched. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row:not(.active):not([aria-pressed="true"]):not(.selected):not(.iptv365-never) {
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  /* 4. Hover + keyboard focus: pink/purple glow outline, NO fill.
     Ring via box-shadow so no layout shift and borders stay 0. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row:not(.active):not([aria-pressed="true"]):not(.selected):hover:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row:not(.active):not([aria-pressed="true"]):not(.selected):focus-visible:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #livePanelList .iptv-category-row:not(.active):not([aria-pressed="true"]):not(.selected):focus:not(.iptv365-never) {
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: 0 0 0 1px rgba(255, 45, 149, 0.85), 0 0 12px rgba(255, 45, 149, 0.45), 0 0 24px rgba(138, 43, 226, 0.30) !important;
  }
  /* 5. Search box: charcoal fill only; gold outline/text kept. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-search-action:not(.iptv365-never) {
    background-color: #232323 !important;
    background-image: none !important;
  }
}

/* Change #202 — SIDEBAR CHARCOAL TO THE TOOLBAR (browse + playing).
   Owner correction to #197 (2026-11-16, after seeing #197 live):
   the charcoal sidebar must touch the top toolbar exactly — no
   burgundy strip between the toolbar bottom and the sidebar top.
   The search box and rows STAY in place; only the charcoal fill
   extends upward. Grid view untouched. Desktop ONLY
   (@media (min-width: 951px)), portrait untouched.
   Measured gap owners (harness, 1280x720 + 1920x1080, both views):
   (a) the workspace flex gap: 10px (premium-unified.css #43-era
   rule, gap:10px !important) between the global header (69px) and
   the layout; (b) the layout's padding-top: 12px; (c) in the
   PLAYING view only, the layout's margin-top: 12px (#21-era rule;
   #43 zeroes it in browse scope only). So the strip is 22px in
   browse (10 + 12) and 34px in playing (10 + 12 + 12), and the
   strip pixels are the burgundy #196 artwork showing through the
   transparent workspace/layout backgrounds (elementFromPoint hits
   the workspace section, then the layout div).
   Fix, per scope: remove the gap above the layout (gap 0, and in
   playing also margin-top 0), give the layout back the SAME total
   as extra padding-top (22px browse / 34px playing) so the grid
   column and the sidebar's grid area do not move by a single
   pixel, then extend the sidebar's own box upward by exactly that
   amount (negative margin-top + equal padding-top + matching
   height, border-box) so its charcoal background paints the strip
   while the search box and every row keep their exact rects.
   Playing view (refined order, 2026-11-16 18:49): the left channel
   list gets the SAME #197 treatment — opaque charcoal #232323,
   flat rows (no fill, no border lines, no shadows), same
   pink/purple glow outline on hover/focus, no fill. The playing
   (.active) row is EXCLUDED, so its rainbow pill paints untouched
   (same rule as #197). Row geometry (grid columns, min-height,
   padding, gap), the Back button, the list gap/padding, the video
   stage and the right channel card are untouched. The playing
   search box keeps its outline — only its fill is charcoal (it
   already computes charcoal; the rule is a safeguard). The
   heart/favourite affordance element is untouched (display:none
   on desktop, shown only by the portrait rule). The two :has()
   scopes are mutually exclusive in the real flow (verified:
   browse panel .hidden while playing and vice versa), so the
   22px/34px compensations can never mix. */
@media (min-width: 951px) {
  /* BROWSE: close the 10px workspace gap; layout padding-top
     12px -> 22px keeps the sidebar grid area + grid column put. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)):not(.iptv365-never) {
    gap: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-layout:not(.iptv365-never) {
    margin-top: 0 !important;
    padding-top: 22px !important;
  }
  /* BROWSE: sidebar box extends 22px up; content stays in place. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#liveBrowsePanel:not(.hidden)) .iptv-live-sidebar:not(.iptv365-never) {
    margin-top: -22px !important;
    padding-top: 22px !important;
    height: calc(100% + 22px) !important;
    box-sizing: border-box !important;
  }
  /* PLAYING: close the 10px gap AND the 12px layout margin-top;
     layout padding-top 12px -> 34px keeps every content rect put. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)):not(.iptv365-never) {
    gap: 0 !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv-live-layout:not(.iptv365-never) {
    margin-top: 0 !important;
    padding-top: 34px !important;
  }
  /* PLAYING: sidebar box extends 34px up + opaque charcoal. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv-live-sidebar:not(.iptv365-never) {
    margin-top: -34px !important;
    padding-top: 34px !important;
    height: calc(100% + 34px) !important;
    box-sizing: border-box !important;
    background-color: #232323 !important;
    background-image: none !important;
  }
  /* PLAYING: list panel transparent, no border lines, no shadow.
     Border->padding swap keeps every row rect identical: the
     panel's 1px border occupied space, so removing it would grow
     the content box by 1px per side; growing the padding by 1px
     (top 0->1, sides 5->6) restores the exact pre-change content
     box, so rows and their contents do not move. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList:not(.iptv365-never) {
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding-top: 1px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  /* PLAYING: flat plain channel rows. The playing (.active) row
     is excluded, so the rainbow pill paints untouched. Padding
     8px 12px -> 9px 13px is the border->padding swap: it keeps
     each row's outer box and its number/logo/name positions
     pixel-identical to the bordered state. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel:not(.active):not([aria-pressed="true"]):not(.selected):not(.iptv365-never) {
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 9px 13px !important;
  }
  /* PLAYING: hover + keyboard focus, same glow as #197, no fill. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel:not(.active):not([aria-pressed="true"]):not(.selected):hover:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel:not(.active):not([aria-pressed="true"]):not(.selected):focus-visible:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) #livePanelList > .iptv-sidebar-channel:not(.active):not([aria-pressed="true"]):not(.selected):focus:not(.iptv365-never) {
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: 0 0 0 1px rgba(255, 45, 149, 0.85), 0 0 12px rgba(255, 45, 149, 0.45), 0 0 24px rgba(138, 43, 226, 0.30) !important;
  }
  /* PLAYING: search box charcoal fill only; outline untouched. */
  html body #liveWorkspaceScreen.iptv-live-screen:not(.hidden):has(#livePlaybackPanel:not(.hidden)) .iptv-live-search-action:not(.iptv365-never) {
    background-color: #232323 !important;
    background-image: none !important;
  }
}

/* #248 Live TV grid glass cards (owner order 2026-11-18): grid-mode
   channel cards — NO gold line, solid BLACK, THIN transparent glass
   ring + faint top sheen, logo ~18% smaller. Portrait grid mode only:
   scope requires .iptv365-p1-grid + browse panel visible, so list mode,
   playing view and desktop cannot match. Chains (3,11,2)/(3,12,2) beat
   the gold rule (3,8,2) above and the galaxy glass rules. No
   backdrop-filter: it does nothing on opaque black. */
@media (max-width: 950px) and (orientation: portrait) {
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) > .iptv-channel-card.iptv-channel-card.iptv-channel-card.iptv-channel-card:not(.iptv365-never),
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) > .iptv-channel-card.iptv-channel-card.iptv-channel-card.iptv-channel-card:not(.iptv365-never):hover,
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) > .iptv-channel-card.iptv-channel-card.iptv-channel-card.iptv-channel-card:not(.iptv365-never):focus-visible,
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) > .iptv-channel-card.iptv-channel-card.iptv-channel-card.iptv-channel-card:not(.iptv365-never):focus,
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) > .iptv-channel-card.iptv-channel-card.iptv-channel-card.iptv-channel-card:not(.iptv365-never):active {
    box-sizing: border-box !important;
    background: #000000 !important;
    background-color: #000000 !important;
    background-image: none !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16) !important;
  }
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) > .iptv-channel-card.iptv-channel-card.iptv-channel-card.iptv-channel-card:not(.iptv365-never) .iptv-channel-logo img,
  html body #liveWorkspaceScreen.iptv-live-screen.iptv365-p1-grid:not(.hidden):has(#liveBrowsePanel:not(.hidden)) #liveChannelGrid.has-channel-cards:not(.iptv365-never) > .iptv-channel-card.iptv-channel-card.iptv-channel-card.iptv-channel-card:not(.iptv365-never) .iptv-channel-logo .iptv-logo-fallback img {
    max-width: 74% !important;
    max-height: 49px !important;
  }
}
