
.aceflx-wrap{max-width:1300px;margin:0 auto;padding:18px 14px;background:linear-gradient(180deg,#0a0a0a 0%, #050505 100%);border-radius:18px;color:#fff}
.aceflx-topbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.aceflx-brand{font-weight:900;font-size:28px;letter-spacing:.5px}
.aceflx-filters{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.aceflx-filter{display:flex;flex-direction:column;gap:6px}
.aceflx-filter-label{font-size:13px;opacity:.85}
.aceflx-typeahead{padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.18);background:#0f0f0f;color:#fff;min-width:190px}.aceflx-typeahead::placeholder{color:rgba(255,255,255,.58)}
.aceflx-select{padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.18);background:#0f0f0f;color:#fff;min-width:160px}
.aceflx-input{padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.18);background:#0f0f0f;color:#fff;min-width:240px}
.aceflx-input::placeholder{color:rgba(255,255,255,.58)}
.aceflx-filter-search{min-width:260px}
.aceflx-btn{display:inline-flex;align-items:center;justify-content:center;padding:11px 16px;border-radius:14px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#fff;font-weight:900;text-decoration:none;cursor:pointer}
.aceflx-btn-primary{background:#e50914;border-color:#e50914}
.aceflx-btn-play{min-width:110px}

.aceflx-hero{position:relative;border-radius:18px;overflow:hidden;min-height:280px;margin:8px 0 18px;background:#111}
.aceflx-hero{background-image:var(--aceflx-hero-bg);background-size:cover;background-position:center}
.aceflx-hero-overlay{position:absolute;inset:0;background:linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.22) 100%)}
.aceflx-hero-content{position:relative;z-index:2;padding:22px;max-width:760px}
.aceflx-hero-kicker{font-weight:900;opacity:.9;margin-bottom:10px}
.aceflx-hero-title{font-size:34px;line-height:1.15;font-weight:950;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.aceflx-hero-actions{margin-top:14px}

.aceflx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px}
.aceflx-card{display:block;text-decoration:none;color:#fff;background:#0f0f0f;border:1px solid rgba(255,255,255,.08);border-radius:16px;overflow:hidden;transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease}
.aceflx-card:hover{transform:translateY(-3px);box-shadow:0 18px 50px rgba(0,0,0,.45);border-color:rgba(255,255,255,.16)}
.aceflx-thumb{position:relative;width:100%;aspect-ratio:16/9;background:#111}
.aceflx-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.aceflx-thumb-fallback{display:flex;align-items:center;justify-content:center;height:100%;opacity:.7;font-weight:800}
.aceflx-thumb-overlay{position:absolute;inset:0;background:linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.65) 100%);display:flex;align-items:flex-end;justify-content:flex-start;padding:10px;opacity:0;transition:opacity .18s ease}
.aceflx-card:hover .aceflx-thumb-overlay{opacity:1}
.aceflx-play-pill{background:#e50914;color:#fff;font-weight:950;padding:8px 12px;border-radius:999px}
.aceflx-title{padding:12px 12px 14px;font-weight:900;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:44px}
.aceflx-empty{opacity:.85}
@media (max-width:640px){
  .aceflx-brand{font-size:22px}
  .aceflx-select{min-width:140px}
  .aceflx-hero{min-height:220px}
  .aceflx-hero-title{font-size:24px}
}

.aceflx-hero::before{content:"";position:absolute;inset:-20px;background-image:var(--aceflx-hero-bg);background-size:cover;background-position:center;filter:blur(8px) brightness(.75);transform:scale(1.08);z-index:0}
.aceflx-hero{background-image:none}
.aceflx-hero-overlay{z-index:1}
.aceflx-hero-content{z-index:2}

.aceflx-hero-meta{margin-top:10px;font-weight:800;opacity:.9}

.aceflx-count{font-weight:900;opacity:.85;margin-left:auto}

.aceflx-card,.aceflx-card:hover,.aceflx-title{ text-decoration:none !important; }

.aceflx-meta{padding:0 12px 14px;font-size:12px;opacity:.8;font-weight:800}
.aceflx-title{padding:0}

/* Continue Watching rail (CSS-only, no JS) */
.aceflx-rail-wrap{margin:12px 0 18px}
.aceflx-rail-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 10px}
.aceflx-rail-titlebig{font-weight:950;font-size:18px}
.aceflx-rail{display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding-bottom:8px}
.aceflx-rail::-webkit-scrollbar{height:10px}
.aceflx-rail-item{min-width:220px;max-width:220px;text-decoration:none;color:#fff;background:#0f0f0f;border:1px solid rgba(255,255,255,.08);border-radius:14px;overflow:hidden}
.aceflx-rail-thumb{width:100%;aspect-ratio:16/9;background:#111}
.aceflx-rail-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.aceflx-rail-title{padding:10px 10px 4px;font-weight:900;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.aceflx-rail-meta{padding:0 10px 12px;font-size:12px;opacity:.8;font-weight:800}



.aceflx-watch-titlebar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}

.aceflx-sectionhead{margin:10px 0 10px;font-weight:950;font-size:18px}

/* Minimal inline icons (no background) */
.aceflx-card-footer{padding:12px}
.aceflx-titlebar{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.aceflx-titlebar .aceflx-title{font-weight:900;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.aceflx-meta{margin-top:6px;font-size:12px;opacity:.8;font-weight:800}

.aceflx-icons{display:flex;gap:10px;flex:0 0 auto;align-items:center}
.aceflx-icon{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:.8}
.aceflx-icon:hover{opacity:1}
.aceflx-svg{width:18px;height:18px;fill:none;stroke:rgba(255,255,255,.8);stroke-width:1.6}
.aceflx-icon.is-on .aceflx-svg{fill:#e50914;stroke:#e50914}

/* Watch page icons */
.aceflx-watch-titlebar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}

/* Coaching strip */
.aceflx-coach{margin:10px 0 14px;padding:10px 12px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);font-weight:850;opacity:.92}

/* Progress strip */
.aceflx-progress{margin:10px 0 14px;padding:10px 12px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.03);font-weight:850;opacity:.92}

/* Video access badges */
.aceflx-badge{display:inline-block;margin:0 0 8px;padding:6px 10px;border-radius:999px;font-weight:900;font-size:12px;letter-spacing:.4px}
.aceflx-badge-free{background:#ffffff;color:#111}
.aceflx-badge-basic{background:#ffd24d;color:#111}
.aceflx-badge-learn{background:#1e73be;color:#fff}


.aceflx-binge{margin:18px 0 0;padding:14px;border-radius:18px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04)}
.aceflx-binge-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px;flex-wrap:wrap}
.aceflx-binge-kicker{font-weight:950;font-size:18px}
.aceflx-binge-source{opacity:.82;font-weight:800;margin-top:4px}
.aceflx-binge-status{font-weight:850;opacity:.92}
.aceflx-binge-card{display:grid;grid-template-columns:220px 1fr;gap:14px;align-items:stretch}
.aceflx-binge-thumb{display:block;border-radius:14px;overflow:hidden;background:#111;min-height:124px}
.aceflx-binge-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.aceflx-binge-body{display:flex;flex-direction:column;justify-content:center}
.aceflx-binge-title{font-size:20px;font-weight:950;line-height:1.2}
.aceflx-binge-meta{margin-top:8px;opacity:.82;font-weight:800}
.aceflx-binge-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
@media (max-width:700px){
  .aceflx-binge-card{grid-template-columns:1fr}
  .aceflx-binge-thumb{min-height:180px}
}
.aceflx-binge-resume{margin-top:8px;font-weight:800;opacity:.82}
.aceflx-binge-overlay{position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:99999;display:flex;align-items:center;justify-content:center;padding:20px}
.aceflx-binge-overlay[hidden]{display:none !important}
.aceflx-binge-overlay-card{width:min(560px,100%);background:#111;border:1px solid rgba(255,255,255,.12);border-radius:22px;padding:24px;box-shadow:0 30px 80px rgba(0,0,0,.5)}
.aceflx-binge-overlay-kicker{font-weight:900;opacity:.82;margin-bottom:8px}
.aceflx-binge-overlay-title{font-size:28px;line-height:1.15;font-weight:950}
.aceflx-binge-overlay-status{margin-top:12px;font-weight:850;opacity:.92}
.aceflx-binge-overlay-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}

.aceflx-hardguard .aceflx-binge-status{font-weight:900}
.aceflx-binge-overlay-hard{position:fixed;inset:0;background:rgba(0,0,0,.88);z-index:999999;display:flex;align-items:center;justify-content:center;padding:24px}
.aceflx-binge-overlay-hard[hidden]{display:none !important}
.aceflx-binge-overlay-hard .aceflx-binge-overlay-card{width:min(620px,100%);border-radius:24px;background:linear-gradient(180deg,#171717 0%, #0d0d0d 100%);border:1px solid rgba(255,255,255,.12);box-shadow:0 30px 90px rgba(0,0,0,.55)}
.aceflx-binge-overlay-hard .aceflx-binge-overlay-title{font-size:32px;line-height:1.12}
.aceflx-binge-overlay-hard .aceflx-binge-overlay-status{font-size:16px}
.aceflx-player-covering, .aceflx-player-covering iframe, .aceflx-player-covering video{visibility:hidden !important}

.aceflx-binge-modes{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:8px}
.aceflx-binge-mode{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.18);background:#111;color:#fff;text-decoration:none;font-weight:900;font-size:12px;letter-spacing:.2px}
.aceflx-binge-mode.is-active{background:#e50914;border-color:#e50914;color:#fff}
.aceflx-binge-head{align-items:center}


.aceflx-autocomplete{position:relative}
.aceflx-autocomplete-box{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#111;border:1px solid rgba(255,255,255,.14);border-radius:14px;overflow:hidden;z-index:30;box-shadow:0 16px 40px rgba(0,0,0,.35)}
.aceflx-autocomplete-item{display:block;width:100%;text-align:left;background:transparent;color:#fff;border:0;padding:12px 14px;font-weight:800;cursor:pointer}
.aceflx-autocomplete-item:hover{background:rgba(255,255,255,.08)}
.aceflx-rail-shell{position:relative}
.aceflx-rail{scroll-behavior:smooth;padding-inline:16px}
.aceflx-topic-group{margin:0 0 22px}
.aceflx-subtopic-group{margin:0 0 18px}
.aceflx-grid-results{margin:0 0 4px}
.aceflx-subtopic-label{font-size:13px;letter-spacing:.2px;opacity:.9}
.aceflx-rail-arrow{position:absolute;top:0;bottom:8px;z-index:6;width:30px;border:0;background:transparent;color:#fff;font-size:24px;font-weight:700;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.94;transition:opacity .18s ease, transform .18s ease;text-shadow:0 2px 8px rgba(0,0,0,.55)}
.aceflx-rail-arrow::before{content:none}
.aceflx-rail-arrow::after{position:absolute;line-height:1;color:#fff}
.aceflx-rail-arrow-left::after{content:'‹'}
.aceflx-rail-arrow-right::after{content:'›'}
.aceflx-rail-arrow:hover{transform:scale(1.06);opacity:1}
.aceflx-rail-arrow-left{left:2px}
.aceflx-rail-arrow-right{right:2px}
.aceflx-rail-arrow.is-hidden,.aceflx-rail-shell.is-static .aceflx-rail-arrow{opacity:0;pointer-events:none}
@media (max-width:640px){
  .aceflx-rail{padding-inline:8px}
  .aceflx-rail-arrow{width:24px;font-size:20px}
}

/* Premium widget dashboard */
.aceflx-widget-dashboard{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px;margin:16px 0 20px}
.aceflx-widget-card{display:flex;flex-direction:column;gap:10px;min-height:130px;padding:18px;border-radius:24px;background:linear-gradient(180deg,rgba(255,255,255,.08) 0%,rgba(255,255,255,.03) 100%);border:1px solid rgba(255,255,255,.1);box-shadow:0 18px 50px rgba(0,0,0,.22);text-decoration:none;color:#fff;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.aceflx-widget-card:hover{transform:translateY(-2px);box-shadow:0 24px 60px rgba(0,0,0,.3);border-color:rgba(255,255,255,.18)}
.aceflx-widget-card-hero{grid-column:span 6;min-height:164px;background:linear-gradient(180deg,rgba(255,255,255,.12) 0%,rgba(255,255,255,.04) 100%)}
.aceflx-widget-card-support{grid-column:span 3}
.aceflx-widget-card-micro{grid-column:span 3;min-height:110px}
.aceflx-widget-overline{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.78);font-weight:900}
.aceflx-widget-title{font-size:22px;line-height:1.15;font-weight:950}
.aceflx-widget-card-support .aceflx-widget-title,.aceflx-widget-card-micro .aceflx-widget-title{font-size:18px}
.aceflx-widget-meta{font-size:13px;line-height:1.45;color:rgba(255,255,255,.78);font-weight:700}
.aceflx-widget-cta{margin-top:auto;font-weight:900;color:#fff}

/* Watch shell + next step */
.aceflx-watch-shell{display:flex;flex-direction:column;gap:16px}
.aceflx-nextstep-card{position:relative;overflow:hidden;padding:22px 22px 20px;border-radius:26px;background:linear-gradient(180deg,rgba(255,255,255,.12) 0%,rgba(255,255,255,.04) 100%);border:1px solid rgba(255,255,255,.12);box-shadow:0 20px 60px rgba(0,0,0,.28);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.aceflx-nextstep-card:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at top right, rgba(255,255,255,.12), transparent 40%);pointer-events:none}
.aceflx-nextstep-head{position:relative;display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap}
.aceflx-nextstep-copy{max-width:720px}
.aceflx-nextstep-context{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.72);margin-bottom:10px}
.aceflx-nextstep-title{margin:0;font-size:30px;line-height:1.1;font-weight:950}
.aceflx-nextstep-support{margin:10px 0 0;color:rgba(255,255,255,.8);font-size:14px;font-weight:700}
.aceflx-nextstep-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* Related resources drawer */
.aceflx-related-panel{border-radius:24px;background:linear-gradient(180deg,rgba(255,255,255,.06) 0%,rgba(255,255,255,.025) 100%);border:1px solid rgba(255,255,255,.1);overflow:hidden}
.aceflx-related-summary{list-style:none;cursor:pointer;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:900}
.aceflx-related-summary::-webkit-details-marker{display:none}
.aceflx-related-summary-title{font-size:18px}
.aceflx-related-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;border-radius:999px;background:rgba(255,255,255,.12);font-size:12px}
.aceflx-related-body{padding:0 18px 18px}
.aceflx-related-context{margin:4px 0 14px;color:rgba(255,255,255,.72);font-weight:800;font-size:13px}
.aceflx-related-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.aceflx-related-tab{appearance:none;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:#fff;padding:10px 14px;border-radius:999px;font-weight:900;cursor:pointer}
.aceflx-related-tab span{opacity:.72}
.aceflx-related-tab.is-active{background:#fff;color:#111;border-color:#fff}
.aceflx-related-tabpanel{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.aceflx-related-item{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);text-decoration:none;color:#fff;min-height:120px;transition:transform .16s ease,border-color .16s ease,background .16s ease}
.aceflx-related-item:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.065)}
.aceflx-related-item-label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.74);font-weight:900}
.aceflx-related-item-title{font-size:18px;line-height:1.2;font-weight:900}
.aceflx-related-item-meta{font-size:13px;color:rgba(255,255,255,.74);font-weight:700}

/* Recommendation pop cards */
.aceflx-rec-popcards{position:fixed;inset:0;pointer-events:none;z-index:99997}
.aceflx-rec-card{position:fixed;right:18px;max-width:380px;width:calc(100% - 36px);padding:18px;border-radius:24px;background:rgba(17,17,17,.9);border:1px solid rgba(255,255,255,.12);box-shadow:0 30px 90px rgba(0,0,0,.4);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);pointer-events:auto}
.aceflx-rec-card[hidden]{display:none !important}
.aceflx-rec-card-start{top:18px}
.aceflx-rec-card-end{bottom:18px}
.aceflx-rec-kicker{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.72);font-weight:900;margin-bottom:8px}
.aceflx-rec-context{color:rgba(255,255,255,.7);font-size:12px;font-weight:800;margin-bottom:10px}
.aceflx-rec-items{display:flex;flex-direction:column;gap:10px}
.aceflx-rec-item{display:block;padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08);text-decoration:none;color:#fff}
.aceflx-rec-label{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.68);font-weight:900}
.aceflx-rec-title{font-size:18px;line-height:1.2;font-weight:900;margin-top:4px}
.aceflx-rec-meta{font-size:13px;color:rgba(255,255,255,.74);font-weight:700;margin-top:6px}
.aceflx-rec-close{position:absolute;top:10px;right:10px;width:30px;height:30px;border-radius:999px;border:0;background:rgba(255,255,255,.08);color:#fff;font-size:20px;cursor:pointer}

/* Premium lock style support */
.aceflx-lock-card,.ace-video-gate,.aceflx-gate{border-radius:22px !important;background:linear-gradient(180deg,rgba(255,255,255,.09) 0%,rgba(255,255,255,.03) 100%) !important;border:1px solid rgba(255,255,255,.12) !important;padding:18px !important;color:#fff !important;box-shadow:0 18px 55px rgba(0,0,0,.28)}
.aceflx-lock-card a,.ace-video-gate a,.aceflx-gate a{font-weight:900}

/* Mobile bottom sheet feel */
@media (max-width: 780px){
  .aceflx-widget-dashboard{grid-template-columns:1fr;gap:12px}
  .aceflx-widget-card-hero,.aceflx-widget-card-support,.aceflx-widget-card-micro{grid-column:auto}
  .aceflx-nextstep-title{font-size:24px}
  .aceflx-related-panel[open]{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:99998;border-radius:24px 24px 0 0;max-height:72vh;overflow:auto;box-shadow:0 -20px 60px rgba(0,0,0,.38)}
  .aceflx-related-summary{position:sticky;top:0;background:#0f0f0f;z-index:2}
  .aceflx-related-tabpanel{grid-template-columns:1fr}
  .aceflx-rec-card{left:12px;right:12px;width:auto;max-width:none}
}

.aceflx-entry-shell{display:flex;flex-direction:column;gap:18px;margin:8px 0 0}
.aceflx-entry-hero{position:relative;overflow:hidden}
.aceflx-entry-hero-inline{margin-top:8px;padding:14px 16px;border-radius:20px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08)}
.aceflx-entry-primary-label{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.7);font-weight:900;margin-bottom:6px}
.aceflx-entry-primary-title{font-size:20px;line-height:1.2;font-weight:900;color:#fff}
.aceflx-entry-primary-meta{margin-top:6px;font-size:13px;color:rgba(255,255,255,.72);font-weight:700}
.aceflx-entry-content{padding:22px;border-radius:24px;background:linear-gradient(180deg,rgba(255,255,255,.06) 0%,rgba(255,255,255,.025) 100%);border:1px solid rgba(255,255,255,.1);box-shadow:0 18px 50px rgba(0,0,0,.2)}
.aceflx-entry-content > :first-child{margin-top:0}
.aceflx-entry-content > :last-child{margin-bottom:0}
.single-sfwd-topic .aceflx-entry-content, .single-sfwd-quiz .aceflx-entry-content{color:#fff}
.single-sfwd-topic .aceflx-entry-content h1,
.single-sfwd-topic .aceflx-entry-content h2,
.single-sfwd-topic .aceflx-entry-content h3,
.single-sfwd-topic .aceflx-entry-content h4,
.single-sfwd-quiz .aceflx-entry-content h1,
.single-sfwd-quiz .aceflx-entry-content h2,
.single-sfwd-quiz .aceflx-entry-content h3,
.single-sfwd-quiz .aceflx-entry-content h4{color:#fff}
.single-sfwd-topic .aceflx-entry-content a,
.single-sfwd-quiz .aceflx-entry-content a{color:#fff;text-decoration:underline;text-underline-offset:2px}
.single-sfwd-topic .aceflx-entry-content .wp-block-button__link,
.single-sfwd-topic .aceflx-entry-content .learndash_mark_complete_button,
.single-sfwd-topic .aceflx-entry-content input[type=submit],
.single-sfwd-topic .aceflx-entry-content button,
.single-sfwd-quiz .aceflx-entry-content .wp-block-button__link,
.single-sfwd-quiz .aceflx-entry-content .learndash_mark_complete_button,
.single-sfwd-quiz .aceflx-entry-content input[type=submit],
.single-sfwd-quiz .aceflx-entry-content button{border-radius:999px;border:1px solid rgba(255,255,255,.12);background:#fff;color:#111;font-weight:900;padding:12px 18px;box-shadow:0 10px 30px rgba(0,0,0,.18)}
.single-sfwd-topic .aceflx-entry-content table,
.single-sfwd-quiz .aceflx-entry-content table{background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.08)}
.single-sfwd-topic .aceflx-entry-content td,
.single-sfwd-topic .aceflx-entry-content th,
.single-sfwd-quiz .aceflx-entry-content td,
.single-sfwd-quiz .aceflx-entry-content th{border-color:rgba(255,255,255,.08)}
@media (max-width: 782px){
  .aceflx-entry-content{padding:18px;border-radius:20px}
  .aceflx-entry-primary-title{font-size:18px}
}


/* ACE Learn+ recommendation/progress UI (moved from PHP inline CSS) */
.aceflx-rec-popcards{position:relative}.aceflx-rec-card{position:fixed;right:16px;z-index:9998;max-width:360px;width:calc(100vw - 32px);background:rgba(14,14,14,.96);color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:16px;padding:14px 16px 14px;box-shadow:0 16px 42px rgba(0,0,0,.45)}.aceflx-rec-card-start{top:88px}.aceflx-rec-card-end{bottom:24px}.aceflx-rec-kicker{font-size:12px;letter-spacing:.08em;text-transform:uppercase;opacity:.75;margin-bottom:6px}.aceflx-rec-context{font-size:13px;opacity:.82;margin-bottom:10px}.aceflx-rec-items{display:grid;gap:10px}.aceflx-rec-item{display:block;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);text-decoration:none;color:#fff}.aceflx-rec-item:hover{background:rgba(255,255,255,.08)}.aceflx-rec-label{font-size:11px;letter-spacing:.06em;text-transform:uppercase;opacity:.72;margin-bottom:3px}.aceflx-rec-title{font-weight:700;line-height:1.3}.aceflx-rec-meta{font-size:12px;opacity:.72;margin-top:4px}.aceflx-rec-close{position:absolute;top:8px;right:8px;border:0;background:transparent;color:#fff;font-size:22px;line-height:1;cursor:pointer;opacity:.8}.aceflx-rec-close:hover{opacity:1}.aceflx-related-panel{margin:16px 0 14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);border-radius:16px;overflow:hidden}.aceflx-related-summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;padding:14px 16px;font-weight:700;color:#fff}.aceflx-related-summary::-webkit-details-marker{display:none}.aceflx-related-count{display:inline-flex;min-width:28px;height:28px;align-items:center;justify-content:center;border-radius:999px;background:rgba(255,255,255,.08);font-size:12px}.aceflx-related-body{padding:0 16px 16px}.aceflx-related-context{font-size:12px;opacity:.74;margin-bottom:10px}.aceflx-related-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.aceflx-related-tab{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#fff;border-radius:999px;padding:8px 12px;cursor:pointer}.aceflx-related-tab.is-active{background:#fff;color:#111}.aceflx-related-tab span{opacity:.72}.aceflx-related-tabpanel{display:grid;gap:10px}.aceflx-related-item{display:block;padding:12px;border-radius:12px;background:rgba(255,255,255,.04);text-decoration:none;color:#fff}.aceflx-related-item:hover{background:rgba(255,255,255,.08)}.aceflx-related-item-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;opacity:.7;margin-bottom:4px}.aceflx-related-item-title{font-weight:700;line-height:1.35}.aceflx-related-item-meta{font-size:12px;opacity:.72;margin-top:4px}.aceflx-filter-label,.aceflx-filters .aceflx-filter-label,.aceflx-topbar .aceflx-filter-label{color:#fff !important;opacity:1 !important;text-shadow:0 1px 2px rgba(0,0,0,.35)}.aceflx-status-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.03em}.aceflx-status-completed{background:rgba(52,199,89,.18);color:#8ff0b1;border:1px solid rgba(52,199,89,.28)}.aceflx-status-ready{background:rgba(10,132,255,.18);color:#9ed0ff;border:1px solid rgba(10,132,255,.28)}.aceflx-status-new{background:rgba(255,255,255,.09);color:#fff;border:1px solid rgba(255,255,255,.14)}.aceflx-related-item-status,.aceflx-rec-statuswrap{margin-top:8px}.aceflx-lesson-pack{margin:14px 0 14px}.aceflx-pack-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.aceflx-pack-item{display:block;padding:14px;border-radius:16px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);text-decoration:none;color:#fff}.aceflx-pack-item:hover{background:rgba(255,255,255,.08)}.aceflx-pack-type{font-size:11px;letter-spacing:.07em;text-transform:uppercase;opacity:.72;margin-bottom:4px}.aceflx-pack-title{font-weight:700;line-height:1.35;margin-bottom:4px}.aceflx-pack-meta{font-size:12px;opacity:.72;min-height:32px;margin-bottom:10px}.aceflx-progress-widgets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 16px}.aceflx-progress-widget{display:flex;flex-direction:column;align-items:flex-start}.aceflx-progress-ring{--p:0;position:relative;width:68px;height:68px;border-radius:50%;background:conic-gradient(#fff calc(var(--p)*1%), rgba(255,255,255,.1) 0);display:grid;place-items:center;margin:8px 0 10px}.aceflx-progress-ring::after{content:"";position:absolute;inset:7px;border-radius:50%;background:#111}.aceflx-progress-ring span{position:relative;z-index:1;font-size:13px;font-weight:700;color:#fff}@media (max-width:782px){.aceflx-rec-card{right:10px;width:calc(100vw - 20px)}.aceflx-rec-card-start{top:74px}.aceflx-rec-card-end{bottom:14px}.aceflx-pack-grid,.aceflx-progress-widgets{grid-template-columns:1fr}}



/* ACE Learn+ independent YouTube player */
.aceflx-native-player{width:100%;background:#000;border-radius:16px;overflow:hidden;box-shadow:0 12px 35px rgba(0,0,0,.18)}
.aceflx-video-frame{position:relative;width:100%;aspect-ratio:16/9;background:#000}
.aceflx-youtube-iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.aceflx-player-error{padding:28px;border-radius:14px;background:#f7f7f7;color:#222;text-align:center}


/* ACE Learn+ native YouTube playback */
.ace-flix-player {
    width: 100%;
    margin: 0 0 20px;
}
.ace-flix-youtube-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 280px;
    overflow: hidden;
    background: #000;
    border-radius: 14px;
}
.ace-flix-youtube-iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
.ace-flix-player-error {
    padding: 24px;
    background: #111;
    color: #fff;
    border-radius: 14px;
}
@media (max-width: 640px) {
    .ace-flix-youtube-frame {
        min-height: 210px;
        border-radius: 10px;
    }
}


/* ACE private YouTube player: the iframe is display-only. All pointer input is
 * captured by the shield and handled by ACE's own controls. */
.aceflx-private-player .ace-flix-youtube-frame {
    position: relative;
}
.aceflx-private-player .ace-flix-youtube-iframe {
    pointer-events: none !important;
    user-select: none;
}
.aceflx-player-shield {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: transparent;
    cursor: default;
}

/* Caption privacy shield: YouTube captions are disabled at source/API level;
 * this small opaque lower band prevents any residual subtitle pixels from
 * leaking into the ACE presentation. */
.aceflx-caption-shield{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    height:72px;
    z-index:4;
    background:#000;
    pointer-events:none;
}
@media (max-width:640px){
    .aceflx-caption-shield{height:58px}
}
/*
 * ACE controls deliberately live OUTSIDE the black/video strip.
 * The YouTube privacy shield only covers the video frame, so these
 * controls remain directly clickable.
 */
.aceflx-player-controls {
    position: relative;
    z-index: 20;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(0,0,0,.92);
    box-sizing: border-box;
}
.aceflx-player-controls button {
    appearance: none;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 7px;
    min-height: 34px;
    padding: 6px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation;
}
.aceflx-player-controls button:hover,
.aceflx-player-controls button:focus-visible {
    background: rgba(255,255,255,.18);
    outline: 2px solid rgba(255,255,255,.65);
    outline-offset: 1px;
}
.aceflx-player-status {
    position: relative;
    z-index: 20;
    min-height: 18px;
    margin-top: 5px;
    color: inherit;
    font-size: 12px;
    pointer-events: none;
}
.aceflx-player-status:empty { display: none; }

/* Focus mode belongs to ACE, not YouTube fullscreen. */
html.aceflx-focused-open,
body.aceflx-focused-open {
    overflow: hidden !important;
}
.aceflx-private-player.aceflx-focused {
    position: fixed !important;
    z-index: 2147483000 !important;
    inset: 12px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding-bottom: 64px;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 12px 60px rgba(0,0,0,.65);
}
.aceflx-private-player.aceflx-focused .ace-flix-youtube-frame {
    height: calc(100% - 8px);
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 12px;
}
.aceflx-private-player.aceflx-focused .ace-flix-youtube-iframe {
    width: 100%;
    height: 100%;
}
.aceflx-private-player.aceflx-focused .aceflx-player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin-top: 0;
    border-radius: 0 0 10px 10px;
}
@media (max-width: 640px) {
    .aceflx-player-controls {
        gap: 5px;
        padding: 5px;
    }
    .aceflx-player-controls button {
        padding: 4px 9px;
        font-size: 12px;
    }
}

/* ACE related-video strip: curriculum-scoped to the current Subject + Grade. */
.aceflx-related-video-strip{
    margin:18px 0 24px;
    padding:14px 0 2px;
}
.aceflx-related-video-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    margin:0 0 10px;
}
.aceflx-related-video-kicker{
    font-size:11px;
    font-weight:900;
    letter-spacing:.08em;
    opacity:.7;
}
.aceflx-related-video-titlebig{
    margin-top:2px;
    font-size:18px;
    font-weight:950;
}
.aceflx-related-video-rail{
    display:flex;
    gap:12px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:2px 2px 10px;
    scrollbar-width:thin;
}
.aceflx-related-video-card{
    flex:0 0 210px;
    width:210px;
    text-decoration:none;
    color:inherit;
    background:#111;
    border:1px solid rgba(255,255,255,.10);
    border-radius:12px;
    overflow:hidden;
}
.aceflx-related-video-card:hover,
.aceflx-related-video-card:focus-visible{
    border-color:rgba(255,255,255,.28);
    outline:none;
    transform:translateY(-1px);
}
.aceflx-related-video-thumb{
    width:100%;
    aspect-ratio:16/9;
    background:#181818;
}
.aceflx-related-video-thumb img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}
.aceflx-related-video-title{
    padding:9px 10px 11px;
    font-size:13px;
    line-height:1.3;
    font-weight:800;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
@media (max-width:640px){
    .aceflx-related-video-card{flex-basis:175px;width:175px}
    .aceflx-related-video-titlebig{font-size:16px}
}

/* 3.2.11: ACE controls must always sit above the privacy shield. */
.aceflx-private-player .ace-flix-youtube-frame { overflow: hidden; }
.aceflx-private-player .aceflx-player-shield { z-index: 20; pointer-events: auto; }
.aceflx-private-player .aceflx-player-controls {
    z-index: 30 !important;
    pointer-events: auto !important;
}
.aceflx-private-player .aceflx-player-controls button {
    position: relative;
    z-index: 31;
    pointer-events: auto !important;
}

/* 3.2.15: compact end-of-lesson action. The old multi-card binge panel
 * consumed too much vertical space and duplicated Related Videos. */
.aceflx-binge-compact{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin:12px 0 0;
    padding:10px 12px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.035);
}
.aceflx-binge-compact-copy{
    min-width:0;
    display:flex;
    align-items:baseline;
    gap:9px;
    flex:1 1 auto;
}
.aceflx-binge-compact-kicker{
    flex:0 0 auto;
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.08em;
    opacity:.68;
}
.aceflx-binge-compact-title{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:14px;
    font-weight:850;
}
.aceflx-binge-compact-actions{
    display:flex;
    align-items:center;
    gap:7px;
    flex:0 0 auto;
}
.aceflx-binge-compact .aceflx-btn{
    min-height:32px;
    padding:6px 10px;
    font-size:12px;
}
.aceflx-binge-compact > .aceflx-binge-status{
    display:none;
}
@media(max-width:640px){
    .aceflx-binge-compact{align-items:stretch;flex-direction:column;gap:8px}
    .aceflx-binge-compact-copy{display:block}
    .aceflx-binge-compact-kicker{display:block;margin-bottom:2px}
    .aceflx-binge-compact-actions{justify-content:flex-start}
    .aceflx-binge-compact-title{white-space:normal}
}


/* ACE 3.2.16 — Presto-inspired shell styling.
 * The visual language borrows the compact, responsive control-bar pattern
 * from Presto/Plyr while keeping the ACE controls outside the protected frame.
 */
.aceflx-shell-player{
  --ace-shell-bg:#171717;
  --ace-shell-border:rgba(255,255,255,.10);
  --ace-shell-text:#fff;
  --ace-shell-muted:rgba(255,255,255,.68);
  --ace-shell-accent:#e50914;
}
.aceflx-shell-player .ace-flix-youtube-frame{
  margin:0;
  border-radius:10px 10px 0 0;
  min-height:0;
  background:#000;
}
.aceflx-shell-player .aceflx-player-shield{
  z-index:10;
}
.aceflx-shell-player .aceflx-caption-shield{
  z-index:11;
  height:76px;
  background:#000;
}
.aceflx-shell-controls{
  position:relative;
  z-index:30;
  margin:0;
  padding:0 10px 8px;
  background:var(--ace-shell-bg);
  color:var(--ace-shell-text);
  border:1px solid var(--ace-shell-border);
  border-top:0;
  border-radius:0 0 10px 10px;
  box-sizing:border-box;
}
.aceflx-shell-progress{
  width:100%;
  height:18px;
  display:flex;
  align-items:center;
}
.aceflx-player-progress{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  height:4px;
  margin:0;
  padding:0;
  border:0;
  border-radius:999px;
  outline:0;
  cursor:pointer;
  background:linear-gradient(to right,var(--ace-shell-accent) var(--ace-progress,0%),rgba(255,255,255,.28) var(--ace-progress,0%));
}
.aceflx-player-progress::-webkit-slider-runnable-track{
  height:4px;
  border-radius:999px;
  background:transparent;
}
.aceflx-player-progress::-webkit-slider-thumb{
  appearance:none;
  -webkit-appearance:none;
  width:10px;
  height:10px;
  margin-top:-3px;
  border:0;
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 0 2px rgba(255,255,255,.12);
  opacity:0;
  transition:opacity .15s ease,transform .15s ease;
}
.aceflx-player-progress:hover::-webkit-slider-thumb,
.aceflx-player-progress:focus-visible::-webkit-slider-thumb{
  opacity:1;
  transform:scale(1.12);
}
.aceflx-player-progress::-moz-range-track{
  height:4px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.28);
}
.aceflx-player-progress::-moz-range-progress{
  height:4px;
  border-radius:999px;
  background:var(--ace-shell-accent);
}
.aceflx-player-progress::-moz-range-thumb{
  width:10px;
  height:10px;
  border:0;
  border-radius:50%;
  background:#fff;
}
.aceflx-shell-control-row{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:4px;
}
.aceflx-control-button{
  appearance:none;
  -webkit-appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:40px;
  height:36px;
  padding:0 9px;
  margin:0;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#fff;
  font:inherit;
  font-size:13px;
  font-weight:700;
  line-height:1;
  cursor:pointer !important;
  pointer-events:auto !important;
  touch-action:manipulation;
}
.aceflx-control-button:hover,
.aceflx-control-button:focus-visible{
  background:rgba(255,255,255,.10);
  outline:0;
}
.aceflx-control-button:active{
  background:rgba(255,255,255,.16);
}
.aceflx-control-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  font-size:15px;
  line-height:1;
}
.aceflx-control-label{white-space:nowrap}
.aceflx-player-stop .aceflx-control-icon{font-size:12px}
.aceflx-player-time{
  margin-left:5px;
  color:var(--ace-shell-muted);
  font-size:12px;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.aceflx-shell-spacer{flex:1 1 auto}
.aceflx-control-button-focus{padding-inline:10px}
.aceflx-shell-player .aceflx-player-status{
  min-height:0;
  margin:0;
  padding:0 2px 2px;
  color:var(--ace-shell-muted);
  font-size:11px;
}
.aceflx-shell-player .aceflx-player-status:empty{display:none}
.aceflx-shell-player.aceflx-focused{
  padding-bottom:56px !important;
}
.aceflx-shell-player.aceflx-focused .ace-flix-youtube-frame{
  border-radius:10px 10px 0 0;
}
.aceflx-shell-player.aceflx-focused .aceflx-shell-controls{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  border-radius:0 0 10px 10px;
}
@media(max-width:640px){
  .aceflx-shell-controls{padding:0 6px 6px}
  .aceflx-shell-control-row{min-height:40px}
  .aceflx-control-button{min-width:36px;height:34px;padding-inline:7px}
  .aceflx-control-label{display:none}
  .aceflx-control-button-focus .aceflx-control-label{display:inline}
  .aceflx-player-time{font-size:11px;margin-left:2px}
  .aceflx-shell-player .aceflx-caption-shield{height:60px}
}

/* 3.2.19: end-of-lesson related rail + playback state polish. */
.aceflx-related-video-strip[hidden]{
  display:none !important;
}
.aceflx-related-video-strip.aceflx-related-video-strip-pending{
  display:none !important;
}
.aceflx-related-video-strip.aceflx-related-video-strip-visible{
  display:block !important;
}
.aceflx-shell-player.aceflx-is-playing .aceflx-player-play{
  display:none !important;
}
.aceflx-related-video-thumb img{
  image-rendering:auto;
}

/* 3.2.22: related-video thumbnails are visible from page load. */
.aceflx-related-video-strip{display:block!important;visibility:visible!important;opacity:1!important}
.aceflx-related-video-thumb{display:block;position:relative;aspect-ratio:16/9;overflow:hidden;background:#181818}
.aceflx-related-video-thumb img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;opacity:1!important;visibility:visible!important}

/* ACE 3.2.25: stable player controls and protected binge presentation. */
.aceflx-shell-player .aceflx-player-rewind,
.aceflx-shell-player .aceflx-player-forward,
.aceflx-shell-player .aceflx-player-repeat,
.aceflx-shell-player .aceflx-player-binge{
  pointer-events:auto !important;
  position:relative;
  z-index:40;
}
.aceflx-shell-player .aceflx-player-repeat.is-active,
.aceflx-shell-player .aceflx-player-binge.is-active{
  background:rgba(255,255,255,.16);
}
.aceflx-shell-player .aceflx-shell-controls{
  pointer-events:auto !important;
}
.aceflx-shell-player .aceflx-shell-controls button,
.aceflx-shell-player .aceflx-player-progress{
  pointer-events:auto !important;
}
.aceflx-binge{
  display:none !important;
}
.aceflx-related-video-strip{
  display:flex;
  overflow-x:auto;
  gap:12px;
  scrollbar-width:thin;
}
.aceflx-related-video-card{
  flex:0 0 210px;
}
@media(max-width:640px){
  .aceflx-related-video-card{flex-basis:170px}
  .aceflx-player-rewind .aceflx-control-label,
  .aceflx-player-forward .aceflx-control-label{display:none}
}

/* ACE 3.2.27: API-created YouTube mount. The ACE shell owns the player;
 * the iframe created inside this mount is display-only behind the shield. */
.aceflx-youtube-mount{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  overflow:hidden;
  background:#000;
}
.aceflx-youtube-mount iframe{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  border:0 !important;
  pointer-events:none !important;
  user-select:none !important;
}
.aceflx-player-shield{
  pointer-events:auto !important;
  z-index:20 !important;
}
.aceflx-caption-shield{
  pointer-events:none !important;
  z-index:21 !important;
}
.aceflx-shell-controls{
  position:relative !important;
  z-index:50 !important;
  pointer-events:auto !important;
}

/* ACE Learn+ 3.2.31 — Responsive / full-bleed course player
 * The player is a single viewport-sized visual unit.  The surrounding
 * LearnDash/content layout remains unchanged; only the player is full bleed.
 */
html, body { overflow-x:hidden; }

.aceflx-shell-player{
  position:relative;
  width:100vw !important;
  max-width:none !important;
  margin-left:calc(50% - 50vw) !important;
  margin-right:calc(50% - 50vw) !important;
  margin-top:0 !important;
  margin-bottom:24px !important;
  padding:0 !important;
  box-sizing:border-box !important;
  background:#000 !important;
  border-radius:0 !important;
  overflow:hidden !important;
  box-shadow:none !important;
}

.aceflx-shell-player .ace-flix-youtube-frame{
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  aspect-ratio:16 / 9 !important;
  border-radius:0 !important;
  overflow:hidden !important;
  background:#000 !important;
}

.aceflx-shell-player .aceflx-youtube-mount,
.aceflx-shell-player .aceflx-youtube-mount iframe{
  width:100% !important;
  height:100% !important;
}

.aceflx-shell-player .aceflx-caption-shield{
  height:76px !important;
  bottom:0 !important;
}

/* Controls become an overlay inside the video instead of consuming a second
 * block of vertical space. This prevents mobile clipping. */
.aceflx-shell-player .aceflx-shell-controls{
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  width:100% !important;
  margin:0 !important;
  padding:0 12px 10px !important;
  background:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.88) 35%,rgba(0,0,0,.96)) !important;
  border:0 !important;
  border-radius:0 !important;
  box-sizing:border-box !important;
  z-index:50 !important;
}

.aceflx-shell-player .aceflx-shell-progress{
  height:18px !important;
  padding:0 !important;
}

.aceflx-shell-player .aceflx-shell-control-row{
  min-height:42px !important;
  gap:3px !important;
  flex-wrap:nowrap !important;
}

.aceflx-shell-player .aceflx-control-button{
  flex:0 0 auto !important;
  min-width:40px !important;
  height:38px !important;
  min-height:38px !important;
  padding:0 8px !important;
}

.aceflx-shell-player .aceflx-player-time{
  flex:0 0 auto !important;
}

.aceflx-shell-player .aceflx-shell-spacer{
  min-width:4px !important;
}

.aceflx-shell-player .aceflx-player-status{
  display:none !important;
}

/* Desktop: keep controls readable while allowing the video to fill the
 * complete viewport width. */
@media (min-width: 783px){
  .aceflx-shell-player .aceflx-control-button{
    min-width:42px !important;
    height:40px !important;
  }
}

/* Tablet and phone portrait. */
@media (max-width:782px){
  .aceflx-shell-player .ace-flix-youtube-frame{
    aspect-ratio:16 / 9 !important;
  }

  .aceflx-shell-player .aceflx-shell-controls{
    padding:0 8px 7px !important;
  }

  .aceflx-shell-player .aceflx-shell-control-row{
    min-height:38px !important;
  }

  .aceflx-shell-player .aceflx-control-button{
    min-width:38px !important;
    width:38px !important;
    height:36px !important;
    min-height:36px !important;
    padding:0 !important;
  }

  .aceflx-shell-player .aceflx-control-label{
    display:none !important;
  }

  .aceflx-shell-player .aceflx-control-button-focus .aceflx-control-label{
    display:none !important;
  }

  .aceflx-shell-player .aceflx-player-time{
    font-size:10px !important;
    margin-left:1px !important;
  }

  .aceflx-shell-player .aceflx-caption-shield{
    height:58px !important;
  }
}

/* Very narrow phones: retain all controls but compress the transport row. */
@media (max-width:420px){
  .aceflx-shell-player .aceflx-shell-controls{
    padding:0 5px 5px !important;
  }

  .aceflx-shell-player .aceflx-shell-control-row{
    min-height:34px !important;
    gap:1px !important;
  }

  .aceflx-shell-player .aceflx-control-button{
    width:33px !important;
    min-width:33px !important;
    height:32px !important;
    min-height:32px !important;
  }

  .aceflx-shell-player .aceflx-control-icon{
    width:15px !important;
    font-size:13px !important;
  }

  .aceflx-shell-player .aceflx-player-time{
    font-size:9px !important;
  }
}

/* Landscape phones have limited vertical space. Keep the same 16:9 video,
 * but use a very compact overlay so nothing sits below the player. */
@media (max-width:782px) and (orientation:landscape){
  .aceflx-shell-player .ace-flix-youtube-frame{
    aspect-ratio:16 / 9 !important;
  }

  .aceflx-shell-player .aceflx-shell-controls{
    padding:0 8px 4px !important;
  }

  .aceflx-shell-player .aceflx-shell-progress{
    height:14px !important;
  }

  .aceflx-shell-player .aceflx-shell-control-row{
    min-height:32px !important;
  }

  .aceflx-shell-player .aceflx-control-button{
    width:34px !important;
    min-width:34px !important;
    height:30px !important;
    min-height:30px !important;
  }

  .aceflx-shell-player .aceflx-caption-shield{
    height:48px !important;
  }
}

/* Tablet portrait/landscape gets a slightly larger touch surface. */
@media (min-width:783px) and (max-width:1100px){
  .aceflx-shell-player .aceflx-shell-controls{
    padding:0 12px 9px !important;
  }
}

/* Focus mode must continue to own the entire viewport. */
.aceflx-private-player.aceflx-focused{
  width:auto !important;
  margin:0 !important;
  left:12px !important;
  right:12px !important;
  max-width:none !important;
  border-radius:12px !important;
  overflow:hidden !important;
}

@media (max-width:782px){
  .aceflx-private-player.aceflx-focused{
    inset:0 !important;
    border-radius:0 !important;
  }
}

/* Related videos remain in normal document flow below the full-bleed player. */
.aceflx-shell-player + .aceflx-related-video-strip{
  width:100%;
  box-sizing:border-box;
}

/* ACE Learn+ 3.2.32 — compact bottom overlay.
 * The previous 76px caption shield visually covered too much of the video.
 * Caption suppression is handled by the YouTube configuration/API; this
 * shield is now only a small safety mask at the extreme bottom edge.
 */
.aceflx-shell-player .aceflx-caption-shield{
  height:26px !important;
  background:#000 !important;
}
.aceflx-shell-player .aceflx-shell-controls{
  padding:0 10px 4px !important;
  background:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.72) 45%,rgba(0,0,0,.90)) !important;
}
.aceflx-shell-player .aceflx-shell-progress{
  height:14px !important;
}
.aceflx-shell-player .aceflx-shell-control-row{
  min-height:34px !important;
}
.aceflx-shell-player .aceflx-control-button{
  height:32px !important;
  min-height:32px !important;
}

@media (max-width:782px){
  .aceflx-shell-player .aceflx-caption-shield{
    height:22px !important;
  }
  .aceflx-shell-player .aceflx-shell-controls{
    padding:0 7px 3px !important;
  }
  .aceflx-shell-player .aceflx-shell-progress{
    height:12px !important;
  }
  .aceflx-shell-player .aceflx-shell-control-row{
    min-height:31px !important;
  }
  .aceflx-shell-player .aceflx-control-button{
    height:30px !important;
    min-height:30px !important;
  }
}

@media (max-width:420px){
  .aceflx-shell-player .aceflx-caption-shield{
    height:18px !important;
  }
  .aceflx-shell-player .aceflx-shell-controls{
    padding:0 5px 2px !important;
  }
  .aceflx-shell-player .aceflx-shell-progress{
    height:10px !important;
  }
  .aceflx-shell-player .aceflx-shell-control-row{
    min-height:28px !important;
  }
  .aceflx-shell-player .aceflx-control-button{
    height:28px !important;
    min-height:28px !important;
  }
}

@media (max-width:782px) and (orientation:landscape){
  .aceflx-shell-player .aceflx-caption-shield{
    height:14px !important;
  }
  .aceflx-shell-player .aceflx-shell-controls{
    padding:0 7px 2px !important;
  }
  .aceflx-shell-player .aceflx-shell-progress{
    height:9px !important;
  }
  .aceflx-shell-player .aceflx-shell-control-row{
    min-height:27px !important;
  }
  .aceflx-shell-player .aceflx-control-button{
    height:26px !important;
    min-height:26px !important;
  }
}

/*
 * ACE Learn+ 3.2.33 — subtitle/caption hard block.
 * The YouTube API suppression is authoritative; this is only a tiny final
 * visual safety edge and must not cover the video display area.
 */
.aceflx-shell-player .aceflx-caption-shield{
  height:8px !important;
  background:#000 !important;
  pointer-events:none !important;
}
@media (max-width:782px){
  .aceflx-shell-player .aceflx-caption-shield{height:6px !important;}
}
@media (max-width:420px){
  .aceflx-shell-player .aceflx-caption-shield{height:5px !important;}
}
@media (max-width:782px) and (orientation:landscape){
  .aceflx-shell-player .aceflx-caption-shield{height:4px !important;}
}

/* ACE Learn+ 3.2.34: no subtitle cover/shield.
 * Captions are suppressed through the YouTube player configuration/API.
 * There is deliberately NO black overlay hiding the bottom of the video.
 */
.aceflx-caption-shield,
.aceflx-shell-player .aceflx-caption-shield{
  display:none !important;
}


/* ============================================================
   ACE 3.2.35 — Related-video search
   Search sits between the ACE player controls and the related
   thumbnail rail. It never overlays the video.
   ============================================================ */
.aceflx-related-video-search{
    position:relative;
    width:100%;
    max-width:520px;
    margin:10px 0 8px;
}
.aceflx-related-video-search-input{
    display:block;
    width:100%;
    height:38px;
    box-sizing:border-box;
    padding:8px 38px 8px 13px;
    border:1px solid rgba(255,255,255,.20);
    border-radius:19px;
    background:#171717;
    color:#fff;
    font:inherit;
    font-size:13px;
    line-height:20px;
    outline:none;
}
.aceflx-related-video-search-input::placeholder{color:#aaa}
.aceflx-related-video-search-input:focus{
    border-color:rgba(255,255,255,.55);
    box-shadow:0 0 0 2px rgba(255,255,255,.07);
}
.aceflx-related-video-search-clear{
    position:absolute;
    top:5px;
    right:6px;
    width:28px;
    height:28px;
    padding:0;
    border:0;
    border-radius:50%;
    background:transparent;
    color:#bbb;
    font-size:20px;
    line-height:28px;
    cursor:pointer;
}
.aceflx-related-video-search-clear:hover,
.aceflx-related-video-search-clear:focus{color:#fff}
.aceflx-related-video-card[hidden]{display:none!important}
.aceflx-related-video-no-results{
    margin:4px 0 8px;
    color:#aaa;
    font-size:12px;
}
@media (max-width:600px){
    .aceflx-related-video-search{
        max-width:none;
        margin:8px 0 7px;
    }
    .aceflx-related-video-search-input{
        height:40px;
        border-radius:20px;
        font-size:14px;
    }
}

/* ACE 3.2.36 — active related-video search */
.aceflx-related-video-search-input{
    -webkit-appearance:none!important;
    appearance:none!important;
    pointer-events:auto!important;
    user-select:text!important;
    -webkit-user-select:text!important;
    opacity:1!important;
    cursor:text!important;
    z-index:10;
}
.aceflx-related-video-search-input:disabled{opacity:1!important;cursor:text!important;}


/* ACE Learn+ 3.2.37 player layout contract:
   Player + its controls stay together above related content.
   Search and related rails are below the complete player/control block. */
.aceflx-card .aceflx-player-wrap,
.aceflx-card .aceflx-player-shell,
.aceflx-card .aceflx-player-container {
  width: 100%;
  position: relative;
}

.aceflx-card .aceflx-player-controls {
  position: relative;
  z-index: 5;
  width: 100%;
}

.aceflx-card .aceflx-related-video-strip {
  display: block;
  width: 100%;
  clear: both;
  margin-top: 14px;
}

.aceflx-card .aceflx-related-video-search {
  display: flex;
  width: 100%;
  clear: both;
  margin: 14px 0 10px;
}

.aceflx-card .aceflx-related-video-rail {
  width: 100%;
  clear: both;
}

/* Prevent theme flex/grid rules from pulling the related/search block beside the player. */
.aceflx-card > .aceflx-related-video-strip,
.aceflx-card .aceflx-related-video-strip {
  flex-basis: 100%;
  grid-column: 1 / -1;
}


/* ============================================================
   ACE Learn+ 3.2.38 — player/controls/related layout hard lock
   Required order:
     1. 16:9 video
     2. ACE controls immediately below the video
     3. topic/title search below the complete player
     4. related-video horizontal rail below search
   ============================================================ */
.aceflx-shell-player{
  display:block !important;
  width:100vw !important;
  max-width:none !important;
  height:auto !important;
  min-height:0 !important;
  margin-left:calc(50% - 50vw) !important;
  margin-right:calc(50% - 50vw) !important;
  margin-bottom:0 !important;
  padding:0 !important;
  overflow:visible !important;
  box-sizing:border-box !important;
  position:relative !important;
}
.aceflx-shell-player .ace-flix-youtube-frame{
  display:block !important;
  position:relative !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:16 / 9 !important;
  min-height:0 !important;
  margin:0 !important;
  overflow:hidden !important;
}
.aceflx-shell-player .aceflx-shell-controls{
  position:relative !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;
  top:auto !important;
  display:block !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 10px 8px !important;
  box-sizing:border-box !important;
  border-radius:0 !important;
  background:var(--ace-shell-bg) !important;
  z-index:50 !important;
}
.aceflx-shell-player .aceflx-shell-progress{
  display:flex !important;
  width:100% !important;
  height:18px !important;
}
.aceflx-shell-player .aceflx-shell-control-row{
  display:flex !important;
  width:100% !important;
  min-height:42px !important;
  align-items:center !important;
}
.aceflx-shell-player .aceflx-player-status{display:none !important;}

/* Related content must never become a flex row containing the search/heading. */
.aceflx-shell-player + .aceflx-related-video-strip,
.aceflx-related-video-strip{
  display:block !important;
  position:relative !important;
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
  margin:0 auto !important;
  padding:14px 0 2px !important;
  overflow:visible !important;
  clear:both !important;
  box-sizing:border-box !important;
}
.aceflx-related-video-strip .aceflx-related-video-search{
  display:block !important;
  position:relative !important;
  width:100% !important;
  max-width:620px !important;
  margin:0 0 12px !important;
}
.aceflx-related-video-strip .aceflx-related-video-rail{
  display:flex !important;
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  gap:12px !important;
  padding:2px 2px 10px !important;
  box-sizing:border-box !important;
}
.aceflx-related-video-strip .aceflx-related-video-card{
  flex:0 0 210px !important;
  width:210px !important;
}
.aceflx-related-video-search-input{
  pointer-events:auto !important;
  user-select:text !important;
  -webkit-user-select:text !important;
  touch-action:auto !important;
  cursor:text !important;
}
@media(max-width:640px){
  .aceflx-shell-player .aceflx-shell-controls{padding:0 6px 6px !important;}
  .aceflx-shell-player .aceflx-shell-control-row{min-height:40px !important;}
  .aceflx-related-video-strip .aceflx-related-video-search{
    max-width:none !important;
    margin:0 0 9px !important;
  }
  .aceflx-related-video-strip .aceflx-related-video-card{
    flex-basis:175px !important;
    width:175px !important;
  }
}
