/* ================= VLE — Netflix-style UI in Denning royal purple ================= */
/* The palette lives on :root, not .vle-root — the detail modal and toasts mount in
   #modal-root, outside the VLE subtree, and must resolve the same tokens. */
:root {
  --vbg: #120C2E;         /* canvas — the brand ink taken to ground */
  --vbg2: #1B1444;        /* raised surface (cards, modal) */
  --vbg3: #241B5C;        /* highest surface (menus, inputs) */
  --vtext: #fff;          /* primary text */
  --vmuted: rgba(255,255,255,.72);  /* secondary */
  --vdim: rgba(255,255,255,.46);    /* tertiary */
  --vhair: rgba(255,255,255,.12);   /* hairline */
  --vgold: #F2CA50;       /* THE accent: progress, selection, brand mark */
  --vviolet: #453BA0;     /* atmosphere only, never text */
  --vgreen: #F2CA50;      /* affinity/match — gold, the one accent */
}
.vle-root {
  --pp: 6;
  background: var(--vbg); color: var(--vtext); min-height: 100dvh; font-family: var(--font); position: relative;
}
body.full-layout { overflow-x: hidden; }
body.vle-playing { overflow: hidden; }
body.vle-modal-open { overflow: hidden; }
.vle-root a { color: inherit; }
.vle-root button { font-family: inherit; }
.vle-search-btn, .slider-handle, .pl-icon, .dm-close { color: #fff; }
.vle-root img { display: block; }
.vle-loading { display: grid; place-items: center; min-height: 60vh; }
.vle-spinner { width: 46px; height: 44px; background: url('/brand/mark-white.png') center/contain no-repeat; animation: markPulse 1.5s var(--ease, ease) infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }
@keyframes markPulse { 0%, 100% { opacity: .25; transform: scale(.97); } 50% { opacity: .8; transform: scale(1); } }
.vle-art { display: grid; place-items: end start; padding: 0; font-weight: 800; font-size: clamp(12px, 1.1vw, 18px); line-height: 1.15; color: #fff; }
/* The fallback art carries the module name ONLY where nothing else does: the portrait
   posters. Everywhere else a title sits beside it, so printing it twice reads as a bug. */
.vle-art > span { display: none; }
.card-p .card-img.vle-art, .card-top .card-img.vle-art, .bb-poster.vle-art { padding: 8%; }
.card-p .card-img.vle-art > span, .card-top .card-img.vle-art > span, .bb-poster.vle-art > span {
  display: block; text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.match { color: var(--vgreen); font-weight: 700; }
.mat { border: 1px solid rgba(255,255,255,.45); padding: 0 6px; border-radius: 3px; font-size: .85em; }
.hd { border: 1px solid rgba(255,255,255,.45); padding: 0 4px; border-radius: 3px; font-size: .7em; font-weight: 800; }

/* ---------- nav ---------- */
.vle-nav {
  position: fixed; top: 0; left: 0; right: 0; height: 68px; z-index: 60; display: flex; align-items: center; gap: 34px; padding: 0 4%;
  background: linear-gradient(180deg, rgba(14,7,34,.75) 0%, rgba(14,7,34,.35) 60%, transparent 100%);
  transition: background .35s ease;
}
.vle-nav.solid { background: var(--vbg); border-bottom: 1px solid var(--vhair); }
.vle-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.vle-logo-mark { width: 30px; height: 29px; flex: none; object-fit: contain; }
.vle-logo-word { font-weight: 800; letter-spacing: .16em; font-size: 14px; }
.vle-logo-word b { color: var(--vgold); }
.vle-links { display: flex; gap: 22px; flex: 1; }
.vle-links a { font-size: 14px; font-weight: 600; color: var(--vmuted); text-decoration: none; transition: color .2s; }
.vle-links a:hover { color: #fff; }
.vle-links a.active { color: #fff; font-weight: 800; }
.vle-nav-right { display: flex; align-items: center; gap: 18px; }
.vle-search { display: flex; align-items: center; border: 1px solid transparent; border-radius: 8px; transition: all .25s; height: 38px; }
.vle-search.open { background: rgba(14,7,34,.85); border-color: rgba(255,255,255,.6); padding-right: 8px; }
.vle-search-btn { background: none; border: 0; padding: 8px; cursor: pointer; display: grid; place-items: center; }
.vle-search-btn svg, .vle-portal-btn svg { width: 22px; height: 22px; }
.vle-search input { width: 0; opacity: 0; background: none; border: 0; outline: none; color: #fff; font-size: 14px; font-family: inherit; transition: width .25s, opacity .2s; }
.vle-search.open input { width: 230px; opacity: 1; }
.vle-search input::-webkit-search-cancel-button { filter: invert(1); }
.vle-portal-btn { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 99px; border: 1px solid rgba(255,255,255,.3); text-decoration: none; }
.vle-portal-btn:hover { background: rgba(255,255,255,.1); }
.vle-profile { position: relative; }
.vle-avatar { width: 34px; height: 34px; border-radius: 8px; border: 0; font-weight: 800; font-size: 13px; cursor: pointer; }
.vle-profile-menu { position: absolute; right: 0; top: 46px; width: 230px; background: var(--vbg3); border: 1px solid var(--vhair); border-radius: 12px; padding: 8px; display: none; box-shadow: 0 16px 48px rgba(0,0,0,.55); }
.vle-profile.open .vle-profile-menu { display: block; }
.vle-profile-menu .pm-head { padding: 8px 10px 10px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 6px; display: flex; flex-direction: column; }
.vle-profile-menu .pm-head span { font-size: 11px; color: var(--vmuted); text-transform: capitalize; }
.vle-profile-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none; }
.vle-profile-menu a:hover { background: rgba(255,255,255,.08); }
.vle-subnav { display: none; }

/* ---------- billboard ---------- */
.vle-billboard { position: relative; height: 56.25vw; max-height: 82vh; min-height: 460px; }
.bb-media { position: absolute; inset: 0; overflow: hidden; }
.bb-img { width: 100%; height: 100%; object-fit: cover; }
.bb-vignette { position: absolute; inset: 0; background: linear-gradient(77deg, rgba(14,7,34,.95) 0%, rgba(14,7,34,.55) 32%, rgba(14,7,34,0) 62%); }
.bb-fade { position: absolute; left: 0; right: 0; bottom: -1px; height: 38%; background: linear-gradient(180deg, transparent 0%, rgba(14,7,34,.6) 50%, var(--vbg) 100%); }
.bb-content { position: absolute; left: 4%; bottom: 30%; width: 44%; z-index: 2; animation: bbIn .8s ease; }
@keyframes bbIn { from { opacity: 0; transform: translateY(16px); } }
.bb-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.bb-chip { color: var(--vgold); border: 1px solid rgba(242,202,80,.55); font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border-radius: 5px; }
.bb-top { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--vmuted); }
.bb-title { font-size: clamp(30px, 4.2vw, 68px); font-weight: 900; line-height: 1.02; margin: 0 0 14px; text-shadow: 0 6px 30px rgba(0,0,0,.5); letter-spacing: -.01em; }
.bb-meta { display: flex; gap: 14px; align-items: center; font-size: clamp(12px, 1.05vw, 15px); font-weight: 600; color: var(--vmuted); margin-bottom: 14px; }
.bb-desc { font-size: clamp(13px, 1.2vw, 18px); line-height: 1.45; text-shadow: 0 2px 10px rgba(0,0,0,.6); margin: 0 0 22px; font-weight: 500; }
.bb-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.bb-btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 26px; border-radius: 8px; border: 0; font-weight: 800; font-size: clamp(14px, 1.15vw, 18px); cursor: pointer; transition: transform .12s, background .15s; white-space: nowrap; }
.bb-btn svg { width: 1.4em; height: 1.4em; }
.bb-btn:hover { transform: translateY(-1px); }
.bb-play { background: #fff; color: #140A30; }
.bb-play:hover { background: rgba(255,255,255,.84); }
.bb-info { background: rgba(109,109,110,.7); color: #fff; }
.bb-info:hover { background: rgba(109,109,110,.5); }
.bb-list { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.bb-rating { position: absolute; right: 0; bottom: 32%; z-index: 2; background: rgba(14,7,34,.55); border-left: 3px solid rgba(255,255,255,.7); padding: 8px 44px 8px 12px; font-size: 14px; font-weight: 650; }
.bb-mobile { display: none; }

/* ---------- rows / sliders ---------- */
.vle-rows { position: relative; z-index: 2; margin-top: -7vw; padding-bottom: 30px; }
.vle-page .vle-rows { margin-top: 0; }
.vle-row { position: relative; margin-bottom: 3vw; z-index: 1; }
.vle-row:hover { z-index: 6; }
.row-title { font-size: clamp(15px, 1.4vw, 22px); font-weight: 750; margin: 0 4% 8px; color: rgba(255,255,255,.92); letter-spacing: -.01em; }
.row-link { display: inline-flex; align-items: center; text-decoration: none; }
.row-link .explore { display: inline-flex; align-items: center; gap: 2px; font-size: .68em; color: var(--vgold); margin-left: 12px; opacity: 0; transform: translateX(-8px); transition: all .3s; font-weight: 700; }
.vle-row:hover .row-link .explore { opacity: 1; transform: none; }
.vle-slider { position: relative; }
.slider-viewport { margin: 0 4%; }
.slider-track { display: flex; transition: transform .75s cubic-bezier(.4, 0, .2, 1); will-change: transform; }
.slider-track > .vle-card { flex: 0 0 calc(100% / var(--pp)); padding: 0 .2vw; box-sizing: border-box; }
.slider-handle {
  position: absolute; top: 0; bottom: 0; width: 4%; z-index: 7; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(14,7,34,.55); color: #fff; opacity: 0; transition: opacity .2s, background .2s;
}
.slider-handle.prev { left: 0; border-radius: 0 6px 6px 0; }
.slider-handle.next { right: 0; border-radius: 6px 0 0 6px; }
.slider-handle svg { width: 34px; height: 34px; transition: transform .15s; }
.slider-handle:hover { background: rgba(14,7,34,.75); }
.slider-handle:hover svg { transform: scale(1.25); }
.vle-slider:hover .slider-handle { opacity: 1; }
.slider-pager { position: absolute; top: -22px; right: 4%; display: flex; gap: 2px; opacity: 0; transition: opacity .2s; }
.vle-slider:hover .slider-pager { opacity: 1; }
.slider-pager i { width: 12px; height: 2px; background: rgba(255,255,255,.35); }
.slider-pager i.on { background: #fff; }

/* ---------- cards ---------- */
.vle-card { position: relative; cursor: pointer; outline: none; }
.vle-card:focus-visible .card-img-wrap, .vle-card:focus-visible > .card-img { box-shadow: 0 0 0 3px var(--vgold); }
.card-img-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--vbg2); }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.card-title-overlay { position: absolute; inset: auto 0 0; padding: 26px 10px 8px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); font-weight: 800; font-size: clamp(11px, .95vw, 15px); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.3); }
.card-progress i { display: block; height: 100%; background: var(--vgold); }
.card-play-ring { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.card-play-ring svg { width: 46px; height: 46px; padding: 11px; border-radius: 50%; border: 2px solid #fff; background: rgba(14,7,34,.55); }
.vle-card:hover .card-play-ring, .dm-ep:hover .card-play-ring, .vl-row:hover .card-play-ring { opacity: 1; }

/* landscape card with delayed expansion */
.card-l { transition: transform .3s cubic-bezier(.4, 0, .2, 1); transform-origin: center center; }
.card-l .card-panel {
  position: absolute; left: .2vw; right: .2vw; top: 100%; background: var(--vbg2); border-radius: 0 0 6px 6px; padding: 12px 12px 14px;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .3s; box-shadow: 0 16px 34px rgba(0,0,0,.55);
}
@media (hover: hover) {
  .card-l:hover { transform: scale(1.45); z-index: 30; transition-delay: .35s; }
  .card-l:hover .card-img-wrap { border-radius: 6px 6px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.4); transition: border-radius 0s .35s; }
  .card-l:hover .card-panel { opacity: 1; visibility: visible; transition-delay: .35s; }
  .card-l:hover .card-title-overlay { opacity: 0; }
}
.card-actions { display: flex; align-items: center; gap: 5px; margin-bottom: 9px; }
.cbtn { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.55); background: rgba(14,7,34,.72); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; transition: border-color .15s, background .15s; }
.cbtn svg { width: 13px; height: 13px; }
.cbtn:hover { border-color: #fff; background: rgba(14,7,34,.92); }
.cbtn-play { background: #fff; color: var(--vbg); border-color: #fff; }
.cbtn-play:hover { background: rgba(255,255,255,.84); }
.cbtn-more { margin-left: auto; }
.cbtn-more svg { transform: rotate(90deg); }
.card-meta { display: flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 700; color: var(--vmuted); margin-bottom: 7px; }
.card-tags { display: flex; align-items: center; gap: 5px; font-size: 8.5px; font-weight: 600; color: var(--vmuted); flex-wrap: wrap; }
.card-tags i { width: 3px; height: 3px; border-radius: 50%; background: var(--vdim); }

/* portrait */
.card-p > .card-img { aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; transition: transform .25s, box-shadow .25s; background: var(--vbg2); }
.card-p:hover > .card-img { transform: scale(1.06); box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 0 2px rgba(255,255,255,.85); z-index: 5; }
.card-badge { position: absolute; top: 8px; left: 8px; background: rgba(14,7,34,.85); border: 1px solid rgba(255,255,255,.3); font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 99px; display: flex; align-items: center; gap: 4px; }

/* top 10 */
.card-top { padding-left: 2.4vw !important; }
.card-top > .card-img { aspect-ratio: 2 / 3; border-radius: 6px; position: relative; z-index: 2; transition: transform .25s; width: 62%; margin-left: auto; }
.card-top .top-num {
  position: absolute; left: -.6vw; bottom: -.5vw; z-index: 1; font-size: 10.5vw; font-weight: 900; line-height: .78; color: var(--vbg);
  -webkit-text-stroke: .25vw rgba(255,255,255,.34); letter-spacing: -.06em; user-select: none;
  transition: -webkit-text-stroke-color .2s ease;
}
.card-top:hover > .card-img { transform: scale(1.06); z-index: 3; }
.card-top:hover .top-num { -webkit-text-stroke-color: var(--vgold); }

/* continue watching */
.card-c-meta { padding: 8px 2px 0; }
.card-c-meta .t { font-weight: 800; font-size: clamp(11px, .95vw, 14px); }
.card-c-meta .s { font-size: clamp(10px, .8vw, 12px); color: var(--vmuted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-c .card-img-wrap { transition: transform .25s; }
.card-c:hover .card-img-wrap { transform: scale(1.05); box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* ---------- generic pages (browse / my list / search / resources) ---------- */
.vle-page { padding: 100px 4% 60px; min-height: 80vh; }
.vle-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.vle-page-head h1 { font-size: clamp(24px, 2.6vw, 38px); font-weight: 900; margin: 0; }
.muted-l { color: var(--vmuted); font-weight: 600; font-size: 14px; }
.vle-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.vle-chips a { padding: 7px 14px; border-radius: 99px; border: 1px solid rgba(255,255,255,.3); font-size: 13px; font-weight: 700; text-decoration: none; transition: all .15s; }
.vle-chips a:hover { border-color: #fff; }
.vle-chips a.on { background: #fff; color: var(--vbg); border-color: #fff; }
.vle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 44px 6px; }
.vle-grid .card-l { --pp: 1; }
.vle-empty { text-align: center; padding: 80px 20px; color: var(--vmuted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vle-empty svg { display: none; }
.vle-empty::before { content: ''; display: block; width: 54px; height: 52px; margin: 0 auto 12px; background: url('/brand/mark-white.png') center/contain no-repeat; opacity: .28; }
.vle-empty b { color: #fff; font-size: 18px; }
.vle-video-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 30px; }
.vl-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; padding: 10px; border-radius: 8px; cursor: pointer; transition: background .15s; }
.vl-row:hover { background: rgba(255,255,255,.06); }
.vl-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--vbg2); }
.vl-thumb img, .vl-thumb .vle-art { width: 100%; height: 100%; object-fit: cover; }
.vl-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.vl-title { font-weight: 800; font-size: 15px; }
.vl-sub { font-size: 12.5px; color: var(--vmuted); }

/* resources */
.res-group { margin-bottom: 34px; }
.res-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.res-head img, .res-head i { width: 40px; height: 60px; border-radius: 5px; object-fit: cover; background: var(--accent, var(--vviolet)); display: block; }
.res-head h2 { font-size: 18px; font-weight: 800; margin: 0; }
.res-list { display: flex; flex-direction: column; gap: 6px; }
.res-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 8px; background: rgba(255,255,255,.05); text-decoration: none; transition: background .15s; }
.res-row:hover { background: rgba(255,255,255,.1); }
.res-ic { width: 40px; height: 40px; border-radius: 10px; background: rgba(124,58,237,.25); color: #D9CBFF; display: grid; place-items: center; flex: none; }
.res-ic svg { width: 20px; height: 20px; }
.res-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.res-body b { font-size: 14px; }
.res-body span { font-size: 12px; color: var(--vmuted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-act { color: var(--vgold); display: grid; place-items: center; }
.res-act svg { width: 20px; height: 20px; }

/* ---------- footer / mobile tab bar ---------- */
.vle-footer { padding: 40px 4% 60px; color: var(--vdim); font-size: 12px; font-weight: 600; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.vle-tabbar { display: none; }
.vle-root.is-watch .vle-nav, .vle-root.is-watch .vle-footer, .vle-root.is-watch .vle-tabbar, .vle-root.is-watch .vle-subnav { display: none !important; }

/* ---------- detail modal ---------- */
.vle-modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.72); overflow-y: auto; padding: 32px 0 60px; animation: fadeIn .2s ease; }
.vle-modal { position: relative; width: 860px; max-width: 95vw; margin: 0 auto; background: var(--vbg2, var(--vbg2)); color: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,.7); animation: popIn .25s cubic-bezier(.34, 1.3, .64, 1); font-family: var(--font); }
.dm-close { position: absolute; top: 16px; right: 16px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(14,7,34,.85); color: #fff; display: grid; place-items: center; cursor: pointer; }
.dm-close svg { width: 20px; height: 20px; }
.dm-hero { position: relative; aspect-ratio: 16 / 9; max-height: 480px; overflow: hidden; background: var(--vbg2); }
.dm-img { width: 100%; height: 100%; object-fit: cover; }
.dm-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; background: linear-gradient(180deg, transparent, var(--vbg2)); }
.dm-hero-content { position: absolute; left: 48px; right: 48px; bottom: 30px; }
.dm-title { font-size: clamp(26px, 4vw, 46px); font-weight: 900; margin: 0 0 18px; text-shadow: 0 4px 24px rgba(0,0,0,.6); line-height: 1.05; }
.dm-actions { display: flex; align-items: center; gap: 10px; }
.dm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; font-weight: 800; font-size: 17px; border-radius: 8px; text-decoration: none; }
.dm-play { background: #fff; color: #140A30; padding: 10px 28px; }
.dm-play svg { width: 26px; height: 26px; }
.dm-play:hover { background: rgba(255,255,255,.84); }
.dm-play[disabled] { opacity: .5; cursor: default; }
.dm-round { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: rgba(255,255,255,.6); color: #fff; }
.dm-round svg { width: 20px; height: 20px; }
.dm-round:hover { border-color: #fff; background: rgba(255,255,255,.9); }
.dm-body { padding: 4px 48px 40px; }
.dm-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin-bottom: 10px; }
.dm-meta { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--vmuted); margin-bottom: 10px; flex-wrap: wrap; }
.dm-tagline { font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.dm-desc { font-size: 14.5px; line-height: 1.55; margin: 0; }
.dm-side { font-size: 13.5px; display: flex; flex-direction: column; gap: 8px; line-height: 1.4; }
.dm-side span { color: var(--vdim); }
.dm-episodes { margin-top: 30px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }
.dm-ep-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.dm-ep-head h3, .dm-resources h3, .dm-similar h3, .dm-about h3 { font-size: 22px; font-weight: 800; margin: 0; }
.dm-season { background: var(--vbg3); color: #fff; border: 1px solid var(--vhair); border-radius: 8px; padding: 8px 12px; font-family: inherit; font-weight: 650; font-size: 14px; }
.dm-season-label { color: var(--vmuted); font-weight: 700; }
.dm-module-desc { color: var(--vmuted); font-size: 13.5px; margin: 0 0 8px; }
.dm-ep { display: grid; grid-template-columns: 36px 150px 1fr; gap: 16px; align-items: center; padding: 16px 10px; border-bottom: 1px solid rgba(255,255,255,.1); border-radius: 8px; cursor: pointer; transition: background .15s; }
.dm-ep:hover, .dm-ep:focus-visible { background: rgba(255,255,255,.07); outline: none; }
.ep-num { font-size: 22px; font-weight: 700; color: var(--vmuted); text-align: center; }
.ep-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: var(--vbg2); }
.ep-thumb img, .ep-thumb .vle-art { width: 100%; height: 100%; object-fit: cover; }
.ep-done { position: absolute; top: 6px; right: 6px; background: var(--vgold); color: #2E1065; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; }
.ep-title { display: flex; justify-content: space-between; gap: 12px; font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.ep-dur { color: var(--vmuted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.ep-body p { margin: 0; font-size: 13px; color: var(--vmuted); line-height: 1.45; }
.dm-resources, .dm-similar, .dm-about { margin-top: 30px; }
.dm-resources h3, .dm-similar h3 { margin-bottom: 14px; }
.dm-similar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sim-card { background: var(--vbg3); border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform .2s; outline: none; }
.sim-card:hover, .sim-card:focus-visible { transform: translateY(-3px); }
.sim-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--vbg2); }
.sim-body { padding: 12px 14px 14px; }
.sim-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.sim-meta .cbtn { margin-left: auto; width: 30px; height: 30px; }
.sim-body b { display: block; font-size: 14px; margin-bottom: 6px; }
.sim-body p { margin: 0; font-size: 12px; color: var(--vmuted); line-height: 1.45; }
.dm-about { font-size: 13.5px; line-height: 1.6; }
.dm-about h3 { margin-bottom: 8px; font-size: 20px; }
.dm-about h3 b { color: var(--vgold); }
.dm-about span { color: var(--vdim); }

/* ---------- player ---------- */
.vle-player { position: fixed; inset: 0; z-index: 90; background: #000; outline: none; }
.vle-player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pl-overlay { position: absolute; inset: 0; pointer-events: none; transition: opacity .35s; }
.pl-overlay > * { pointer-events: auto; }
.vle-player.idle .pl-overlay { opacity: 0; }
.vle-player.idle { cursor: none; }
.pl-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 18px; padding: 22px 3%; background: linear-gradient(180deg, rgba(0,0,0,.7), transparent); }
.pl-back { color: #fff; display: grid; place-items: center; }
.pl-back svg { width: 36px; height: 36px; transition: transform .15s; }
.pl-back:hover svg { transform: scale(1.15); }
.pl-heading { flex: 1; display: flex; flex-direction: column; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.pl-series { font-weight: 800; font-size: 18px; }
.pl-ep { font-size: 14px; color: var(--vmuted); }
.pl-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.pl-big { width: 86px; height: 86px; border-radius: 50%; border: 0; background: rgba(14,7,34,.6); color: #fff; display: none; place-items: center; cursor: pointer; pointer-events: auto; backdrop-filter: blur(4px); transition: transform .15s; }
.pl-big svg { width: 44px; height: 44px; }
.pl-big:hover { transform: scale(1.08); }
.vle-player.paused .pl-big { display: grid; }
.pl-loading { display: none; }
.vle-player.loading .pl-loading { display: block; }
.vle-player.loading .pl-big { display: none; }
.pl-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 3% 22px; background: linear-gradient(0deg, rgba(0,0,0,.8), transparent); }
.pl-bar { position: relative; height: 4px; background: rgba(255,255,255,.28); border-radius: 2px; cursor: pointer; margin-bottom: 16px; transition: height .15s; }
.pl-bar:hover { height: 8px; }
.pl-buffer { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.4); border-radius: 2px; }
.pl-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--vgold); border-radius: 2px; }
.pl-fill i { position: absolute; right: -8px; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--vgold); transform: translateY(-50%) scale(0); transition: transform .15s; box-shadow: 0 0 10px rgba(242,202,80,.6); }
.pl-bar:hover .pl-fill i { transform: translateY(-50%) scale(1); }
.pl-tip { position: absolute; bottom: 18px; transform: translateX(-50%); background: rgba(0,0,0,.85); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; opacity: 0; pointer-events: none; }
.pl-bar:hover .pl-tip { opacity: 1; }
.pl-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pl-left, .pl-right { display: flex; align-items: center; gap: 18px; }
.pl-icon { position: relative; border: 0; background: none; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 4px; transition: transform .15s; }
.pl-icon svg { width: 28px; height: 28px; }
.pl-icon:hover { transform: scale(1.18); }
.pl-icon b { position: absolute; font-size: 9px; font-weight: 800; top: 50%; left: 50%; transform: translate(-50%, -40%); }
#pl-fwd10 svg { transform: scaleX(-1); }
.pl-vol { display: flex; align-items: center; gap: 6px; }
.pl-vol input { width: 0; opacity: 0; transition: all .2s; accent-color: var(--vgold); }
.pl-vol:hover input { width: 90px; opacity: 1; }
.pl-time { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-title-mid { font-weight: 800; font-size: 16px; text-shadow: 0 2px 8px rgba(0,0,0,.7); flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-speed { position: relative; }
#pl-speed-btn { font-weight: 800; font-size: 15px; }
.pl-speed-menu { position: absolute; bottom: 44px; right: 0; background: var(--vbg3); border: 1px solid var(--vhair); border-radius: 10px; padding: 6px; display: none; flex-direction: column; min-width: 90px; }
.pl-speed.open .pl-speed-menu { display: flex; }
.pl-speed-menu button { border: 0; background: none; color: #fff; padding: 8px 12px; text-align: left; cursor: pointer; border-radius: 4px; font-weight: 600; }
.pl-speed-menu button:hover { background: rgba(255,255,255,.1); }
.pl-speed-menu button.on { color: var(--vgold); font-weight: 800; }
.pl-next-card { position: absolute; right: 3%; bottom: 110px; width: 400px; max-width: 90vw; background: rgba(23,16,48,.97); border: 1px solid var(--vhair); border-radius: 14px; padding: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.6); animation: popIn .25s ease; }
.nx-label { font-size: 13px; color: var(--vmuted); font-weight: 700; margin-bottom: 10px; }
.nx-label b { color: var(--vgold); }
.nx-body { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.nx-thumb { width: 130px; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; flex: none; background: var(--vbg2); }
.nx-sub { font-size: 12px; color: var(--vmuted); font-weight: 700; }
.nx-title { font-weight: 800; font-size: 15px; }
.nx-dur { font-size: 12px; color: var(--vmuted); }
.nx-actions { display: flex; gap: 8px; }
.nx-play { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #140A30; border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 800; cursor: pointer; text-decoration: none; }
.nx-play svg { width: 18px; height: 18px; }
.nx-cancel { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 700; cursor: pointer; text-decoration: none; }
.pl-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 380px; max-width: 92vw; background: rgba(14,7,34,.97); border-left: 1px solid var(--vhair); transform: translateX(100%); transition: transform .3s var(--ease, ease); overflow-y: auto; padding: 18px; box-shadow: -10px 0 40px rgba(0,0,0,.5); }
.pl-drawer.open { transform: none; }
.pl-drawer-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; margin-bottom: 10px; }
.pl-drawer-list { display: flex; flex-direction: column; gap: 4px; }
.pd-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; transition: background .15s; }
.pd-row:hover { background: rgba(255,255,255,.08); }
.pd-row.on { background: rgba(242,202,80,.14); outline: 1px solid rgba(242,202,80,.5); }
.pd-n { width: 34px; text-align: center; font-weight: 700; color: var(--vmuted); font-size: 12px; flex: none; }
.pd-thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 4px; object-fit: cover; flex: none; background: var(--vbg2); }
.pd-body { display: flex; flex-direction: column; min-width: 0; }
.pd-body b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-body span { font-size: 11px; color: var(--vmuted); }

/* ---------- studio ---------- */
.st-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; transition: background .15s, transform .12s; }
.st-btn:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.st-btn svg { width: 16px; height: 16px; }
.st-primary { background: var(--vgold); color: #2E1065; border: 0; font-weight: 800; }
.st-danger { color: #FF8FB0; border-color: rgba(255,143,176,.35); }
.st-sm { padding: 6px 9px; font-size: 12px; }
.st-back { display: inline-flex; align-items: center; gap: 6px; color: var(--vmuted); text-decoration: none; font-weight: 700; font-size: 13px; margin-bottom: 14px; }
.st-back svg { width: 16px; height: 16px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.st-card { background: var(--vbg2); border-radius: 14px; overflow: hidden; text-decoration: none; border: 1px solid var(--vhair); transition: transform .15s, box-shadow .15s; }
.st-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.st-card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.st-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.st-card-body b { font-size: 15px; }
.st-card-body span { font-size: 12px; color: var(--vmuted); }
.st-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.st-badges em { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.1); color: var(--vmuted); }
.st-badges em.on { background: rgba(61,220,151,.2); color: var(--vgreen); }
.st-badges em.gold { background: rgba(242,202,80,.2); color: var(--vgold); }
.st-hero { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: center; background: var(--vbg2); border-radius: 14px; overflow: hidden; margin-bottom: 26px; border: 1px solid rgba(255,255,255,.08); }
.st-hero-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.st-hero-body { padding: 18px 22px 18px 0; }
.st-hero-body h1 { font-size: 28px; font-weight: 900; margin: 8px 0 4px; }
.st-hero-body p { color: var(--vmuted); margin: 0 0 14px; }
.st-section { margin-bottom: 30px; }
.st-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.st-section-head h2 { font-size: 20px; font-weight: 800; margin: 0; }
.st-module { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.st-module-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.st-module-head b { display: block; font-size: 15px; }
.st-module-head span { font-size: 12.5px; color: var(--vmuted); }
.st-videos { display: flex; flex-direction: column; gap: 6px; }
.st-video { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; background: rgba(0,0,0,.2); }
.st-vthumb { width: 110px; aspect-ratio: 16 / 9; border-radius: 4px; object-fit: cover; background: var(--vbg2); flex: none; }
.st-video-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-video-body b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-video-body span { font-size: 12px; color: var(--vmuted); }
.st-empty { color: var(--vmuted); font-size: 13.5px; padding: 12px 4px; }
.st-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.st-thumb-preview { margin-bottom: 14px; }
.st-thumb-preview canvas { width: 240px; border-radius: 8px; display: block; border: 1px solid var(--line); }
.st-thumb-preview span { font-size: 11.5px; color: var(--muted); }
.st-progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.st-progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }

/* ---------- responsive ---------- */
@media (max-width: 1400px) { .vle-root { --pp: 5; } }
@media (max-width: 1100px) { .vle-root { --pp: 4; } .vle-links { gap: 16px; } .vle-links a { font-size: 13px; } }
@media (max-width: 900px) { .vle-portal-btn span { display: none; } .vle-portal-btn { padding: 7px; border-radius: 10px; } .dm-cols { grid-template-columns: 1fr; } .dm-similar-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .vle-root { --pp: 3; } .bb-content { width: 60%; bottom: 24%; } .bb-rating { display: none; } }
@media (hover: none) {
  .slider-viewport { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .slider-viewport::-webkit-scrollbar { display: none; }
  .slider-track { transform: none !important; }
  .slider-handle, .slider-pager { display: none; }
  .vle-slider .slider-track > .vle-card { flex-basis: 30%; }
  .row-link .explore { opacity: 1; transform: none; }
}
@media (max-width: 760px) {
  .vle-root { --pp: 2; }
  .vle-nav { height: 60px; gap: 12px; padding: 0 16px; }
  .vle-links { display: none; }
  .vle-logo-word { display: none; }
  .vle-nav-right { flex: 1; justify-content: flex-end; gap: 10px; }
  .vle-search.open input { width: min(52vw, 220px); }
  .vle-subnav { display: flex; gap: 6px; position: fixed; top: 60px; left: 0; right: 0; z-index: 59; padding: 6px 14px 10px; background: linear-gradient(180deg, rgba(14,7,34,.95), rgba(14,7,34,0)); overflow-x: auto; scrollbar-width: none; transition: transform .25s ease, opacity .25s ease; }
  .vle-subnav.hide { transform: translateY(-120%); opacity: 0; pointer-events: none; }
  .vle-subnav a { flex: none; padding: 6px 13px; border-radius: 99px; border: 1px solid rgba(255,255,255,.35); font-size: 12.5px; font-weight: 700; text-decoration: none; }
  .vle-subnav a.active { background: #fff; color: var(--vbg); border-color: #fff; }
  .vle-billboard { height: auto; min-height: 0; max-height: none; padding: 112px 16px 10px; background: radial-gradient(80% 50% at 50% 30%, rgba(124,58,237,.35), transparent 70%), var(--vbg); }
  .bb-media, .bb-content, .bb-rating { display: none; }
  .bb-mobile { display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .bb-poster { width: 64vw; max-width: 300px; aspect-ratio: 2 / 3; border-radius: 12px; object-fit: cover; box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.1); background: var(--vbg2); }
  .bb-mobile-tags { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--vmuted); flex-wrap: wrap; justify-content: center; }
  .bb-mobile-tags i { color: var(--vgold); font-style: normal; }
  .bb-mobile-actions { display: flex; align-items: center; justify-content: center; gap: 26px; width: 100%; }
  .bbm-btn { background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; cursor: pointer; }
  .bbm-btn svg { width: 24px; height: 24px; }
  .bbm-play { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--vbg); border: 0; border-radius: 8px; padding: 10px 34px; font-weight: 800; font-size: 15px; cursor: pointer; }
  .bbm-play svg { width: 22px; height: 22px; }
  .vle-rows { margin-top: 18px; padding-bottom: 90px; }
  .vle-row { margin-bottom: 24px; }
  .row-title { margin: 0 16px 8px; font-size: 15px; }
  .slider-viewport { margin: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .slider-viewport::-webkit-scrollbar { display: none; }
  .slider-track { transform: none !important; gap: 0; }
  .slider-handle, .slider-pager { display: none; }
  .row-landscape .slider-track > .vle-card, .row-continue .slider-track > .vle-card { flex: 0 0 62%; }
  .row-portrait .slider-track > .vle-card { flex: 0 0 31%; }
  .row-top10 .slider-track > .vle-card { flex: 0 0 44%; }
  .card-top .top-num { font-size: 22vw; -webkit-text-stroke-width: 2px; }
  .card-l .card-panel { display: none; }
  .card-l:hover { transform: none; }
  .vle-page { padding: 118px 16px 100px; }
  .vle-grid { grid-template-columns: 1fr 1fr; gap: 10px 8px; }
  .vl-row { grid-template-columns: 130px 1fr; gap: 10px; }
  .vle-footer { padding-bottom: 100px; }
  .vle-tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 62; background: rgba(14,7,34,.97); border-top: 1px solid rgba(255,255,255,.1); padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); }
  .vle-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: var(--vmuted); text-decoration: none; }
  .vle-tabbar a svg { width: 22px; height: 22px; }
  .vle-tabbar a.active { color: #fff; }
  .vle-tabbar a.active svg { color: var(--vgold); }
  .vle-modal-overlay { padding: 0; }
  .vle-modal { max-width: 100%; width: 100%; min-height: 100dvh; border-radius: 0; }
  .dm-hero { max-height: none; }
  .dm-hero-content { left: 18px; right: 18px; bottom: 18px; }
  .dm-body { padding: 4px 18px 40px; }
  .dm-ep { grid-template-columns: 24px 110px 1fr; gap: 10px; padding: 12px 4px; }
  .dm-similar-grid { grid-template-columns: 1fr; }
  .pl-top { padding: 14px 16px; }
  .pl-series { font-size: 15px; } .pl-ep { font-size: 12px; }
  .pl-bottom { padding: 0 16px 14px; }
  .pl-title-mid, .pl-vol input, .pl-time { display: none; }
  .pl-left, .pl-right { gap: 10px; }
  .pl-icon svg { width: 24px; height: 24px; }
  .pl-next-card { right: 16px; left: 16px; width: auto; bottom: 90px; }
  .st-hero { grid-template-columns: 1fr; }
  .st-hero-body { padding: 0 18px 18px; }
}

/* ---------- studio: the library list ---------- */
.st-list { display: flex; flex-direction: column; gap: 8px; }
.st-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  background: var(--vbg2); border: 1px solid var(--vhair); border-radius: 12px; padding: 8px 12px 8px 8px;
}
.st-row:hover { border-color: rgba(255,255,255,.22); }
.st-order { display: flex; align-items: center; gap: 2px; color: var(--vmuted); font-size: 12px; font-weight: 800; }
.st-order > span { min-width: 20px; text-align: center; }
.st-ord {
  border: 0; background: rgba(255,255,255,.06); color: #fff; border-radius: 7px; cursor: pointer;
  width: 26px; height: 26px; display: grid; place-items: center; transition: background .15s, opacity .15s;
}
.st-ord:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.st-ord:disabled { opacity: .25; cursor: default; }
.st-ord svg { width: 14px; height: 14px; transform: rotate(90deg); }
.st-row-main { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.st-row-img { width: 108px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; }
.st-row-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.st-row-body b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-row-body span { font-size: 12px; color: var(--vmuted); }
.st-row-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.st-toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 99px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--vmuted);
  font-size: 11.5px; font-weight: 800; transition: background .15s, color .15s, border-color .15s;
}
.st-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }
.st-toggle svg { width: 14px; height: 14px; }
.st-toggle.on { background: rgba(61,220,151,.16); border-color: rgba(61,220,151,.4); color: var(--vgreen); }
.st-toggle[data-feature].on { background: rgba(242,202,80,.18); border-color: rgba(242,202,80,.42); color: var(--vgold); }
.st-toggle:disabled { opacity: .5; cursor: default; }
.st-note { color: var(--vmuted); font-size: 12.5px; margin: 14px 2px 0; }
.st-n {
  display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 800; color: var(--vmuted);
  background: rgba(255,255,255,.08); border-radius: 99px; padding: 2px 9px; vertical-align: middle;
}
.st-video .st-order { flex: none; }
.st-video .st-ord { width: 22px; height: 22px; }
@media (max-width: 720px) {
  .st-row { grid-template-columns: auto 1fr; }
  .st-row-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .st-row-img { width: 76px; }
}

/* ---------- studio dialogs (these mount in #modal-root, on the light theme) ---------- */
.modal.modal-wide { max-width: 720px; }
.vle-studio-form label em {
  font-style: normal; font-weight: 600; font-size: 11px; color: var(--text-3); margin-left: 4px;
}
.st-switches {
  display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2);
}
.st-upload-status { font-size: 12.5px; color: var(--text-2); margin-bottom: 12px; }
.rf-drop.is-locked { opacity: .5; pointer-events: none; }

/* video queue: one row per file, its title already filled in */
.uf-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 300px; overflow-y: auto; }
.uf-item {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--r-sm); background: var(--fill);
}
.uf-thumb {
  width: 76px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; flex: none;
  background: var(--p-900); display: grid; place-items: center;
}
.uf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uf-spin {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff; animation: vspin .8s linear infinite; display: block;
}
.uf-fields { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.uf-title {
  width: 100%; border: 1px solid transparent; background: var(--card); border-radius: var(--r-xs);
  padding: 7px 9px; font: inherit; font-size: 13px; font-weight: 650; color: var(--text);
}
.uf-title:hover { border-color: var(--line); }
.uf-title:focus { border-color: var(--accent); outline: none; }
.uf-meta { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uf-state { width: 18px; display: grid; place-items: center; }
.uf-state svg { width: 16px; height: 16px; }
.uf-state[data-state="done"] svg { color: var(--success); }
.uf-state[data-state="failed"] svg { color: var(--alert); }
.uf-x {
  border: 0; background: none; cursor: pointer; color: var(--text-3); padding: 4px; border-radius: var(--r-xs);
}
.uf-x:hover { background: var(--fill-2); color: var(--alert); }
.uf-x svg { width: 14px; height: 14px; }

/* student picker */
.sp-tools { display: grid; grid-template-columns: 1fr 200px; gap: 8px; margin-bottom: 10px; }
.sp-search, .sp-tools select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font: inherit; font-size: 13px; background: var(--card); color: var(--text);
}
.sp-bulk { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.sp-bulk .st-btn { border-color: var(--line); background: var(--fill); color: var(--text); }
.sp-bulk .st-btn:hover { background: var(--fill-2); }
.sp-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-2); }
.sp-list {
  display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px;
}
.sp-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r-xs); cursor: pointer;
}
.sp-row:hover { background: var(--fill); }
.sp-row input { width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.sp-av {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-size: 11px; font-weight: 800;
}
.sp-body { min-width: 0; display: flex; flex-direction: column; }
.sp-body b { font-size: 13.5px; font-weight: 650; }
.sp-body span { font-size: 11.5px; color: var(--text-3); }
@media (max-width: 620px) {
  .sp-tools { grid-template-columns: 1fr; }
  .uf-item { grid-template-columns: auto 1fr auto; }
  .uf-thumb { width: 60px; }
}

/* ---------- empty library ---------- */
.vle-empty-lg { padding: 90px 20px; max-width: 520px; margin: 0 auto; }
.vle-empty-lg b { font-size: 22px; }
.vle-empty-lg span { font-size: 14px; line-height: 1.6; }
.vle-empty-lg::before { width: 74px; height: 71px; opacity: .3; margin-bottom: 18px; }

/* ---------- resource upload dialog ---------- */
.rf-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.rf-tab {
  flex: 1; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--card); color: var(--text-2); font-weight: 700; font-size: 12.5px; cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.rf-tab:hover { background: var(--fill); color: var(--text); }
.rf-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rf-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 26px 18px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  background: var(--surface-2); cursor: pointer; transition: border-color var(--t), background var(--t);
}
.rf-drop:hover, .rf-drop.is-over { border-color: var(--accent); background: var(--p-50); }
.rf-drop b { font-size: 14px; }
.rf-drop span { font-size: 11.5px; color: var(--text-2); max-width: 44ch; line-height: 1.5; }
.rf-drop-ic { color: var(--accent); }
.rf-drop-ic svg { width: 26px; height: 26px; }
.rf-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; max-height: 190px; overflow-y: auto; }
.rf-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-xs); background: var(--fill); font-size: 12.5px; }
.rf-ext {
  flex: none; min-width: 44px; text-align: center; font-size: 9.5px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 6px; border-radius: 4px; background: var(--p-100); color: var(--accent);
}
.rf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rf-size { flex: none; color: var(--text-3); font-size: 11.5px; }

/* resource rows: the file type reads at a glance */
.res-row.is-static { cursor: default; }
.res-ic-pdf, .res-ic-doc { background: rgba(179, 38, 30, .14); color: #E4796F; }
.res-ic-slides { background: rgba(242, 202, 80, .16); color: var(--vgold); }
.res-ic-sheet { background: rgba(70, 211, 154, .14); color: #7BE0B8; }
.res-ic-image { background: rgba(145, 137, 217, .18); color: #B7AEEC; }
.res-ic-archive, .res-ic-file { background: rgba(255, 255, 255, .10); color: rgba(255, 255, 255, .72); }
.res-ic-audio { background: rgba(242, 202, 80, .12); color: var(--vgold); }
.res-ic-link { background: rgba(255, 255, 255, .10); color: #fff; }

/* ================= coursework: assignments and quizzes ================= */
/* The VLE pages are dark (--v* tokens); dialogs mount in #modal-root on the light theme. */

.cw-kind { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; }
.cw-assignment { background: rgba(242,202,80,.16); color: var(--vgold); }
.cw-quiz { background: rgba(124,92,255,.22); color: #B7AEEC; }
.cw-kind svg { width: 16px; height: 16px; }

.cw-group { margin-bottom: 26px; }
.cw-group h2 { font-size: 15px; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.cw-group h2 span { font-size: 11.5px; font-weight: 800; color: var(--vmuted); background: rgba(255,255,255,.08); border-radius: 99px; padding: 2px 9px; }
.cw-note { color: var(--vmuted); font-size: 12.5px; margin: 0 0 10px; }
.cw-list { display: flex; flex-direction: column; gap: 6px; }
.cw-row {
  display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 12px;
  background: var(--vbg2); border: 1px solid var(--vhair); border-radius: 12px; padding: 10px 14px;
  text-decoration: none; color: inherit; transition: border-color .15s, transform .12s;
}
.cw-row:hover { border-color: rgba(255,255,255,.24); transform: translateX(2px); }
.cw-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cw-body b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-body span { font-size: 12px; color: var(--vmuted); }
.cw-due { font-size: 12px; color: var(--vmuted); white-space: nowrap; }
.cw-due.is-over, .is-over { color: #FF8FB0; }
.cw-state { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 99px; white-space: nowrap;
  background: rgba(255,255,255,.08); color: var(--vmuted); }
.cw-state.ok { background: rgba(61,220,151,.16); color: var(--vgreen); }
.cw-state.in { background: rgba(242,202,80,.16); color: var(--vgold); }
.cw-state.todo { background: rgba(124,92,255,.2); color: #C3B9F5; }
.cw-state.over { background: rgba(255,143,176,.14); color: #FF8FB0; }
.cw-go { color: var(--vmuted); display: grid; place-items: center; }

/* one assignment or quiz */
.vle-cw-one { max-width: 860px; }
.cw-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.cw-head h1 { font-size: 30px; font-weight: 900; margin: 0 0 6px; line-height: 1.15; }
.cw-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--vmuted); }
.cw-draft { color: var(--vgold); font-weight: 700; }
.cw-brief { background: var(--vbg2); border: 1px solid var(--vhair); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.cw-brief h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--vmuted); margin: 0 0 8px; }
.cw-brief p { margin: 0; line-height: 1.65; white-space: pre-wrap; }
.cw-result {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; padding: 18px 20px;
  background: linear-gradient(120deg, rgba(61,220,151,.12), rgba(255,255,255,.03)); border: 1px solid rgba(61,220,151,.28); border-radius: 14px;
}
.cw-mark { display: flex; align-items: baseline; gap: 8px; }
.cw-mark b { font-size: 42px; font-weight: 900; line-height: 1; }
.cw-mark span { color: var(--vmuted); font-size: 13px; }
.cw-feedback { flex: 1; min-width: 240px; }
.cw-feedback h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--vmuted); margin: 0 0 4px; }
.cw-feedback p { margin: 0; line-height: 1.6; }
.cw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.cw-tile { background: var(--vbg2); border: 1px solid var(--vhair); border-radius: 12px; padding: 14px 16px; }
.cw-tile b { display: block; font-size: 26px; font-weight: 900; }
.cw-tile span { font-size: 12px; color: var(--vmuted); }
.cw-tile.warn { border-color: rgba(242,202,80,.4); }
.cw-tile.warn b { color: var(--vgold); }
.cw-submit { background: var(--vbg2); border: 1px solid var(--vhair); border-radius: 12px; padding: 18px 20px; margin-top: 18px; }
.cw-submit h3 { font-size: 15px; font-weight: 800; margin: 0 0 12px; }
.cw-submit textarea, .cw-submit input[type=file] {
  width: 100%; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); border-radius: 10px;
  color: #fff; font: inherit; font-size: 14px; padding: 12px 14px; line-height: 1.6;
}
.cw-submit textarea:focus, .cw-submit input:focus { outline: none; border-color: var(--vgold); }
.cw-submit label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.cw-submit label em { font-style: normal; font-weight: 500; color: var(--vmuted); }
.cw-submit .form-field { margin-bottom: 14px; }
.cw-submit .form-hint { font-size: 11.5px; color: var(--vmuted); margin-top: 6px; }
.cw-submit .form-hint.over { color: #FF8FB0; font-weight: 700; }
.cw-sub-state { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--vgreen); margin-bottom: 14px; }
.cw-sub-state.late { color: var(--vgold); }
.cw-sub-state svg { width: 15px; height: 15px; }
.cw-sub-state a { color: inherit; }
.cw-readback { background: rgba(0,0,0,.24); border-radius: 10px; padding: 14px 16px; white-space: pre-wrap; line-height: 1.65; font-size: 13.5px; }
.cw-warn { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--vgold); margin-bottom: 12px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.qz-start { margin: 18px 0; }

/* marking */
.mk-list { display: flex; flex-direction: column; gap: 6px; }
.mk-row {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 14px; width: 100%;
  background: var(--vbg2); border: 1px solid var(--vhair); border-radius: 12px; padding: 11px 14px;
  color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s;
}
.mk-row:hover { border-color: rgba(255,255,255,.24); }
.mk-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-name b { font-size: 14px; }
.mk-name span { font-size: 11.5px; color: var(--vmuted); }
.mk-flags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mk-mark { font-size: 12.5px; font-weight: 800; color: var(--vgold); white-space: nowrap; }
.mk-mark.done { color: var(--vgreen); }
.mk-missing { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-missing span { font-size: 12px; color: var(--vmuted); background: rgba(255,255,255,.06); border-radius: 99px; padding: 4px 11px; }
.ig-pill { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--vmuted); white-space: nowrap; }
.ig-pill.hot { background: rgba(255,143,176,.18); color: #FF8FB0; }
.ig-pill.warn { background: rgba(242,202,80,.18); color: var(--vgold); }
.ig-pill.mute { opacity: .6; }
.ig-disclaimer { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--vmuted); margin-top: 22px; line-height: 1.6; max-width: 70ch; }
.ig-disclaimer svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

/* studio: coursework rows inside a module */
.st-cw { display: flex; flex-direction: column; gap: 6px; }
.st-cw-row {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
  padding: 10px 13px; text-decoration: none; color: inherit;
}
.st-cw-row:hover { border-color: rgba(255,255,255,.2); }
.st-cw-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-cw-body b { font-size: 14px; }
.st-cw-body span { font-size: 11.5px; color: var(--vmuted); }
.st-cw-state { font-size: 11.5px; font-weight: 700; color: var(--vmuted); white-space: nowrap; }
.st-cw-state.warn { color: var(--vgold); }

/* coursework inside the detail modal */
.dm-cw-list { display: flex; flex-direction: column; gap: 6px; }
.dm-cw {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px;
  background: rgba(255,255,255,.05); border-radius: 10px; padding: 9px 12px; text-decoration: none; color: inherit;
}
.dm-cw:hover { background: rgba(255,255,255,.1); }
.dm-cw-body { min-width: 0; display: flex; flex-direction: column; }
.dm-cw-body b { font-size: 13.5px; }
.dm-cw-body span { font-size: 11.5px; color: var(--vmuted); }
.dm-cw-state { font-size: 11.5px; font-weight: 700; color: var(--vgold); white-space: nowrap; }

/* ---- sitting a quiz ---- */
.vle-sit { max-width: 840px; }
.sit-bar {
  position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto; gap: 10px 16px;
  align-items: center; padding: 12px 16px; margin: -8px -4px 18px;
  background: rgba(18,12,46,.94); backdrop-filter: blur(10px);
  border: 1px solid var(--vhair); border-radius: 12px;
}
.sit-title b { display: block; font-size: 15px; }
.sit-title span { font-size: 11.5px; color: var(--vmuted); }
.sit-progress { grid-column: 1 / -1; height: 4px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; order: 3; }
.sit-progress i { display: block; height: 100%; width: 0; background: var(--vgold); transition: width .25s; }
.sit-right { display: flex; align-items: center; gap: 12px; }
.sit-count { font-size: 12px; color: var(--vmuted); white-space: nowrap; }
.sit-clock {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 16px; padding: 5px 11px; border-radius: 8px;
  background: rgba(255,255,255,.08);
}
.sit-clock.low { background: rgba(255,143,176,.2); color: #FF8FB0; }
.sit-q { background: var(--vbg2); border: 1px solid var(--vhair); border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; }
.sit-q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qb-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 800; flex: none; }
.qz-type { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--vmuted); }
.qz-marks { font-size: 11.5px; color: var(--vgold); font-weight: 700; margin-left: auto; }
.sit-saved { font-size: 11px; color: var(--vgreen); display: flex; align-items: center; gap: 4px; }
.sit-saved svg { width: 13px; height: 13px; }
.sit-q-text { font-size: 15.5px; line-height: 1.6; margin: 0 0 14px; white-space: pre-wrap; }
.sit-opts { display: flex; flex-direction: column; gap: 7px; }
.sit-opt {
  display: flex; align-items: flex-start; gap: 11px; padding: 11px 14px; border-radius: 10px; cursor: pointer;
  background: rgba(0,0,0,.22); border: 1px solid transparent; transition: border-color .15s, background .15s;
}
.sit-opt:hover { background: rgba(255,255,255,.06); }
.sit-opt input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--vgold); flex: none; }
.sit-opt:has(input:checked) { border-color: var(--vgold); background: rgba(242,202,80,.1); }
.sit-short, .sit-long {
  width: 100%; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); border-radius: 10px;
  color: #fff; font: inherit; font-size: 14px; padding: 12px 14px; line-height: 1.6;
}
.sit-short:focus, .sit-long:focus { outline: none; border-color: var(--vgold); }
.sit-end { text-align: center; padding: 26px 0 10px; }

/* ---- a finished attempt ---- */
.qz-result { justify-content: space-between; }
.qz-result-meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.qz-pct { font-size: 20px; font-weight: 800; }
/* On a phone the two halves stack; keep the details under the mark, not pushed to the right. */
@media (max-width: 620px) {
  .qz-result { flex-direction: column; align-items: flex-start; gap: 12px; }
  .qz-result-meta { align-items: flex-start; }
}
.qz-review { display: flex; flex-direction: column; gap: 10px; }
.qz-r-q { background: var(--vbg2); border: 1px solid var(--vhair); border-left-width: 3px; border-radius: 12px; padding: 16px 18px; }
.qz-r-q.is-ok { border-left-color: var(--vgreen); }
.qz-r-q.is-no { border-left-color: #FF8FB0; }
.qz-r-q.is-wait { border-left-color: var(--vgold); }
.qz-verdict { font-size: 11.5px; font-weight: 700; display: flex; align-items: center; gap: 4px; color: var(--vmuted); }
.qz-verdict svg { width: 13px; height: 13px; }
.qz-p-opts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.qz-p-opts li {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 8px 12px; border-radius: 8px;
  background: rgba(0,0,0,.2); color: var(--vmuted);
}
.qz-p-opts li.ok { background: rgba(61,220,151,.12); color: var(--vgreen); }
.qz-p-opts li.picked { box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); color: #fff; }
.qz-p-opts li.ok.picked { color: var(--vgreen); }
.qz-p-opts li em { font-style: normal; font-size: 11px; opacity: .7; margin-left: auto; }
.qz-p-opts li svg { width: 13px; height: 13px; flex: none; }
.qz-r-text { margin-top: 10px; background: rgba(0,0,0,.2); border-radius: 8px; padding: 12px 14px; }
.qz-r-text b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--vmuted); }
.qz-r-text p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.6; font-size: 13.5px; }
.qz-accept, .qz-expl, .qz-fb { font-size: 12.5px; color: var(--vmuted); margin-top: 10px; line-height: 1.55; }
.qz-fb { color: var(--vgold); }
.qz-mark { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,.14); }
.qz-mark label { font-size: 12px; color: var(--vmuted); display: flex; align-items: center; gap: 6px; }
.qz-mark input { background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: #fff; font: inherit; font-size: 13px; padding: 7px 10px; }
.qz-mark input[type=number] { width: 78px; }
.qz-mark input[type=text] { flex: 1; min-width: 180px; }

/* ---- the builder ---- */
.vle-builder { max-width: 860px; }
.qb-list { display: flex; flex-direction: column; gap: 12px; }
.qb-card { background: var(--vbg2); border: 1px solid var(--vhair); border-radius: 12px; padding: 16px 18px; }
.qb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.qb-marks { font-size: 11.5px; color: var(--vmuted); display: flex; align-items: center; gap: 6px; }
.qb-marks input { width: 66px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.16); border-radius: 7px; color: #fff; font: inherit; font-size: 12.5px; padding: 5px 8px; }
.qb-tools { margin-left: auto; display: flex; gap: 5px; }
.qb-tools .st-ord, .qb-tools .st-btn svg { transform: none; }
.qb-tools [data-move="up"] svg, .qb-tools [data-move="down"] svg { transform: rotate(90deg); }
.qb-q, .qb-card input[type=text] {
  width: 100%; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); border-radius: 9px;
  color: #fff; font: inherit; font-size: 14px; padding: 10px 12px; line-height: 1.55;
}
.qb-q:focus, .qb-card input:focus { outline: none; border-color: var(--vgold); }
.qb-opts { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.qb-opt { display: flex; align-items: center; gap: 9px; }
.qb-opt input[type=radio], .qb-opt input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--vgreen); flex: none; }
.qb-x { border: 0; background: none; color: var(--vmuted); cursor: pointer; padding: 5px; border-radius: 6px; }
.qb-x:hover { background: rgba(255,143,176,.16); color: #FF8FB0; }
.qb-note { font-size: 12.5px; color: var(--vmuted); margin: 10px 0; }
.qb-card .form-field { margin-top: 12px; }
.qb-card .form-field label { display: block; font-size: 11.5px; font-weight: 700; margin-bottom: 5px; }
.qb-card .form-field label em { font-style: normal; font-weight: 500; color: var(--vmuted); }
.qb-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding: 16px; border: 1.5px dashed rgba(255,255,255,.18); border-radius: 12px; }
.qb-add > span { font-size: 12.5px; color: var(--vmuted); font-weight: 700; margin-right: 4px; }
.qz-preview { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.qz-preview li { background: var(--vbg2); border: 1px solid var(--vhair); border-radius: 12px; padding: 14px 16px; }
.qz-p-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.qz-preview p { margin: 0; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; }

@media (max-width: 720px) {
  .cw-row { grid-template-columns: auto 1fr auto; }
  .cw-due { grid-column: 2 / -1; }
  .mk-row { grid-template-columns: 1fr auto; }
  .mk-flags { grid-column: 1 / -1; justify-content: flex-start; }
  .sit-bar { grid-template-columns: 1fr; }
  .sit-right { justify-content: space-between; }
  .cw-head h1 { font-size: 24px; }
}

/* ---- the marking dialog (light theme, inside #modal-root) ---- */
.mk-panel .mk-meta { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.mk-panel .mk-text {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; max-height: 320px; overflow-y: auto; white-space: pre-wrap;
  line-height: 1.7; font-size: 13.5px;
}
.mk-panel .st-empty { color: var(--text-2); }
.ig-block { margin-bottom: 20px; }
.ig-block h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin: 0 0 10px; }
.ig-none { font-size: 13px; color: var(--text-2); margin: 0; }
.ig-how, .ig-caution { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin: 10px 0 0; }
.ig-caution { display: flex; gap: 7px; align-items: flex-start; }
.ig-caution svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.ig-match { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px; }
.ig-match-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ig-match-head b { font-size: 13.5px; }
.ig-match-head span { font-size: 11.5px; color: var(--text-3); }
.ig-match-head .ig-pill { margin-left: auto; background: var(--fill); color: var(--text-2); }
.ig-match-head .ig-pill.hot { background: var(--alert-tint); color: var(--alert); }
.ig-match blockquote {
  margin: 0 0 8px; padding: 9px 12px; background: var(--surface-2); border-left: 3px solid var(--alert);
  border-radius: 0 var(--r-xs) var(--r-xs) 0; font-size: 12.5px; line-height: 1.6; color: var(--text);
}
.ig-match cite { display: block; margin-top: 5px; font-style: normal; font-size: 11px; color: var(--text-3); }
.ig-score { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 14px; }
.ig-score b { font-size: 30px; font-weight: 900; line-height: 1; }
.ig-score span { font-size: 12.5px; }
.ig-green { background: rgba(54,46,126,.08); color: var(--text); }
.ig-mid { background: var(--p-50); color: var(--text); }
.ig-amber { background: var(--g-100); color: var(--g-700); }
.ig-red { background: var(--alert-tint); color: var(--alert); }
.ig-sig { margin-bottom: 12px; }
.ig-sig-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 650; margin-bottom: 4px; }
.ig-sig-head span { color: var(--text-3); font-weight: 800; }
.ig-bar { height: 5px; background: var(--fill); border-radius: 99px; overflow: hidden; }
.ig-bar i { display: block; height: 100%; background: var(--accent); }
.ig-sig-sub { font-size: 11px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }
.mk-grade { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.mk-tabs { display: flex; gap: 6px; margin-bottom: 14px; }

/* ---------- safe areas: the VLE is full-bleed, so its fixed chrome keeps clear itself ---------- */
.vle-nav { padding-top: env(safe-area-inset-top); height: calc(68px + env(safe-area-inset-top));
  padding-left: max(4%, env(safe-area-inset-left)); padding-right: max(4%, env(safe-area-inset-right)); }
.vle-page { padding-top: calc(100px + env(safe-area-inset-top)); }
.pl-top { padding-top: calc(22px + env(safe-area-inset-top)); }
.sit-bar { top: calc(76px + env(safe-area-inset-top)); }
@media (max-width: 760px) {
  .vle-nav { height: calc(60px + env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .vle-subnav { top: calc(60px + env(safe-area-inset-top)); }
  .vle-page { padding-top: calc(118px + env(safe-area-inset-top)); }
  .pl-top { padding-top: calc(14px + env(safe-area-inset-top)); }
  .sit-bar { top: calc(108px + env(safe-area-inset-top)); }
  .vle-billboard { padding-top: calc(112px + env(safe-area-inset-top)); }
}

/* Chip rows scroll sideways without a visible bar. scrollbar-width covers Firefox and desktop
   Chrome; Android's WebView and Safari need the WebKit pseudo-element as well. */
.vle-subnav::-webkit-scrollbar, .vle-chips::-webkit-scrollbar, .slider-viewport::-webkit-scrollbar { display: none; }

/* the details sheet is full-bleed on phones: never scroll sideways, and keep the close button
   clear of the status bar and notch */
.vle-modal-overlay { overflow-x: hidden; }
.dm-close { top: calc(16px + env(safe-area-inset-top)); right: calc(16px + env(safe-area-inset-right)); }
@media (max-width: 760px) { .vle-modal-overlay { padding-bottom: env(safe-area-inset-bottom); } }

/* coursework rows on phones: the chevron stays on the right edge, the facts stack beside the icon */
@media (max-width: 720px) {
  .cw-row { grid-template-columns: auto 1fr auto; grid-template-areas: "kind body go" "kind due go" "kind state go"; row-gap: 6px; align-items: center; }
  .cw-row .cw-kind { grid-area: kind; align-self: start; }
  .cw-row .cw-body { grid-area: body; }
  .cw-row .cw-due { grid-area: due; grid-column: auto; }
  .cw-row .cw-state { grid-area: state; justify-self: start; }
  .cw-row .cw-go { grid-area: go; }
}

/* The hand-in form sits on the VLE's dark ground, but .form-field label carries the portal's
   light-theme ink, which left the labels and the file field dark on dark. */
.cw-submit .form-field label, .cw-submit label { color: #fff; }
.cw-submit input[type=file] { color: var(--vmuted); padding: 10px 12px; }
.cw-submit input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; border: 0; border-radius: 99px; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font: 600 13px var(--font, inherit);
}
.cw-submit input[type=file]::file-selector-button:hover { background: rgba(255,255,255,.22); }
/* Any form field on a dark VLE page. Dialogs mount in #modal-root, outside .vle-root, so
   they keep the portal's light theme. */
.vle-root .vle-main .form-field label { color: #fff; }
.vle-root .vle-main .form-field label em { color: var(--vmuted); }
.vle-root .vle-main .form-hint { color: var(--vmuted); }

/* ---- sections (modules brought across from Moodle keep the course's sections) ---- */
.dm-sec { border-bottom: 1px solid rgba(255,255,255,.1); }
.dm-sec > summary { display: flex; align-items: center; gap: 12px; padding: 16px 10px; cursor: pointer; list-style: none; border-radius: 8px; }
.dm-sec > summary::-webkit-details-marker { display: none; }
.dm-sec > summary:hover, .dm-sec > summary:focus-visible { background: rgba(255,255,255,.06); outline: none; }
.dm-sec-title { flex: 1; min-width: 0; font-weight: 800; font-size: 16px; }
.dm-sec-n { color: var(--vmuted); font-weight: 700; font-size: 13px; }
.dm-sec > summary svg { color: var(--vmuted); transition: transform .2s; flex: none; }
.dm-sec[open] > summary svg { transform: rotate(90deg); }
.dm-sec .dm-ep:last-child { border-bottom: 0; }
.st-vsec { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; padding: 0 4px; }
.st-vsec:first-child { margin-top: 0; }
.st-vsec b { font-size: 14px; font-weight: 800; }
.st-vsec span { color: var(--vmuted); font-size: 12px; font-weight: 700; flex: 1; }
.st-section-head .row { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---- link videos: the host's player framed under the VLE's bar ---- */
.vle-player.is-embed { display: flex; flex-direction: column; }
.pe-top { flex: none; display: flex; align-items: center; gap: 18px; padding: calc(14px + env(safe-area-inset-top)) max(3%, env(safe-area-inset-right)) 14px max(3%, env(safe-area-inset-left)); background: #0E0722; border-bottom: 1px solid rgba(255,255,255,.08); }
.pe-top .pl-back svg { width: 30px; height: 30px; }
.pe-top .pl-series { font-size: 16px; }
.pe-top .pl-ep { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-top .pl-heading { min-width: 0; text-shadow: none; }
.pe-frame { flex: 1; min-height: 0; position: relative; background: #000; padding-bottom: env(safe-area-inset-bottom); }
.pe-frame iframe { position: absolute; inset: 0 0 env(safe-area-inset-bottom); width: 100%; height: calc(100% - env(safe-area-inset-bottom)); border: 0; }
.vle-player.is-embed .pl-next-card { bottom: calc(32px + env(safe-area-inset-bottom)); }
@media (max-width: 760px) {
  .pe-top { gap: 12px; }
  .pe-top .pl-series { font-size: 14px; }
  .pe-top .pl-ep { font-size: 12px; }
}
