/* ─────────────────────────────────────────────────────────────────────────────
   CoPlanes Layout films — stage, player, cards, modal, launcher, banner.
   The stage is a fixed 1280×720 canvas with its own cinematic palette (it looks the
   same in light and dark site themes, like any video would). The surrounding UI
   (cards, chips, launcher) follows the page's tokens (index.html :root).
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --cpv-font-en: 'IBM Plex Sans', 'Cairo', system-ui, sans-serif;
  --cpv-font-ar: 'Cairo', 'IBM Plex Sans', system-ui, sans-serif;
  --cpv-surface: var(--surface, #fff);
  --cpv-surface-2: var(--surface-2, #f6f8f9);
  --cpv-ink: var(--ink, #12202a);
  --cpv-muted: var(--muted, #5a6b77);
  --cpv-line: var(--line, #d4dce1);
  --cpv-brand: var(--accent, #1463d8);
}

/* ── Stage ─────────────────────────────────────────────────────────────────── */
.cpv-stage {
  position: relative;
  overflow: hidden;
  color: #eef2ff;
  font-family: var(--cpv-font-en);
  background: #071019;
  -webkit-font-smoothing: antialiased;
  text-align: start;
  line-height: 1.35;
}
.cpv-stage[data-lang='ar'] { font-family: var(--cpv-font-ar); }
.cpv-stage * { box-sizing: border-box; }
.cpv-bg { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, #0f2536 0%, #071019 62%), #071019; }
.cpv-grid {
  position: absolute; inset: -40px;
  background-image: linear-gradient(rgba(140,210,230,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(140,210,230,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 80%);
}
.cpv-orb { position: absolute; width: 380px; height: 380px; border-radius: 50%; filter: blur(110px); opacity: .28; pointer-events: none; }
.cpv-num { font-family: 'IBM Plex Mono', 'CPV Noto Sans', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.cpv-h { font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; color: #f8faff; text-wrap: balance; }
.cpv-stage[data-lang='ar'] .cpv-h { letter-spacing: 0; line-height: 1.4; }
.cpv-sub { color: #9aa8cf; font-size: 20px; margin-top: 10px; }
.cpv-grad { background: linear-gradient(90deg, #5AA2F5, #3FD3BF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cpv-kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: #3FD3BF; margin-bottom: 8px; }
.cpv-stage[data-lang='ar'] .cpv-kicker { letter-spacing: 0; font-size: 14px; }
.cpv-panel { background: rgba(148,170,255,.055); border: 1px solid rgba(160,180,255,.14); border-radius: 16px; backdrop-filter: blur(4px); }
.cpv-paper { background: #fff; border-radius: 14px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.75); color: #0b1220; }
.cpv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid; font-size: 13px; font-weight: 700; white-space: nowrap; }
.cpv-file { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #131c38; border: 1px solid rgba(160,180,255,.3); box-shadow: 0 20px 40px -12px rgba(0,0,0,.6); font-size: 15px; font-weight: 600; white-space: nowrap; }
.cpv-terminal { background: #050814; border: 1px solid rgba(160,180,255,.18); border-radius: 16px; padding: 18px 22px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 15px; line-height: 2; color: #cbd5e1; }
.cpv-win { position: absolute; background: #0b1226; border: 1px solid rgba(160,180,255,.18); border-radius: 18px; overflow: hidden; box-shadow: 0 50px 100px -40px rgba(0,0,0,.85); }
.cpv-win-bar { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 16px; background: rgba(148,170,255,.06); border-bottom: 1px solid rgba(160,180,255,.12); }
.cpv-win-bar i { width: 11px; height: 11px; border-radius: 11px; opacity: .75; }
.cpv-win-title { margin-left: 12px; font-size: 13px; color: #9aa8cf; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpv-win-badge { font-size: 11px; padding: 3px 9px; border-radius: 99px; background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.35); font-weight: 700; }
.cpv-win-body { position: relative; padding: 22px 24px; height: calc(100% - 40px); }
.cpv-tag { position: absolute; top: 18px; display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 99px; background: rgba(5,8,20,.55); border: 1px solid rgba(160,180,255,.16); font-size: 13px; font-weight: 700; color: #cbd5ff; z-index: 60; }
.cpv-mark { position: absolute; top: 18px; display: inline-flex; gap: 7px; align-items: center; font-size: 13px; font-weight: 800; color: rgba(238,242,255,.7); z-index: 60; font-family: var(--cpv-font-en); }
.cpv-caption-wrap { position: absolute; left: 0; right: 0; bottom: 26px; display: flex; justify-content: center; z-index: 70; pointer-events: none; }
.cpv-caption { max-width: 1040px; padding: 10px 22px; border-radius: 14px; background: rgba(4,7,18,.78); border: 1px solid rgba(160,180,255,.14); color: #fff; font-size: 24px; font-weight: 600; text-align: center; line-height: 1.45; box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); }

/* ── Player ────────────────────────────────────────────────────────────────── */
.cpv-player-wrap { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cpv-player-wrap.cpv-layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .cpv-player-wrap.cpv-layout-side { grid-template-columns: minmax(0, 1fr); } }
.cpv-player { position: relative; background: #000; overflow: hidden; outline: none; isolation: isolate; box-shadow: 0 40px 90px -40px rgba(15, 23, 42, .65); }
.cpv-player[data-rounded='true'] { border-radius: 18px; }
.cpv-player:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--cpv-brand) 60%, transparent), 0 40px 90px -40px rgba(15,23,42,.65); }
.cpv-player[data-fs='true'] { border-radius: 0; width: 100vw; height: 100vh; }
.cpv-player[data-fs='true'] .cpv-viewport { height: 100vh; }
.cpv-player[data-idle='true'] { cursor: none; }
.cpv-viewport { position: relative; width: 100%; overflow: hidden; cursor: pointer; background: #070b18; container-type: inline-size; }
@container (max-width: 560px) { .cpv-poster-sub, .cpv-poster-kicker { display: none !important; } .cpv-poster { padding-bottom: 54px !important; } .cpv-poster-title { font-size: 17px !important; } }
.cpv-poster { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: clamp(14px, 2.4vw, 26px); padding: clamp(16px, 4%, 40px) clamp(16px, 4%, 40px) clamp(56px, 9%, 84px); background: linear-gradient(180deg, rgba(4,7,18,0) 0%, rgba(4,7,18,.5) 40%, rgba(4,7,18,.95) 100%); color: #fff; }
.cpv-poster-inner { max-width: 640px; min-width: 0; }
.cpv-poster-kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #93c5fd; margin-bottom: 8px; }
.cpv-poster-title { font-size: clamp(18px, 3.2vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 6px; }
.cpv-poster-sub { font-size: clamp(12px, 1.5vw, 15px); color: rgba(255,255,255,.78); line-height: 1.6; }
.cpv-bigplay { position: relative; flex-shrink: 0; width: clamp(54px, 8vw, 84px); height: clamp(54px, 8vw, 84px); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #1463D8, #12B5A5); box-shadow: 0 0 0 10px rgba(20,99,216,.18), 0 20px 50px -10px rgba(20,99,216,.8); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.cpv-bigplay svg { margin-left: 4px; }
.cpv-viewport:hover .cpv-bigplay { transform: scale(1.08); }
.cpv-bigplay::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(147,197,253,.6); animation: cpv-ring 2.2s ease-out infinite; }
@keyframes cpv-ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.cpv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cpv-flash { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; pointer-events: none; animation: cpv-flash .6s ease-out forwards; }
@keyframes cpv-flash { from { opacity: 1; transform: scale(.8); } to { opacity: 0; transform: scale(1.3); } }
.cpv-end { position: absolute; inset: 0; background: rgba(4,7,18,.72); backdrop-filter: blur(6px); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; padding: 20px; cursor: default; }
.cpv-end-btn { padding: 12px 22px; border-radius: 999px; border: none; background: #fff; color: #0b1220; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.cpv-end-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.cpv-end-next { display: grid; text-align: start; gap: 2px; padding: 12px 18px; border-radius: 14px; border: 1px solid rgba(147,197,253,.4); background: linear-gradient(135deg, rgba(20,99,216,.3), rgba(18,181,165,.3)); color: #fff; cursor: pointer; min-width: 220px; }
.cpv-end-next-k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #93c5fd; font-weight: 800; }
.cpv-end-next-t { font-weight: 700; font-size: 15px; }
.cpv-end-next-d { font-size: 12px; color: rgba(255,255,255,.7); }

.cpv-controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 8px; background: linear-gradient(180deg, transparent, rgba(2,4,12,.85)); transition: opacity .25s, transform .25s; color: #fff; direction: ltr; }
.cpv-controls[data-show='false'] { opacity: 0; transform: translateY(8px); pointer-events: none; }
.cpv-track { position: relative; display: flex; gap: 3px; height: 18px; align-items: center; cursor: pointer; touch-action: none; }
.cpv-seg { position: relative; height: 4px; border-radius: 4px; background: rgba(255,255,255,.22); overflow: hidden; transition: height .15s; }
.cpv-track:hover .cpv-seg { height: 7px; }
.cpv-seg-fill, .cpv-seg-hover { position: absolute; inset: 0; transform-origin: 0 50%; }
.cpv-seg-fill { background: linear-gradient(90deg, #1463D8, #12B5A5); }
.cpv-seg-hover { background: rgba(255,255,255,.3); }
.cpv-knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(20,99,216,.45); transform: scale(0); transition: transform .15s; pointer-events: none; }
.cpv-track:hover .cpv-knob, .cpv-player:focus-visible .cpv-knob { transform: scale(1); }
.cpv-preview { position: absolute; bottom: 26px; transform: translateX(-50%); border-radius: 10px; overflow: hidden; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 16px 40px -10px rgba(0,0,0,.8); background: #000; pointer-events: none; }
.cpv-preview-label { font-size: 11.5px; padding: 5px 8px; background: rgba(2,4,12,.92); color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 184px; }
.cpv-bar { display: flex; align-items: center; gap: 4px; margin-top: 4px; min-width: 0; }
.cpv-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 10px; border: none; background: transparent; color: #fff; cursor: pointer; text-decoration: none; transition: background .15s; }
.cpv-btn:hover, .cpv-btn:focus-visible { background: rgba(255,255,255,.14); outline: none; }
.cpv-txt { font-size: 12.5px; font-weight: 800; font-family: var(--cpv-font-en); }
.cpv-txt[data-on='false'] { opacity: .5; text-decoration: line-through; }
.cpv-time { font-size: 12.5px; font-family: 'IBM Plex Mono', ui-monospace, monospace; color: rgba(255,255,255,.9); margin: 0 6px; white-space: nowrap; }
.cpv-now { font-size: 12.5px; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 560px) { .cpv-now { display: none; } .cpv-btn { min-width: 30px; height: 32px; } }

.cpv-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cpv-chapters-below { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cpv-chapters-side { align-content: start; max-height: 100%; }
.cpv-chapter { position: relative; width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--cpv-line); background: var(--cpv-surface); color: var(--cpv-ink); font-size: 13px; font-weight: 600; text-align: start; cursor: pointer; overflow: hidden; transition: border-color .15s, transform .15s; font-family: inherit; }
.cpv-chapter:hover { border-color: color-mix(in srgb, var(--cpv-brand) 50%, transparent); transform: translateY(-1px); }
.cpv-chapter[data-active='true'] { border-color: var(--cpv-brand); box-shadow: 0 8px 22px -14px var(--cpv-brand); }
.cpv-chapter-n { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--cpv-brand); font-weight: 700; }
.cpv-chapter-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpv-chapter-d { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--cpv-muted); }
.cpv-chapter-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #1463D8, #12B5A5); transform-origin: 0 50%; }
[dir='rtl'] .cpv-chapter-fill { transform-origin: 100% 50%; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.cpv-card { display: flex; flex-direction: column; text-align: start; padding: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--cpv-line); background: var(--cpv-surface); color: var(--cpv-ink); cursor: pointer; font-family: inherit; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s; width: 100%; }
.cpv-card:hover, .cpv-card:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--cpv-accent, #1463D8) 55%, transparent); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--cpv-accent, #1463D8) 70%, transparent); outline: none; }
.cpv-card-media { position: relative; background: #070b18; }
.cpv-thumb { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.cpv-card-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,.92); color: #0b1220; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px -8px rgba(0,0,0,.6); transition: opacity .2s, transform .25s; }
.cpv-card-play svg { margin-left: 3px; }
.cpv-card:hover .cpv-card-play, .cpv-card:focus-visible .cpv-card-play { opacity: 0; transform: scale(.7); }
.cpv-card-dur { position: absolute; bottom: 10px; inset-inline-end: 10px; font: 700 11.5px 'IBM Plex Mono', monospace; padding: 3px 8px; border-radius: 6px; background: rgba(2,4,12,.8); color: #fff; }
.cpv-card-done { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #16a34a; color: #fff; }
.cpv-card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--cpv-accent, #1463D8); transform-origin: 0 50%; }
[dir='rtl'] .cpv-card-progress { transform-origin: 100% 50%; }
.cpv-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.cpv-card-title { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 700; line-height: 1.4; }
.cpv-card-icon { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; background: var(--cpv-accent, #1463D8); }
.cpv-card-sum { font-size: 13px; color: var(--cpv-muted); line-height: 1.6; }
.cpv-card-meta { font-size: 11.5px; color: var(--cpv-muted); opacity: .85; }
.cpv-card[data-compact='true'] .cpv-card-body { padding: 10px 12px 12px; }
.cpv-card[data-compact='true'] .cpv-card-title { font-size: 13.5px; }

/* ── Chip button (page headers) ───────────────────────────────────────────── */
.cpv-chip-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--cpv-accent, #1463D8) 35%, var(--cpv-line)); background: color-mix(in srgb, var(--cpv-accent, #1463D8) 9%, var(--cpv-surface)); color: var(--cpv-ink); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: transform .15s, box-shadow .2s; }
[dir='rtl'] .cpv-chip-btn { padding: 6px 6px 6px 12px; }
.cpv-chip-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -12px var(--cpv-accent, #1463D8); }
.cpv-chip-play { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--cpv-accent, #1463D8); color: #fff; }
.cpv-chip-play svg { margin-left: 2px; }
.cpv-chip-dur { font: 600 11px 'IBM Plex Mono', monospace; color: var(--cpv-muted); }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.cpv-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(2,4,12,.78); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: cpv-fade .2s ease-out; --cpv-surface: #0f172a; --cpv-ink: #e5e7eb; --cpv-muted: #94a3b8; --cpv-line: #1f2a44; --cpv-brand: #1463D8; }
@keyframes cpv-fade { from { opacity: 0; } }
.cpv-modal-box { width: min(1200px, 100%); max-height: 100%; overflow: auto; background: #0b151d; border: 1px solid #1d2e3a; border-radius: 22px; padding: 18px; color: #e5e7eb; animation: cpv-up .3s cubic-bezier(.2,.8,.2,1); box-shadow: 0 50px 120px -30px rgba(0,0,0,.8); }
@keyframes cpv-up { from { transform: translateY(18px) scale(.98); opacity: 0; } }
.cpv-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.cpv-modal-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #5AA2F5; }
.cpv-modal-title { font-size: 19px; font-weight: 800; }
.cpv-modal-x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #1f2a44; background: #111a2e; color: #e5e7eb; font-size: 15px; cursor: pointer; flex-shrink: 0; }
.cpv-modal-x:hover { background: #1b2742; }
.cpv-modal-where { margin-top: 12px; font-size: 13px; color: #94a3b8; }
.cpv-modal-where b { color: #e5e7eb; font-weight: 600; }

/* ── Floating launcher ─────────────────────────────────────────────────────── */
.cpv-launcher { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.cpv-fab { display: inline-flex; align-items: center; gap: 0; height: 52px; min-width: 52px; padding: 0 17px; border-radius: 999px; border: none; color: #fff; background: linear-gradient(135deg, #1463D8, #12B5A5); box-shadow: 0 16px 36px -12px rgba(20,99,216,.75); cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13.5px; transition: gap .25s, padding .25s, transform .2s; position: relative; }
.cpv-fab-label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .3s cubic-bezier(.2,.8,.2,1); }
.cpv-fab:hover, .cpv-fab:focus-visible, .cpv-fab[aria-expanded='true'] { gap: 8px; transform: translateY(-2px); outline: none; }
.cpv-fab:hover .cpv-fab-label, .cpv-fab:focus-visible .cpv-fab-label, .cpv-fab[aria-expanded='true'] .cpv-fab-label { max-width: 140px; }
.cpv-fab[data-fresh='true']::after { content: ''; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid rgba(147,197,253,.7); animation: cpv-ring 2.4s ease-out infinite; pointer-events: none; }
.cpv-launcher-pop { width: min(340px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 110px)); overflow: auto; padding: 14px; border-radius: 20px; background: var(--cpv-surface); border: 1px solid var(--cpv-line); color: var(--cpv-ink); box-shadow: 0 30px 70px -20px rgba(0,0,0,.55); animation: cpv-up .22s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; gap: 12px; }
.cpv-launcher-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cpv-launcher-k { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--cpv-brand); }
.cpv-launcher-t { font-size: 14px; font-weight: 700; }
.cpv-launcher-count { font: 700 12px 'IBM Plex Mono', monospace; padding: 4px 10px; border-radius: 99px; background: var(--cpv-surface-2); border: 1px solid var(--cpv-line); color: var(--cpv-muted); }
.cpv-launcher-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cpv-launcher-list button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; border: none; background: transparent; color: var(--cpv-ink); text-align: start; cursor: pointer; font-size: 13px; font-family: inherit; }
.cpv-launcher-list button:hover { background: var(--cpv-surface-2); }
.cpv-launcher-ico { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.cpv-launcher-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpv-launcher-dur { font: 600 11px 'IBM Plex Mono', monospace; color: var(--cpv-muted); }
.cpv-launcher-all { text-align: center; font-size: 13px; font-weight: 700; padding: 10px; border-radius: 12px; background: var(--cpv-surface-2); color: var(--cpv-brand); text-decoration: none; }
.cpv-launcher-all:hover { filter: brightness(1.1); }
@media print { .cpv-launcher { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .cpv-bigplay::after, .cpv-fab[data-fresh='true']::after { animation: none; }
  .cpv-card, .cpv-chip-btn, .cpv-fab { transition: none; }
}

/* ── Home onboarding banner ───────────────────────────────────────────────── */
.cpv-banner { position: relative; display: grid; grid-template-columns: minmax(200px, 320px) 1fr; gap: 22px; align-items: center; padding: 14px; margin-bottom: 36px; border-radius: 20px; border: 1px solid color-mix(in srgb, #1463D8 30%, var(--cpv-line)); background: linear-gradient(120deg, color-mix(in srgb, #1463D8 10%, var(--cpv-surface)), color-mix(in srgb, #12B5A5 10%, var(--cpv-surface))); overflow: hidden; }
@media (max-width: 680px) { .cpv-banner { grid-template-columns: 1fr; } }
.cpv-banner-media { position: relative; display: block; padding: 0; border: none; border-radius: 14px; overflow: hidden; cursor: pointer; background: #070b18; box-shadow: 0 18px 40px -20px rgba(15,23,42,.8); }
.cpv-banner-media:hover .cpv-card-play { transform: scale(1.1); }
.cpv-banner-body { display: flex; flex-direction: column; gap: 6px; padding-inline-end: 34px; }
.cpv-banner-k { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--cpv-brand); }
.cpv-banner-t { font-size: 19px; font-weight: 800; color: var(--cpv-ink); letter-spacing: -.01em; }
.cpv-banner-s { font-size: 13.5px; color: var(--cpv-muted); line-height: 1.6; }
.cpv-banner-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.cpv-banner-cta { padding: 10px 18px; border-radius: 999px; border: none; color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; background: linear-gradient(135deg, #1463D8, #12B5A5); box-shadow: 0 12px 26px -12px rgba(20,99,216,.8); font-family: inherit; }
.cpv-banner-link { font-size: 13px; font-weight: 600; color: var(--cpv-brand); }
.cpv-banner-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--cpv-line); background: var(--cpv-surface); color: var(--cpv-muted); cursor: pointer; }

/* ── Light product mock-ups inside the stage (the real app's light theme) ───── */
.lv-win { position: absolute; background: #EEF2F4; border-radius: 16px; overflow: hidden; color: #12202A; box-shadow: 0 50px 100px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08); }
.lv-chrome { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #dfe6ea; border-bottom: 1px solid #cdd6dc; direction: ltr; }
.lv-chrome i { width: 10px; height: 10px; border-radius: 10px; background: #b9c4cb; }
.lv-url { margin-left: 14px; padding: 3px 14px; border-radius: 99px; background: #f6f8f9; font-size: 12px; color: #5A6B77; font-family: 'IBM Plex Mono', monospace; }
.lv-body { position: relative; height: calc(100% - 34px); }
.lv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: #fff; border-bottom: 1px solid #E4EAED; }
.lv-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; direction: ltr; white-space: nowrap; }
.lv-brand img { width: 26px; height: 26px; }
.lv-brand .co { color: #0F2A5C; } .lv-brand .pl { color: #1463D8; } .lv-brand .ly { color: #12B5A5; font-weight: 500; }
.lv-tools { display: flex; gap: 8px; align-items: center; }
.lv-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9px; border: 1px solid #D4DCE1; background: #fff; font-size: 14px; font-weight: 500; color: #12202A; white-space: nowrap; }
.lv-btn.primary { background: #1463D8; border-color: #1463D8; color: #fff; font-weight: 600; }
.lv-btn.hot { border-color: #1463D8; color: #1463D8; box-shadow: 0 0 0 3px rgba(20,99,216,.18); }
.lv-btn.primary.hot { color: #fff; box-shadow: 0 0 0 4px rgba(20,99,216,.35); filter: brightness(1.08); }
.lv-card { background: #fff; border: 1px solid #E4EAED; border-radius: 12px; color: #12202A; }
.lv-k { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5A6B77; }
.cpv-stage[data-lang='ar'] .lv-k { letter-spacing: 0; font-size: 13px; text-transform: none; }
.lv-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 99px; border: 1.5px solid; font-size: 13px; font-weight: 600; white-space: nowrap; background: #fff; }
.lv-pill::before { content: ''; width: 8px; height: 8px; border-radius: 8px; background: currentColor; }
.lv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid #D4DCE1; background: #fff; font-size: 13.5px; color: #12202A; white-space: nowrap; }
.lv-chip.on { background: #1463D8; border-color: #1463D8; color: #fff; }
.lv-input { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; border: 1px solid #D4DCE1; background: #F6F8F9; font-size: 15px; min-height: 40px; }
.lv-input.focus { border-color: #1463D8; box-shadow: 0 0 0 3px rgba(20,99,216,.16); background: #fff; }
.lv-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: 1px solid #D4DCE1; background: #fff; font-size: 14.5px; color: #12202A; position: relative; }
.lv-tab.on { background: #1463D8; border-color: #1463D8; color: #fff; font-weight: 600; }
.lv-tab b { position: absolute; top: -4px; inset-inline-end: -4px; width: 11px; height: 11px; border-radius: 11px; background: #12B5A5; border: 2px solid #fff; }
.lv-bar { height: 7px; border-radius: 7px; background: #E4EAED; overflow: hidden; }
.lv-bar > i { display: block; height: 100%; border-radius: 7px; background: #1463D8; }
.lv-num { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.lv-label { position: absolute; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.95); border: 1px solid #D4DCE1; font-size: 12px; font-weight: 600; color: #12202A; white-space: nowrap; transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(18,32,42,.15); direction: ltr; }
.cpv-stage[data-lang='ar'] .lv-label { direction: rtl; }
.lv-label i { width: 8px; height: 8px; border-radius: 8px; }
.lv-dlg { position: absolute; background: #fff; border-radius: 16px; box-shadow: 0 30px 70px -20px rgba(15,30,45,.55), 0 0 0 1px #E4EAED; color: #12202A; overflow: hidden; }
.lv-dlg-h { padding: 16px 20px 12px; border-bottom: 1px solid #E4EAED; font-size: 19px; font-weight: 700; }
.lv-dlg-f { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid #E4EAED; background: #fff; }
.lv-row { display: flex; align-items: center; gap: 10px; }
.lv-toast { position: absolute; padding: 10px 18px; border-radius: 10px; background: #12202A; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 14px 30px -10px rgba(0,0,0,.5); }
.lv-phone { position: absolute; border-radius: 38px; background: #0b1218; padding: 12px; box-shadow: 0 50px 90px -30px rgba(0,0,0,.95), 0 0 0 2px #26343e inset; }
.lv-phone-screen { position: relative; width: 100%; height: 100%; border-radius: 28px; overflow: hidden; background: #EEF2F4; color: #12202A; }
.lv-notch { position: absolute; top: 8px; left: 50%; width: 90px; height: 22px; margin-left: -45px; border-radius: 20px; background: #0b1218; z-index: 5; }
.lv-page { position: absolute; background: #fff; border-radius: 6px; overflow: hidden; color: #0F2A5C; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }

/* ── Inside the app (index.html) ───────────────────────────────────────────── */
/* The film modal is shown in a <dialog> of its own so it sits above the app's dialogs. */
dialog.cpv-host { padding: 0; border: 0; background: transparent; box-shadow: none; width: 100vw; height: 100vh; max-width: none; max-height: none; overflow: visible; border-radius: 0; }
dialog.cpv-host::backdrop { background: transparent; }

.cpv-guides-btn { gap: 7px; }
.cpv-guides-ico { width: 20px; height: 20px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--brand-teal)); padding-inline-start: 1px; }
@media (max-width: 900px) { .cpv-guides-l { display: none; } }

.cpv-chip-btn.cpv-chip-inline { margin-inline-start: 10px; vertical-align: middle; font-size: 12px; padding-block: 3px; }
#mpEmpty .cpv-chip-btn { margin-top: 6px; }

/* Guides library */
.cpv-lib .cpv-modal-head { align-items: center; gap: 12px; }
.cpv-lib-all { margin-inline-start: auto; font-size: 13px; font-weight: 600; color: #7dd3c7; text-decoration: none; white-space: nowrap; }
.cpv-lib-all:hover { text-decoration: underline; }
.cpv-lib-k { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #7dd3c7; margin: 14px 0 8px; }
.cpv-lib[dir='rtl'] .cpv-lib-k { letter-spacing: 0; font-size: 12.5px; }
.cpv-lib-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cpv-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
@media (max-width: 720px) { .cpv-lib-top { grid-template-columns: 1fr; } }

/* First-visit card on the master plan */
.cpv-onb-host { position: absolute; z-index: 6; bottom: 44px; inset-inline-start: 14px; max-width: calc(100% - 28px); }
.cpv-onb { position: relative; display: flex; gap: 14px; align-items: center; width: 520px; max-width: 100%; padding: 10px; padding-inline-end: 38px; border-radius: 16px; background: var(--surface); color: var(--ink); border: 1px solid color-mix(in srgb, var(--brand-teal) 35%, var(--line)); box-shadow: var(--shadow), 0 18px 40px -20px rgba(18,32,42,.45); animation: cpv-up .4s cubic-bezier(.2,.8,.2,1); }
.cpv-onb-media { position: relative; flex: 0 0 190px; padding: 0; border: 0; border-radius: 11px; overflow: hidden; cursor: pointer; background: #071019; }
.cpv-onb-media .cpv-card-play { opacity: 1; transform: none; }
.cpv-onb-loop { display: block; }
.cpv-onb-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cpv-onb-k { font-size: 11px; font-weight: 700; color: var(--brand-teal); text-transform: uppercase; letter-spacing: .08em; }
[dir='rtl'] .cpv-onb-k { letter-spacing: 0; font-size: 12px; }
.cpv-onb-body b { font-size: 15px; line-height: 1.35; }
.cpv-onb-s { font-size: 12.5px; color: var(--muted); }
.cpv-onb-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cpv-onb-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; border-radius: 26px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 12px; }
@media (max-width: 900px) { .cpv-onb-host { bottom: 12px; } .cpv-onb-media { display: none; } .cpv-onb { width: auto; } }

/* Sign-in page film panel (js/backend.js filmPanel) */
#authGate .ag-split { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 420px); gap: 34px; align-items: center; width: min(1110px, 100%); }
.ag-film { display: flex; flex-direction: column; gap: 10px; color: #fff; padding: 22px; border-radius: 22px; background: rgba(7,16,25,.66); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 40px 90px -40px rgba(0,0,0,.8); }
.ag-film-k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #7ee8da; font-weight: 600; }
[dir='rtl'] .ag-film-k { font-family: var(--font); letter-spacing: 0; font-size: 13px; }
.ag-film-t { margin: 0; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
[dir='rtl'] .ag-film-t { letter-spacing: 0; line-height: 1.35; }
.ag-film-s { margin: 0 0 6px; font-size: 14.5px; line-height: 1.7; color: rgba(255,255,255,.82); max-width: 560px; }
.ag-film-media { position: relative; display: block; width: 100%; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; overflow: hidden; cursor: pointer; background: #071019; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.ag-film-media:hover, .ag-film-media:focus-visible { transform: translateY(-3px); box-shadow: 0 50px 90px -30px rgba(0,0,0,.9), 0 0 0 3px rgba(63,211,191,.45); outline: none; }
.ag-film-loop { display: block; }
.ag-film-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 64px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--brand-teal)); box-shadow: 0 0 0 10px rgba(255,255,255,.12), 0 20px 40px -10px rgba(0,0,0,.6); opacity: .92; transition: transform .2s; }
.ag-film-play svg { margin-left: 3px; }
.ag-film-media:hover .ag-film-play { transform: scale(1.08); opacity: 1; }
.ag-film-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.ag-film-a { color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; opacity: .9; }
.ag-film-a:hover { text-decoration: underline; opacity: 1; }
@media (max-width: 900px) {
  #authGate { overflow-y: auto; align-items: start; }
  #authGate .ag-split { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 8px 0 24px; }
  #authGate .ag-split .ag-card { order: -1; justify-self: center; }
  .ag-film-s { display: none; }
  .ag-film-t { font-size: 22px; }
  .ag-film { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { .cpv-onb, .ag-film-media { animation: none; transition: none; } }
