/* Cine Movie Engine – Streaming Design: full-screen watch player */

/* ================================================================ watch mode: the video fills the window */
html.cmes-watching, html.cmes-watching body { overflow: hidden !important; margin-top: 0 !important; }
html.cmes-watching #cmes-side, html.cmes-watching #wpadminbar, html.cmes-watching #masthead,
html.cmes-watching .hello-movieengine-bottom-nav, html.cmes-watching .cmes-dh, html.cmes-watching #cmes-backdrop { display: none !important; }
html.cmes-watching #page > * { z-index: auto !important; }
html.cmes-watching body { background: #000 !important; }

.cmes-watchbox, html.cmes-ep .movie-engine-player-wrapper {
  position: fixed !important; inset: 0 !important; z-index: 2147480000 !important;
  width: 100vw !important; height: 100vh !important; height: 100dvh !important; max-width: none !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: #000 !important; display: flex !important; flex-direction: column !important; overflow: hidden !important;
}
.cmes-watchbox .movie-engine-player-wrapper, html.cmes-ep .movie-engine-player-wrapper .movie-engine-player-wrapper { position: static !important; display: contents !important; }
.cmes-watchbox .movie-engine-player-screen-area, html.cmes-ep .movie-engine-player-wrapper .movie-engine-player-screen-area {
  flex: 1 1 auto !important; position: relative !important; min-height: 0 !important; height: auto !important; width: 100% !important; margin: 0 !important; border-radius: 0 !important; background: #000 !important;
}
.cmes-watchbox .movie-engine-player-container, html.cmes-ep .movie-engine-player-wrapper .movie-engine-player-container {
  position: absolute !important; inset: 0 !important; height: auto !important; padding: 0 !important; aspect-ratio: auto !important; border-radius: 0 !important; background: #000 !important;
}
.cmes-watchbox iframe, html.cmes-ep .movie-engine-player-wrapper iframe { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; border: 0 !important; }
.cmes-watchbox .me-paywall-container, html.cmes-ep .movie-engine-player-wrapper .me-paywall-container { margin: auto !important; position: relative; z-index: 2; }
.cmes-watchbox .movie-engine-server-switcher, html.cmes-ep .movie-engine-player-wrapper .movie-engine-server-switcher {
  position: absolute !important; left: 50%; top: 22px; transform: translateX(-50%); z-index: 6; background: transparent !important; border: 0 !important; padding: 0 !important;
}
body.cmes.cmes-pl-on .movie-engine-server-switcher { display: none !important; }

/* Back + title over paywalls and over servers that keep their own controls */
.cmes-wbar { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 20px 28px 40px;
  background: linear-gradient(rgba(0,0,0,.65), transparent); pointer-events: none; font-family: var(--cmes-font); color: #fff; }
body.cmes-pl-on .cmes-wbar { display: none; }
.cmes-wback { pointer-events: auto; width: 42px; height: 42px; padding: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; transition: background-color .2s; }
.cmes-wback:hover { background: rgba(255,255,255,.18); }
.cmes-wback svg { width: 100%; height: 100%; display: block; }
.cmes-wt b { display: block; font: 700 19px/1.2 var(--cmes-font); }
.cmes-wt span { display: block; font: 500 13px/1.2 var(--cmes-font); color: rgba(255,255,255,.65); margin-top: 3px; }

/* ================================================================ the player controls */
.cmes-pbox { position: relative !important; overflow: hidden; background: #000; }
.cmes-pl { position: absolute; inset: 0; z-index: 30; font-family: var(--cmes-font, system-ui); color: #fff; cursor: none; outline: none; -webkit-tap-highlight-color: transparent; user-select: none; }
.cmes-pl.show, .cmes-pl.paused, .cmes-pl.loading, .cmes-pl.has-panel, .cmes-pl.has-drawer { cursor: default; }
.cmes-pl.cmes-pl-off { display: none !important; }
.cmes-pl button { font-family: inherit; }
.cmes-pl svg { width: 100%; height: 100%; display: block; }

/* while it starts: the picture, a title card and a spinner */
.cmes-pl-cover { position: absolute; inset: 0; background: #000 center / cover no-repeat; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.cmes-pl-cover::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.72); }
.cmes-pl.cold .cmes-pl-cover { opacity: 1; }
.cmes-pl-card { position: absolute; left: 28px; top: 92px; padding-left: 16px; border-left: 3px solid #fff; opacity: 0; transform: translateX(-10px); transition: opacity .5s, transform .6s var(--cmes-ease); pointer-events: none; }
.cmes-pl.cold .cmes-pl-card { opacity: 1; transform: none; }
.cmes-pl-card b { display: block; font: 800 26px/1.15 var(--cmes-font); }
.cmes-pl-card span { display: block; margin-top: 6px; font: 600 15px/1.2 var(--cmes-font); color: rgba(255,255,255,.75); }
.cmes-pl-card span:empty { display: none; }

/* shading */
.cmes-pl-shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: linear-gradient(180deg, rgba(0,0,0,.72) 0%, transparent 20%, transparent 62%, rgba(0,0,0,.88) 100%); }
.cmes-pl-top, .cmes-pl-bottom { position: absolute; left: 0; right: 0; opacity: 0; transition: opacity .35s, transform .45s var(--cmes-ease); }
.cmes-pl-top { top: 0; display: flex; align-items: center; gap: 14px; padding: 18px 26px; transform: translateY(-10px); }
.cmes-pl-bottom { bottom: 0; padding: 0 26px 16px; transform: translateY(10px); }
.cmes-pl.show .cmes-pl-shade, .cmes-pl.paused .cmes-pl-shade, .cmes-pl.has-panel .cmes-pl-shade, .cmes-pl.has-drawer .cmes-pl-shade,
.cmes-pl.show .cmes-pl-top, .cmes-pl.paused .cmes-pl-top, .cmes-pl.has-panel .cmes-pl-top,
.cmes-pl.show .cmes-pl-bottom, .cmes-pl.paused .cmes-pl-bottom, .cmes-pl.has-panel .cmes-pl-bottom, .cmes-pl.has-drawer .cmes-pl-bottom { opacity: 1; transform: none; }
.cmes-pl.cold .cmes-pl-top { opacity: 1; transform: none; }
.cmes-pl.cold .cmes-pl-bottom { opacity: 0 !important; pointer-events: none; }

/* top bar */
.cmes-pl-backb { width: 42px; height: 42px; padding: 10px; flex: none; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: background-color .2s; }
.cmes-pl-backb:hover { background: rgba(255,255,255,.14); }
.cmes-pl-title { flex: 1; min-width: 0; }
.cmes-pl-title b { display: block; font: 700 19px/1.2 var(--cmes-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.cmes-pl-title span { display: block; margin-top: 3px; font: 500 13px/1.2 var(--cmes-font); color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmes-pl.cold .cmes-pl-title { visibility: hidden; }
.cmes-pl-tr { display: flex; align-items: center; gap: 6px; }
.cmes-pl-tbtn { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; white-space: nowrap;
  font: 700 15px/1 var(--cmes-font); transition: background-color .2s; }
.cmes-pl-tbtn:hover, .cmes-pl-tbtn.on { background: rgba(255,255,255,.12); }
.cmes-pl-tbtn svg { width: 22px; height: 22px; flex: none; }
.cmes-pl-tbtn em { font-style: normal; font-weight: 500; color: rgba(255,255,255,.55); }
.cmes-pl-tbtn em:empty { display: none; }

/* seek line with time left */
.cmes-pl-trackrow { display: flex; align-items: center; gap: 16px; }
.cmes-pl-track { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; }
.cmes-pl-rail, .cmes-pl-fill, .cmes-pl-hov, .cmes-pl-seg { position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; transition: height .2s, margin-top .2s; }
.cmes-pl-rail { right: 0; background: rgba(255,255,255,.25); }
.cmes-pl-hov { width: 0; background: rgba(255,255,255,.3); opacity: 0; transition: opacity .2s, height .2s, margin-top .2s; }
.cmes-pl-fill { width: 0; background: #fff; z-index: 2; }
.cmes-pl-seg { background: rgba(255,211,77,.8); z-index: 1; border-radius: 0; }
.cmes-pl-seg.cr { background: rgba(255,255,255,.45); }
.cmes-pl-knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; z-index: 3; transform: scale(0); transition: transform .2s var(--cmes-ease); }
.cmes-pl-tip { position: absolute; bottom: 24px; transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; background: rgba(15,15,18,.92); font: 700 12px/1 var(--cmes-font); opacity: 0; pointer-events: none; transition: opacity .15s; white-space: nowrap; }
.cmes-pl-track:hover .cmes-pl-rail, .cmes-pl-track:hover .cmes-pl-fill, .cmes-pl-track:hover .cmes-pl-hov, .cmes-pl-track:hover .cmes-pl-seg,
.cmes-pl.dragging .cmes-pl-rail, .cmes-pl.dragging .cmes-pl-fill, .cmes-pl.dragging .cmes-pl-seg { height: 6px; margin-top: -3px; }
.cmes-pl-track:hover .cmes-pl-knob, .cmes-pl.dragging .cmes-pl-knob { transform: scale(1); }
.cmes-pl-track:hover .cmes-pl-tip, .cmes-pl-track:hover .cmes-pl-hov, .cmes-pl.dragging .cmes-pl-tip { opacity: 1; }
.cmes-pl-left { min-width: 64px; text-align: right; font: 700 17px/1 var(--cmes-font); font-variant-numeric: tabular-nums; }

/* button row: controls left, Episodes / More Like This centre, settings right */
.cmes-pl-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.cmes-pl-l, .cmes-pl-r { display: flex; align-items: center; gap: 6px; }
.cmes-pl-row button { width: 46px; height: 46px; padding: 10px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; transition: background-color .15s, transform .25s var(--cmes-ease); }
.cmes-pl-row button[hidden] { display: none !important; }
.cmes-pl-row button:hover, .cmes-pl-row button:focus-visible { background: rgba(255,255,255,.14); outline: none; }
.cmes-pl-row button:active { transform: scale(.92); }
.cmes-pl-row button[data-a="play"] { padding: 9px; }
.cmes-pl-more { position: absolute; left: 50%; transform: translateX(-50%); width: auto !important; height: 42px !important; padding: 0 16px !important; border-radius: 999px !important;
  display: inline-flex !important; align-items: center; gap: 8px; font: 700 16px/1 var(--cmes-font); white-space: nowrap; }
.cmes-pl-more:active { transform: translateX(-50%) scale(.96) !important; }
.cmes-pl-more svg { width: 18px; height: 18px; transition: transform .3s var(--cmes-ease); }
.cmes-pl-more.open svg { transform: rotate(180deg); }
.cmes-pl-nextb { width: auto !important; border-radius: 999px !important; padding: 0 16px 0 12px !important; display: inline-flex !important; align-items: center; gap: 8px; font: 700 14px/1 var(--cmes-font); }
.cmes-pl-nextb svg { width: 20px; height: 20px; }

/* centre: big play, spinner, flash */
.cmes-pl-big { position: absolute; left: 50%; top: 50%; width: 86px; height: 86px; margin: -43px 0 0 -43px; padding: 25px 23px 25px 28px; border-radius: 50%; border: 0; cursor: pointer;
  color: #000; background: rgba(255,255,255,.95); box-shadow: 0 10px 40px rgba(0,0,0,.45);
  opacity: 0; transform: scale(.8); pointer-events: none; transition: opacity .3s, transform .4s var(--cmes-ease); }
.cmes-pl.paused:not(.loading):not(.has-drawer) .cmes-pl-big { opacity: 1; transform: none; pointer-events: auto; }
.cmes-pl.paused:not(.loading) .cmes-pl-big:hover { transform: scale(1.06); }
.cmes-pl-load { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cmes-pl.loading .cmes-pl-load { opacity: 1; }
.cmes-pl-spin { width: 56px; height: 56px; border-radius: 50%; border: 4px solid rgba(255,255,255,.14); border-top-color: #fff; animation: cmesSpin .85s linear infinite; }
@keyframes cmesSpin { to { transform: rotate(360deg); } }
.cmes-pl-flash { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 19px; border-radius: 50%; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; }
.cmes-pl-flash.go { animation: cmesFlash .6s ease-out; }
@keyframes cmesFlash { 0% { opacity: 1; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes cmesPlUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* skip intro / next episode */
/* Sits exactly over the embedded player's own skip button (right 20px, bottom 96px), which can't be switched off. */
.cmes-pl-skipw { position: absolute; right: 14px; bottom: 90px; z-index: 4; transition: opacity .2s; }
.cmes-pl.has-drawer .cmes-pl-skipw { opacity: 0; pointer-events: none; }
.cmes-pl-skip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; height: 52px; padding: 0 24px; border-radius: 10px; border: 0; cursor: pointer;
  background: #fff; color: #000; font: 800 15px/1 var(--cmes-font); box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: cmesPlUp .45s var(--cmes-ease) both; transition: transform .2s var(--cmes-ease), background-color .2s; }
.cmes-pl-skip svg { width: 16px; height: 16px; }
.cmes-pl-skip:hover { background: #e9e9ec; transform: scale(1.03); }

/* Quality & Server / Audio & Subtitles / Settings */
.cmes-pl-panel { position: absolute; right: 26px; top: 76px; z-index: 6; max-width: calc(100% - 52px); max-height: calc(100% - 200px); overflow: auto;
  border-radius: 18px; background: rgba(18,18,22,.92); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 24px 60px rgba(0,0,0,.6); animation: cmesPlUp .3s var(--cmes-ease) both; }
.cmes-pl-panel[hidden] { display: none; }
.cmes-pl-panel-set { top: auto; bottom: 96px; }
.cmes-pl-cols { display: flex; gap: 6px; padding: 10px; }
.cmes-pl-grp { min-width: 190px; }
.cmes-pl-gt { padding: 12px 14px 8px; font: 700 12px/1 var(--cmes-font); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.cmes-pl-gl { max-height: 46vh; overflow: auto; }
.cmes-pl-grp button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-radius: 10px; background: transparent; color: rgba(255,255,255,.8); font: 500 15px/1.2 var(--cmes-font); text-align: left; cursor: pointer; }
.cmes-pl-grp button:hover { background: rgba(255,255,255,.08); color: #fff; }
.cmes-pl-grp button svg { width: 16px; height: 16px; flex: none; opacity: 0; }
.cmes-pl-grp button.on { color: #fff; font-weight: 700; }
.cmes-pl-grp button.on svg { opacity: 1; }
.cmes-pl-none { padding: 16px; color: rgba(255,255,255,.55); font-size: 14px; }

/* Episodes / More Like This drawer */
.cmes-pl-drawer { position: absolute; left: 0; right: 0; bottom: 104px; z-index: 5; padding: 0 26px; animation: cmesPlUp .35s var(--cmes-ease) both; }
.cmes-pl-drawer[hidden] { display: none; }
.cmes-pl-dh { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; font: 700 18px/1 var(--cmes-font); }
select.cmes-pl-season { background: rgba(255,255,255,.1) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.18) !important; border-radius: 10px !important; padding: 7px 12px !important; font: 600 14px var(--cmes-font) !important; }
.cmes-pl-strip { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.cmes-pl-strip::-webkit-scrollbar { display: none; }
.cmes-pl-ecard, .cmes-pl-pcard { flex: none; scroll-snap-align: start; color: #fff !important; text-decoration: none !important; }
.cmes-pl-ecard { width: 260px; }
.cmes-pl-ecard .im { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.08); transition: transform .35s var(--cmes-ease), box-shadow .35s; }
.cmes-pl-ecard img, .cmes-pl-pcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmes-pl-ecard .im i { position: absolute; left: 10px; bottom: 10px; padding: 5px 9px; border-radius: 6px; background: #fff; color: #000; font: 800 11px/1 var(--cmes-font); font-style: normal; letter-spacing: .04em; text-transform: uppercase; }
.cmes-pl-ecard.on .im { box-shadow: 0 0 0 2px #fff; }
.cmes-pl-ecard:hover .im, .cmes-pl-pcard:hover { transform: scale(1.04); }
.cmes-pl-ecard em { display: block; margin-top: 10px; font: 700 11px/1 var(--cmes-font); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.cmes-pl-ecard b { display: block; margin-top: 5px; font: 600 15px/1.25 var(--cmes-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmes-pl-pcard { width: 150px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.08); transition: transform .35s var(--cmes-ease); }
.cmes-pl.has-drawer .cmes-pl-shade { background: linear-gradient(180deg, rgba(0,0,0,.72) 0%, transparent 20%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.95) 100%); }

/* up next */
.cmes-pl-end { position: absolute; right: 28px; bottom: 120px; z-index: 7; }
.cmes-pl-end[hidden] { display: none; }
.cmes-pl-endc { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(18,18,22,.94); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 24px 60px rgba(0,0,0,.6); animation: cmesPlUp .4s var(--cmes-ease) both; }
.cmes-pl-endc img { width: 150px; height: 84px; object-fit: cover; border-radius: 10px; }
.cmes-pl-endc .k { font: 700 11px/1 var(--cmes-font); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.cmes-pl-endc .t { font: 700 15px/1.3 var(--cmes-font); margin: 6px 0 10px; max-width: 240px; }
.cmes-pl-endc .b { display: flex; gap: 8px; }
.cmes-pl-endc button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer; font: 700 13px/1 var(--cmes-font); }
.cmes-pl-endc .go { background: #fff; color: #000; }
.cmes-pl-endc .go svg { width: 14px; height: 14px; }
.cmes-pl-endc .no { background: rgba(255,255,255,.12); color: #fff; }

/* phones */
@media (max-width: 700px) {
  .cmes-pl-top { padding: 12px 14px; gap: 8px; }
  .cmes-pl-tbtn span { display: none; }
  .cmes-pl-tbtn em { display: none; }
  .cmes-pl-tbtn { padding: 0 10px; }
  .cmes-pl-title b { font-size: 16px; }
  .cmes-pl-bottom { padding: 0 14px 10px; }
  .cmes-pl-row button { width: 40px; height: 40px; padding: 9px; }
  .cmes-pl-row button[data-a="back"], .cmes-pl-row button[data-a="fwd"] { display: none; }
  .cmes-pl-more { font-size: 14px; padding: 0 12px !important; }
  .cmes-pl-nextb span { display: none; }
  .cmes-pl-nextb { padding: 9px !important; width: 40px !important; }
  .cmes-pl-left { font-size: 14px; min-width: 50px; }
  .cmes-pl-big { width: 66px; height: 66px; margin: -33px 0 0 -33px; padding: 19px 17px 19px 21px; }
  .cmes-pl-card { top: 70px; left: 16px; }
  .cmes-pl-card b { font-size: 20px; }
  .cmes-pl-end { right: 14px; bottom: 96px; }
  .cmes-pl-skipw { right: 6px; bottom: 56px; }
  .cmes-pl-panel { right: 10px; left: 10px; top: 64px; max-width: none; }
  .cmes-pl-cols { flex-direction: column; }
  .cmes-pl-drawer { bottom: 90px; padding: 0 14px; }
  .cmes-pl-ecard { width: 200px; }
  .cmes-pl-pcard { width: 110px; }
  .cmes-pl-endc img { display: none; }
}

/* the area around the player when it is not full screen */
body.cmes .movie-engine-server-btn { border-radius: 999px !important; background: var(--cmes-glass) !important; border: 1px solid var(--cmes-glass-b) !important; color: #fff !important; font-family: var(--cmes-font) !important; transition: background-color .2s !important; }
body.cmes .movie-engine-server-btn.active { background: var(--cmes-accent) !important; border-color: var(--cmes-accent) !important; }
body.cmes .movie-engine-player-wrapper, body.cmes .movie-engine-player-inner { background: transparent !important; }
body.cmes .movie-engine-episode-playlist { background: var(--movie-engine-surface-color) !important; border: 1px solid rgba(255,255,255,.06) !important; border-radius: 16px !important; overflow: hidden; }
body.cmes .movie-engine-episode-playlist a.me-playlist-item { border-radius: 12px !important; margin: 2px 6px !important; border: 0 !important; transition: background-color .15s !important; }
body.cmes .movie-engine-episode-playlist a.me-playlist-item:hover { background: rgba(255,255,255,.06) !important; }
body.cmes .movie-engine-episode-playlist a.me-playlist-item.active { background: color-mix(in srgb, var(--cmes-accent) 20%, transparent) !important; box-shadow: inset 3px 0 0 var(--cmes-accent) !important; }
body.cmes .movie-engine-episode-playlist img { border-radius: 8px !important; }
body.cmes .me-season-select { background-color: rgba(255,255,255,.07) !important; border: 1px solid rgba(255,255,255,.12) !important; border-radius: 10px !important; color: #fff !important; }

select.cmes-pl-season { width: auto !important; max-width: 220px; flex: none; }

/* while our player is starting, the page's own server buttons and loading box stay hidden */
.cmes-watchbox:has(.cmes-pl:not(.cmes-pl-off)) .movie-engine-server-switcher { display: none !important; }
.cmes-watchbox .movie-engine-player-loading, .cmes-watchbox [class*="player-loading"], .cmes-watchbox [class*="loading-player"] { background: transparent !important; }


/* ================================================================ only our play button and spinner
   The embedded player draws its own centre play button (96px) and loading spinner, which can't be
   switched off from outside it: ours sit exactly on top of them, solid, a little bigger. */
.cmes-pl-big { width: 108px !important; height: 108px !important; margin: -54px 0 0 -54px !important; padding: 32px 28px 32px 36px !important;
  background: #fff !important; color: #000 !important; box-shadow: 0 0 0 10px rgba(0,0,0,.35), 0 14px 44px rgba(0,0,0,.55) !important; }
.cmes-pl.paused:not(.loading):not(.has-drawer) .cmes-pl-big { opacity: 1 !important; }
.cmes-pl-load::before { content: ""; position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%;
  background: radial-gradient(circle, #050507 0 60%, rgba(5,5,7,.85) 68%, rgba(5,5,7,0) 72%); }
.cmes-pl-spin { position: relative; z-index: 1; }
/* start-up: our loading screen is fully solid, so the embedded player's own start screen never shows through */
.cmes-pl.cold .cmes-pl-cover { opacity: 1 !important; background-color: #000; }
.cmes-pl.cold { background: #000; }
@media (max-width: 700px) {
  .cmes-pl-big { width: 104px !important; height: 104px !important; margin: -52px 0 0 -52px !important; padding: 30px 26px 30px 34px !important; }
}


/* ================================================================ use the embedded player's own centre play button and spinner */
.cmes-pl .cmes-pl-big, .cmes-pl .cmes-pl-load, .cmes-pl .cmes-pl-flash { display: none !important; }
/* while it starts, its own loading screen shows (ours steps aside) */
.cmes-pl.cold, .cmes-pl.loading.cold { background: transparent !important; }
.cmes-pl.cold .cmes-pl-cover, .cmes-pl.cold .cmes-pl-card { opacity: 0 !important; }


/* ================================================================ other servers (T2, M2…): their own controls; our small corner pill that fades away */
.cmes-plx { position: absolute; top: 64px; left: 20px; z-index: 31; display: flex; align-items: center; gap: 3px; padding: 4px; border-radius: 999px;
  background: rgba(12,12,14,.7); border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0,0,0,.35); opacity: 0; transform: translateY(-4px); transition: opacity .35s ease, transform .35s ease; }
.cmes-plx::before { content: ""; position: absolute; inset: -22px -16px; } /* bring it back when the mouse comes near */
.cmes-plx.show, .cmes-plx:hover, .cmes-plx:focus-within { opacity: 1; transform: none; }
html:not(.cmes-watching) .cmes-plx { display: none; }
.cmes-watchbox:has(.cmes-plx) .movie-engine-server-switcher, .cmes-watchbox:has(.cmes-plx) .cmes-wbar, .cmes-pbox:has(.cmes-plx) .movie-engine-server-switcher { display: none !important; }
.cmes-plx button { position: relative; display: inline-flex !important; align-items: center; gap: 4px; height: 30px; padding: 0 12px !important; border: 0 !important; border-radius: 999px !important; box-shadow: none !important;
  background: transparent !important; color: rgba(255,255,255,.75) !important; font: 700 12px/1 var(--cmes-font, Inter, system-ui, sans-serif) !important; cursor: pointer; transition: background .2s, color .2s; }
.cmes-plx button em { font-style: normal; font-size: 9px; font-weight: 800; opacity: .55; }
.cmes-plx button:hover { background: rgba(255,255,255,.14) !important; color: #fff !important; }
.cmes-plx button.on { background: #fff !important; color: #000 !important; }
.cmes-plx button[data-x] { width: 30px; padding: 0 !important; justify-content: center; color: #fff !important; }
.cmes-plx button[data-x]::after { content: ""; position: absolute; right: -2px; top: 7px; bottom: 7px; width: 1px; background: rgba(255,255,255,.18); }
.cmes-plx button[data-x] { margin-right: 4px; }
.cmes-plx button svg { width: 17px; height: 17px; }
@media (max-width: 767px) {
  .cmes-plx { top: 52px; left: 10px; }
  .cmes-plx button { height: 28px; padding: 0 10px !important; }
}


/* ================================================================ title missing on every server */
.cmes-pl.cmes-pl-isna > :not(.cmes-pl-na):not(.cmes-pl-top) { opacity: 0 !important; pointer-events: none !important; }
.cmes-pl.cmes-pl-isna .cmes-pl-top { opacity: 1 !important; }
.cmes-pl.cmes-pl-isna .cmes-pl-top .cmes-pl-tr { display: none !important; }
.cmes-pl-na { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: radial-gradient(70% 60% at 50% 45%, #1a1a21, #050507); animation: cmesNaIn .35s ease both; }
@keyframes cmesNaIn { from { opacity: 0; } to { opacity: 1; } }
.cmes-pl-na-in { max-width: 460px; text-align: center; color: #fff; font-family: var(--cmes-font, Inter, system-ui, sans-serif); }
.cmes-pl-na-ic { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.cmes-pl-na-ic svg { width: 30px; height: 30px; }
.cmes-pl-na h3 { margin: 0 0 10px !important; font: 800 26px/1.2 var(--cmes-font, Inter, system-ui, sans-serif) !important; color: #fff !important; }
.cmes-pl-na p { margin: 0 0 26px !important; font: 500 15px/1.6 var(--cmes-font, Inter, system-ui, sans-serif) !important; color: rgba(255,255,255,.65) !important; }
.cmes-pl-na-b { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cmes-pl-na-b button { height: 46px; padding: 0 24px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08); color: #fff;
  font: 700 14.5px/1 var(--cmes-font, Inter, system-ui, sans-serif); cursor: pointer; transition: background .2s, transform .15s; }
.cmes-pl-na-b button:hover, .cmes-pl-na-b button:focus-visible { background: rgba(255,255,255,.16); outline: none; }
.cmes-pl-na-b button.on { background: #fff; color: #000; border-color: #fff; }
.cmes-pl-na-b button.on:hover { background: rgba(255,255,255,.88); }
.cmes-pl-na-b button:active { transform: scale(.97); }
.cmes-pl-toast { position: absolute; left: 50%; bottom: 110px; z-index: 45; transform: translate(-50%, 10px); padding: 12px 20px; border-radius: 999px; background: rgba(15,15,20,.92);
  border: 1px solid rgba(255,255,255,.12); color: #fff; font: 600 14px/1.2 var(--cmes-font, Inter, system-ui, sans-serif); white-space: nowrap; opacity: 0; pointer-events: none;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity .3s, transform .3s; }
.cmes-pl-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 767px) {
  .cmes-pl-na h3 { font-size: 21px !important; }
  .cmes-pl-na p { font-size: 14px !important; margin-bottom: 20px !important; }
  .cmes-pl-na-b button { height: 42px; padding: 0 18px; font-size: 13.5px; }
  .cmes-pl-toast { bottom: 90px; font-size: 13px; white-space: normal; text-align: center; max-width: 86vw; }
}


/* ================================================================ screen fit (Fit / Fill / Stretch) */
.cmes-pl iframe { transition: transform .35s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.cmes-pl [data-a="fit"].on { color: var(--cmes-accent, #e50914); }
.cmes-pl-fitmsg { position: absolute; left: 50%; top: 50%; z-index: 30; transform: translate(-50%, -50%) scale(.92); padding: 12px 22px; border-radius: 999px;
  background: rgba(0,0,0,.65); color: #fff; font: 700 16px/1 var(--cmes-font, Inter, system-ui, sans-serif); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s; }
.cmes-pl-fitmsg.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ================================================================ full-screen watch view: no 16:9 box (fills 20:9 phones too) */
.cmes-watchbox .movie-engine-player-screen-area, .cmes-watchbox .cmes-pbox, .cmes-watchbox .movie-engine-player-container, .cmes-watchbox iframe,
html.cmes-ep .movie-engine-player-wrapper .movie-engine-player-screen-area, html.cmes-ep .movie-engine-player-wrapper iframe {
  aspect-ratio: auto !important; max-width: none !important; max-height: none !important;
}

/* ================================================================ Quality & Server panel: compact on phones */
@media (max-width: 700px), (max-height: 560px) {
  .cmes-pl-panel { top: 58px; right: 12px; left: auto; max-width: calc(100% - 24px); max-height: calc(100% - 140px); border-radius: 14px; }
  .cmes-pl-panel-set { top: auto; bottom: 76px; }
  .cmes-pl-cols { gap: 2px; padding: 6px; }
  .cmes-pl-grp { min-width: 128px; }
  .cmes-pl-gt { padding: 8px 10px 5px; font-size: 10px; letter-spacing: .12em; }
  .cmes-pl-gl { max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
  .cmes-pl-grp button { padding: 7px 10px; gap: 7px; font-size: 13px; border-radius: 8px; }
  .cmes-pl-grp button svg { width: 13px; height: 13px; }
  .cmes-pl-none { padding: 12px; font-size: 13px; }
}
/* portrait phone: groups side by side in two columns, not one tall list */
@media (max-width: 700px) and (orientation: portrait) {
  .cmes-pl-panel { left: 12px; right: 12px; max-width: none; }
  .cmes-pl-cols { flex-direction: row; flex-wrap: wrap; }
  .cmes-pl-grp { flex: 1 1 calc(50% - 2px); min-width: 0; }
  .cmes-pl-gl { max-height: 30vh; }
}
/* short screens: tighter still, long names cut with … */
@media (max-height: 560px) {
  .cmes-pl-panel { top: 54px; max-height: calc(100% - 150px); max-width: min(560px, calc(100% - 24px)); }
  .cmes-pl-grp { min-width: 96px; max-width: 168px; }
  .cmes-pl-gt { padding: 6px 8px 4px; font-size: 9px; }
  .cmes-pl-gl { max-height: calc(100vh - 186px); max-height: calc(100dvh - 186px); }
  .cmes-pl-grp button { padding: 5px 8px; gap: 6px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .cmes-pl-grp button svg { display: inline-block; vertical-align: -2px; margin-right: 5px; }
}

/* ================================================================ start-up: ONE spinner from tap to picture
   The page's first-paint cover and this screen look the same (dimmed backdrop + one white ring in the middle),
   so the hand-over can't be seen. The embedded player (with its own spinner) stays hidden until the picture
   starts, then fades in. If it waits for a tap (autoplay blocked), it is shown after a short moment. */
:is(.cmes-watchbox, .cmes-pbox) iframe { transition: opacity .5s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
:is(.cmes-watchbox, .cmes-pbox):has(.cmes-pl.cold) iframe { opacity: 0 !important; }
:is(.cmes-watchbox, .cmes-pbox):has(.cmes-pl.cold:not(.loading)) iframe { opacity: 1 !important; transition: opacity .5s ease 2.2s, transform .35s ease; }
:is(.cmes-watchbox, .cmes-pbox):has(.cmes-pl.cmes-pl-off) iframe { opacity: 1 !important; }
.cmes-pl.cold, .cmes-pl.loading.cold { background: #000 !important; }
.cmes-pl.cold:not(.loading) { background: transparent !important; transition: background .5s ease 2.2s; }
.cmes-pl.cold .cmes-pl-cover { opacity: 1 !important; }
.cmes-pl.cold:not(.loading) .cmes-pl-cover { opacity: 0 !important; transition: opacity .5s ease 2.2s; }
.cmes-pl.cold .cmes-pl-load { display: grid !important; opacity: 1; transition: opacity .3s ease; }
.cmes-pl.cold:not(.loading) .cmes-pl-load { opacity: 0; transition: opacity .3s ease 2.2s; }
.cmes-pl.cold .cmes-pl-load::before { display: none; }
.cmes-pl.cold .cmes-pl-spin { width: 56px; height: 56px; border-width: 4px; }

/* ================================================================ upright phone: picture on top, details below (like Hotstar) */
.cmes-vp { display: none; }
@media (orientation: portrait) and (max-width: 700px) {
  .cmes-watchbox, html.cmes-ep .movie-engine-player-wrapper { background: #0a0a0c !important; overflow-y: auto !important; overscroll-behavior: contain; }
  .cmes-watchbox .movie-engine-player-screen-area, html.cmes-ep .movie-engine-player-wrapper .movie-engine-player-screen-area {
    flex: none !important; height: 56.25vw !important; position: sticky !important; top: 0; z-index: 5; }
  .cmes-vp { display: block; flex: none; padding: 16px 16px 40px; color: #fff; font-family: var(--cmes-font, system-ui); animation: cmesPlUp .4s var(--cmes-ease, ease) both; }
  /* the picture area is small: lighter controls */
  .cmes-pl-top { padding: 8px 10px !important; }
  .cmes-pl-title b { font-size: 14px !important; }
  .cmes-pl-title span { font-size: 11px !important; }
  .cmes-pl-tr, .cmes-pl-more, .cmes-pl-nextb, .cmes-pl-row button[data-a="set"] { display: none !important; }
  .cmes-pl-bottom { padding: 0 8px 4px !important; }
  .cmes-pl-row button { width: 36px !important; height: 36px !important; padding: 8px !important; }
  .cmes-pl-left { font-size: 12px !important; }
  .cmes-pl-skipw { bottom: 46px !important; }
  .cmes-pl-end { right: 8px !important; bottom: 50px !important; transform: scale(.82); transform-origin: right bottom; }
  .cmes-pl-fitmsg { font-size: 13px !important; }
  /* Quality / Audio menus come up from the bottom of the screen as a sheet */
  .cmes-pl-panel { position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; max-width: none !important;
    max-height: 62vh !important; border-radius: 20px 20px 0 0 !important; padding-bottom: 10px; z-index: 40; animation: cmesSheet .32s cubic-bezier(.2,.8,.2,1) both !important; }
  .cmes-pl-panel .cmes-pl-gl { max-height: 44vh !important; }
  .cmes-pl.has-panel::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 39; animation: cmesFadeIn .25s both; }
}
@keyframes cmesSheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes cmesFadeIn { from { opacity: 0; } }
.cmes-vp-head h2 { margin: 0; font: 900 22px/1.15 var(--cmes-font, system-ui); letter-spacing: -.2px; color: #fff; }
.cmes-vp-sub { margin-top: 6px; font: 700 14px/1.3 var(--cmes-font, system-ui); color: rgba(255,255,255,.85); }
.cmes-vp-meta { margin-top: 6px; font: 600 12px/1 var(--cmes-font, system-ui); color: rgba(255,255,255,.55); }
.cmes-vp-desc { margin: 10px 0 0; font: 400 13px/1.5 var(--cmes-font, system-ui); color: rgba(255,255,255,.7); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cmes-vp-acts { display: flex; gap: 8px; margin: 16px 0 6px; }
.cmes-vp-acts button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.07); color: #fff; font: 600 11px/1 var(--cmes-font, system-ui); cursor: pointer; transition: background .2s, transform .15s; }
.cmes-vp-acts button:active { transform: scale(.95); background: rgba(255,255,255,.14); }
.cmes-vp-acts svg { width: 20px; height: 20px; }
.cmes-vp-sec { margin-top: 22px; }
.cmes-vp-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cmes-vp-h b { font: 800 18px/1 var(--cmes-font, system-ui); }
select.cmes-vp-season { background: rgba(255,255,255,.08) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.16) !important; border-radius: 10px !important; padding: 7px 10px !important; font: 600 13px var(--cmes-font, system-ui) !important; }
.cmes-vp-eps { display: flex; flex-direction: column; gap: 10px; }
.cmes-vp-ep { display: flex; gap: 12px; align-items: center; padding: 6px; border-radius: 12px; color: #fff !important; text-decoration: none !important; transition: background .2s; }
.cmes-vp-ep.on { background: rgba(255,255,255,.07); }
.cmes-vp-ep .im { position: relative; flex: none; width: 136px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: rgba(255,255,255,.07); }
.cmes-vp-ep img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmes-vp-ep .im i { position: absolute; left: 6px; bottom: 6px; padding: 3px 7px; border-radius: 5px; background: #e50914; font: 800 10px/1.2 var(--cmes-font, system-ui); font-style: normal; text-transform: uppercase; letter-spacing: .04em; }
.cmes-vp-ep .im u { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 8px 7px 8px 9px; border-radius: 50%; background: rgba(0,0,0,.5); box-sizing: border-box; }
.cmes-vp-ep .im u svg { width: 100%; height: 100%; display: block; }
.cmes-vp-ep .tx { min-width: 0; }
.cmes-vp-ep em { display: block; font: 700 11px/1 var(--cmes-font, system-ui); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.cmes-vp-ep b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 5px; font: 700 14px/1.3 var(--cmes-font, system-ui); }
.cmes-vp-rel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cmes-vp-rel a { display: block; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.07); }
.cmes-vp-rel img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* upright: beat the engine's own sidebar/episode layout rules (7-class selectors force height:100% and order:1 on the video box) */
@media (orientation: portrait) and (max-width: 700px) {
  html body .cmes-watchbox.cmes-watchbox.cmes-watchbox.cmes-watchbox .movie-engine-player-screen-area.movie-engine-player-screen-area.movie-engine-player-screen-area.movie-engine-player-screen-area.movie-engine-player-screen-area {
    order: 0 !important; flex: 0 0 auto !important; width: 100% !important; height: 56.25vw !important; min-height: 56.25vw !important; max-height: 56.25vw !important;
    aspect-ratio: auto !important; position: sticky !important; top: 0 !important; z-index: 5 !important; }
  html body .cmes-watchbox.cmes-watchbox.cmes-watchbox.cmes-watchbox .movie-engine-player-container.movie-engine-player-container.movie-engine-player-container.movie-engine-player-container.movie-engine-player-container {
    position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; aspect-ratio: auto !important; }
  html body .cmes-watchbox.cmes-watchbox > .cmes-vp { order: 99 !important; }
  .cmes-watchbox, html.cmes-ep .movie-engine-player-wrapper { scrollbar-width: none; }
  .cmes-watchbox::-webkit-scrollbar { display: none; }
}
/* upright: one back arrow and no repeated name on the picture (the name is in the details below) */
@media (orientation: portrait) and (max-width: 700px) {
  .cmes-pl-title, .cmes-watchbox .cmes-wbar, html.cmes-ep .cmes-wbar { display: none !important; }
  .cmes-pl-top { justify-content: flex-start !important; }
}
.cmes-vp-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cmes-vp-genres span { padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); font: 600 11px/1 var(--cmes-font, system-ui); color: rgba(255,255,255,.85); }
.cmes-vp-cast { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-snap-type: x proximity; }
.cmes-vp-cast::-webkit-scrollbar { display: none; }
.cmes-vp-cast .cc { flex: none; width: 92px; scroll-snap-align: start; }
.cmes-vp-cast .ph { display: block; width: 92px; height: 120px; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.07); }
.cmes-vp-cast img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmes-vp-cast b { display: block; margin-top: 7px; font: 600 12px/1.25 var(--cmes-font, system-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmes-vp-cast em { display: block; margin-top: 2px; font: 400 11px/1.2 var(--cmes-font, system-ui); font-style: normal; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* upright: Hotstar-style controls — back top-left; −10 / play / +10 in the middle; progress, time and full screen along the bottom */
@media (orientation: portrait) and (max-width: 700px) {
  .cmes-pl-shade { background: rgba(0,0,0,.42) !important; }
  .cmes-pl-bottom { top: 0 !important; bottom: 0 !important; padding: 0 !important; pointer-events: none; }
  .cmes-pl-trackrow { position: absolute; left: 14px; right: 50px; bottom: 8px; gap: 10px; pointer-events: auto; }
  .cmes-pl-row { position: static !important; margin: 0 !important; }
  .cmes-pl-row .cmes-pl-l { position: absolute; left: 0; right: 0; top: 50%; height: 64px; margin-top: -32px; justify-content: center; gap: 30px; pointer-events: none; }
  .cmes-pl-row .cmes-pl-l button { pointer-events: auto; }
  .cmes-pl-row .cmes-pl-l button[data-a="back"] { order: 1; }
  .cmes-pl-row .cmes-pl-l button[data-a="play"] { order: 2; }
  .cmes-pl-row .cmes-pl-l button[data-a="fwd"] { order: 3; }
  .cmes-pl-row .cmes-pl-l button[data-a="back"], .cmes-pl-row .cmes-pl-l button[data-a="fwd"] { display: grid !important; width: 44px !important; height: 44px !important; padding: 8px !important; }
  .cmes-pl-row .cmes-pl-l button[data-a="play"] { width: 60px !important; height: 60px !important; padding: 15px !important; background: rgba(0,0,0,.35) !important; border: 1.5px solid rgba(255,255,255,.25) !important; }
  .cmes-pl-row .cmes-pl-l button[data-a="mute"], .cmes-pl-row .cmes-pl-r button[data-a="fit"] { display: none !important; }
  .cmes-pl-row .cmes-pl-r { position: absolute; right: 4px; bottom: 0; pointer-events: auto; }
  .cmes-pl-row .cmes-pl-r button[data-a="full"] { width: 42px !important; height: 42px !important; padding: 10px !important; }
  .cmes-pl-top { padding: 6px 6px !important; }
  .cmes-pl-backb { width: 40px !important; height: 40px !important; }
}
@media (orientation: portrait) and (max-width: 700px) {
  /* solid, so the embedded player's own centre icon underneath never shows through */
  .cmes-pl-row .cmes-pl-l button[data-a="play"] { width: 64px !important; height: 64px !important; padding: 17px !important; background: rgba(16,16,20,.92) !important; border-color: rgba(255,255,255,.22) !important; box-shadow: 0 0 0 6px rgba(0,0,0,.25); }
}
@media (orientation: portrait) and (max-width: 700px) {
  .cmes-pl-panel::before { content: ""; display: block; width: 42px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.28); margin: 10px auto 0; }
  .cmes-pl-panel .cmes-pl-cols { padding: 6px 10px 14px !important; gap: 4px 8px !important; }
  .cmes-pl-panel .cmes-pl-grp button { padding: 9px 12px !important; font-size: 14px !important; }
  .cmes-pl-panel .cmes-pl-gt { padding: 12px 12px 6px !important; font-size: 11px !important; }
}
/* upright details: placeholders while the extra details load, then a soft fade-in */
.cmes-vp-skel .t { display: block; width: 120px; height: 16px; border-radius: 6px; margin-bottom: 12px; }
.cmes-vp-skel .row { display: flex; gap: 12px; overflow: hidden; }
.cmes-vp-skel .c { flex: none; width: 92px; height: 150px; border-radius: 12px; }
.cmes-vp-skel .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cmes-vp-skel .p { aspect-ratio: 2 / 3; border-radius: 10px; }
.cmes-vp-skel i { background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.11) 50%, rgba(255,255,255,.05) 75%) 0 0 / 300% 100%; animation: cmesShimmer 1.3s linear infinite; }
@keyframes cmesShimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
.cmes-vp-in { animation: cmesVpIn .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cmesVpIn { from { opacity: 0; transform: translateY(8px); } }
/* upright Quality / Audio sheet: each section is a row of pill buttons (selected = white) */
@media (orientation: portrait) and (max-width: 700px) {
  .cmes-pl .cmes-pl-panel { max-height: 72vh !important; overflow-y: auto !important; background: #141418 !important; border: 0 !important; border-top: 1px solid rgba(255,255,255,.08) !important; box-shadow: 0 -20px 50px rgba(0,0,0,.6) !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-cols { flex-direction: column !important; flex-wrap: nowrap !important; gap: 4px !important; padding: 8px 6px 18px !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-grp { min-width: 0 !important; max-width: none !important; width: 100% !important; flex: none !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-gt { padding: 14px 12px 10px !important; font-size: 11px !important; letter-spacing: .14em !important; color: rgba(255,255,255,.5) !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-gl { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; max-height: none !important; overflow: visible !important; padding: 0 12px !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-grp button { width: auto !important; display: inline-flex !important; align-items: center; gap: 0 !important; padding: 9px 15px !important; border-radius: 999px !important;
    background: rgba(255,255,255,.07) !important; border: 1px solid rgba(255,255,255,.12) !important; color: rgba(255,255,255,.85) !important; font: 600 13px/1.2 var(--cmes-font, system-ui) !important; white-space: nowrap !important; transition: background .2s, color .2s, transform .15s; }
  .cmes-pl .cmes-pl-panel .cmes-pl-grp button svg { display: none !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-grp button.on { background: #fff !important; color: #000 !important; border-color: #fff !important; font-weight: 800 !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-grp button:active { transform: scale(.95); }
}
/* sideways phone: Quality / Audio menu is a side sheet from the right with pill buttons */
@media (orientation: landscape) and (max-height: 560px) {
  .cmes-pl .cmes-pl-panel { top: 0 !important; bottom: 0 !important; right: 0 !important; left: auto !important; width: min(46%, 430px) !important; max-width: none !important; max-height: none !important;
    border-radius: 20px 0 0 20px !important; background: #141418 !important; border: 0 !important; border-left: 1px solid rgba(255,255,255,.08) !important; box-shadow: -20px 0 50px rgba(0,0,0,.55) !important;
    overflow-y: auto !important; z-index: 40; animation: cmesSide .3s cubic-bezier(.2,.8,.2,1) both !important; scrollbar-width: none; }
  .cmes-pl .cmes-pl-panel::-webkit-scrollbar { display: none; }
  .cmes-pl.has-panel::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: 39; animation: cmesFadeIn .25s both; }
  .cmes-pl .cmes-pl-panel .cmes-pl-cols { flex-direction: column !important; flex-wrap: nowrap !important; gap: 2px !important; padding: 10px 8px 16px !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-grp { min-width: 0 !important; max-width: none !important; width: 100% !important; flex: none !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-gt { padding: 12px 12px 8px !important; font-size: 10px !important; letter-spacing: .14em !important; color: rgba(255,255,255,.5) !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-gl { display: flex !important; flex-wrap: wrap !important; gap: 7px !important; max-height: none !important; overflow: visible !important; padding: 0 12px !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-grp button { width: auto !important; display: inline-flex !important; align-items: center; gap: 0 !important; padding: 7px 13px !important; border-radius: 999px !important;
    background: rgba(255,255,255,.07) !important; border: 1px solid rgba(255,255,255,.12) !important; color: rgba(255,255,255,.85) !important; font: 600 12.5px/1.2 var(--cmes-font, system-ui) !important; white-space: nowrap !important; overflow: visible !important; text-overflow: clip !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-grp button svg { display: none !important; }
  .cmes-pl .cmes-pl-panel .cmes-pl-grp button.on { background: #fff !important; color: #000 !important; border-color: #fff !important; font-weight: 800 !important; }
}
@keyframes cmesSide { from { transform: translateX(100%); } to { transform: none; } }
.cmes-vp-count { margin-left: 8px; margin-right: auto; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.08); font: 700 11px/1.2 var(--cmes-font, system-ui); color: rgba(255,255,255,.6); }
.cmes-vp-h b + .cmes-vp-count + select, .cmes-vp-h select { margin-left: auto; }
/* Skip Intro / Recap: compact on phones */
@media (max-width: 700px), (max-height: 560px) {
  .cmes-pl .cmes-pl-skip { min-width: 0 !important; height: 34px !important; padding: 0 13px !important; gap: 6px !important; border-radius: 8px !important; font-size: 12.5px !important; }
  .cmes-pl .cmes-pl-skip svg { width: 12px !important; height: 12px !important; }
}
@media (max-height: 560px) { .cmes-pl .cmes-pl-skipw { right: 18px !important; bottom: 84px !important; } }
@media (orientation: portrait) and (max-width: 700px) {
  .cmes-pl .cmes-pl-skip { height: 28px !important; padding: 0 10px !important; font-size: 11px !important; border-radius: 7px !important; }
  .cmes-pl .cmes-pl-skipw { right: 10px !important; bottom: 40px !important; }
}
/* phones: low in the corner while the controls are hidden, above the progress bar while they show */
@media (max-height: 560px) {
  .cmes-pl .cmes-pl-skipw { bottom: 26px !important; transition: bottom .3s cubic-bezier(.2,.8,.2,1), opacity .2s !important; }
  .cmes-pl:is(.show, .paused) .cmes-pl-skipw { bottom: 104px !important; }
}
@media (orientation: portrait) and (max-width: 700px) {
  .cmes-pl .cmes-pl-skipw { bottom: 12px !important; transition: bottom .3s cubic-bezier(.2,.8,.2,1), opacity .2s !important; }
  .cmes-pl:is(.show, .paused) .cmes-pl-skipw { bottom: 44px !important; }
}

/* the video player's own "Skip intro" is used: ours stays hidden */
.cmes-pl .cmes-pl-skipw { display: none !important; }
/* tap-through gap over it, cut only in an invisible tap layer (the picture and our dimming stay whole) */
.cmes-pl-catch { position: absolute; inset: 0; display: none; background: transparent; }
.cmes-pl.holed { pointer-events: none !important; }
.cmes-pl.holed .cmes-pl-catch { display: block; pointer-events: auto; }
.cmes-pl.holed:is(.show, .paused, .has-panel, .has-drawer) :is(.cmes-pl-top, .cmes-pl-row button, .cmes-pl-trackrow, .cmes-pl-more),
.cmes-pl.holed .cmes-pl-panel, .cmes-pl.holed .cmes-pl-drawer, .cmes-pl.holed .cmes-pl-end { pointer-events: auto; }

/* ================================================================ sideways phone: icon-only controls, no full-screen fade behind menus */
.cmes-pl-moreic { display: none; font-style: normal; }
.cmes-pl-moreic svg { width: 22px; height: 22px; display: block; }
@media (max-height: 560px) and (orientation: landscape) {
  .cmes-pl .cmes-pl-tbtn { width: 44px !important; height: 44px !important; min-width: 0 !important; padding: 0 !important; justify-content: center !important; border-radius: 50% !important; gap: 0 !important; }
  .cmes-pl .cmes-pl-tbtn span, .cmes-pl .cmes-pl-tbtn em { display: none !important; }
  .cmes-pl .cmes-pl-tbtn svg { width: 22px !important; height: 22px !important; }
  /* Episodes keeps its label (the one text button), compact */
  .cmes-pl .cmes-pl-more { height: 38px !important; padding: 0 14px !important; font-size: 13px !important; gap: 6px !important; }
  .cmes-pl .cmes-pl-more > svg { width: 15px !important; height: 15px !important; }
  .cmes-pl .cmes-pl-nextb { width: 44px !important; padding: 10px !important; }
  .cmes-pl .cmes-pl-nextb span { display: none !important; }
  /* menu open: only a soft shade behind the side sheet, the picture stays clear */
  .cmes-pl.has-panel::after { background: linear-gradient(to left, rgba(0,0,0,.5) 0%, rgba(0,0,0,.25) 40%, transparent 62%) !important; }
  .cmes-pl.has-panel .cmes-pl-shade { opacity: 0 !important; }
}
/* the sheet keeps its own scrolling (no page bounce), so a swipe down at the top can close it */
@media (orientation: portrait) and (max-width: 700px) { .cmes-pl .cmes-pl-panel { overscroll-behavior: contain; touch-action: pan-y; } }
@media (orientation: landscape) and (max-height: 560px) { .cmes-pl .cmes-pl-panel { overscroll-behavior: contain; touch-action: pan-y; } }

/* ================================================================ sideways phone: −10 / play / +10 in the middle (tap the middle to play / pause) */
@media (orientation: landscape) and (max-height: 560px) {
  .cmes-pl .cmes-pl-row { position: static !important; }
  /* centred on the screen (measured from the bottom bar's lower edge, which is the screen's bottom) */
  .cmes-pl .cmes-pl-row .cmes-pl-l { position: absolute; left: 0; right: 0; top: auto; bottom: calc(50vh - 40px); bottom: calc(50dvh - 40px); height: 80px; margin: 0; justify-content: center; gap: 56px; pointer-events: none; }
  .cmes-pl .cmes-pl-row .cmes-pl-l button { pointer-events: auto; }
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="back"] { order: 1; }
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="play"] { order: 2; }
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="fwd"] { order: 3; }
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="back"], .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="fwd"] { display: grid !important; width: 52px !important; height: 52px !important; padding: 9px !important; }
  /* solid, so the video player's own centre icon underneath never shows through */
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="play"] { width: 76px !important; height: 76px !important; padding: 20px !important; border-radius: 50% !important;
    background: rgba(16,16,20,.92) !important; border: 1.5px solid rgba(255,255,255,.22) !important; box-shadow: 0 0 0 7px rgba(0,0,0,.25); }
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="mute"] { display: none !important; }
  /* the bottom row keeps Episodes on the left of the right-hand icons */
  .cmes-pl .cmes-pl-row { display: flex; justify-content: flex-end; }
  .cmes-pl .cmes-pl-row .cmes-pl-r { margin-left: auto; }
}
/* upright: the video frame is never shorter than 236px, or the player moves its "Skip intro" to the top-left corner
   (small phones lose a few pixels at the top and bottom of the picture instead) */
@media (orientation: portrait) and (max-width: 700px) {
  html body .cmes-watchbox.cmes-watchbox.cmes-watchbox.cmes-watchbox .movie-engine-player-container.movie-engine-player-container.movie-engine-player-container.movie-engine-player-container.movie-engine-player-container iframe {
    top: min(0px, calc((100% - 236px) / 2)) !important; bottom: auto !important; height: max(100%, 236px) !important; }
}
/* details from the first HTML (upright phones), until the player's script builds the full version */
#cmes-vp-boot { display: none; }
@media (orientation: portrait) and (max-width: 700px) {
  html.cmes-ep:not(.cmes-vp-ready) #cmes-vp-boot { display: block !important; position: fixed; left: 0; right: 0; top: 56.25vw; bottom: 0; z-index: 2147480600; background: #0a0a0c; overflow: hidden; animation: none; }
}

/* ================================================================ phones: the centre play / pause is the same bare white glyph as the
   video player's own (Netflix style, no disc), same size, same spot — the two line up as one icon */
@media (hover: none) {
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="play"].cmes-big {
    width: calc(84px * var(--cmes-z, 1)) !important; height: calc(84px * var(--cmes-z, 1)) !important; padding: 0 !important;
    background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; display: grid !important; place-items: center !important; }
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="play"].cmes-big svg {
    width: calc(68px * var(--cmes-z, 1)) !important; height: calc(68px * var(--cmes-z, 1)) !important; color: #fff; filter: drop-shadow(0 2px 10px rgba(0,0,0,.55)); }
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="play"].cmes-big:active { transform: scale(.94); }
  /* −10 / +10 as light as the play glyph */
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="back"], .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="fwd"] { background: none !important; }
  .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="back"] svg, .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="fwd"] svg { filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
}
@media (hover: none) { .cmes-pl .cmes-pl-row .cmes-pl-l button[data-a="play"].cmes-big.cmes-isplay svg { margin-left: calc(4px * var(--cmes-z, 1)); } }
