@font-face { font-family: 'Alexandria'; src: url(../fonts/alexandria-arabic.woff2) format('woff2'); font-weight: 100 900; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Alexandria'; src: url(../fonts/alexandria-latin.woff2) format('woff2'); font-weight: 100 900; }

:root {
  --purple: #6D1A7D; --purple-dk: #540F66; --magenta: #9F2985; --gold: #F7B437; --orange: #FD8940;
  --yellow: #F8CB47; --pink: #DD3C7B; --rose: #EF396E; --red: #FB5559; --ink: #3A1446; --gray: #4C4C4C; --line: #CECFD0;
  --ok: #1F9D6B; --bad: #E0475B;
  --grad: linear-gradient(90deg, var(--purple-dk), var(--magenta) 55%, var(--orange) 85%, var(--gold));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #1d0b24; overflow: hidden; }
body { font-family: 'Alexandria', Tahoma, sans-serif; color: var(--ink); }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible, textarea:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }

/* ---------- stage: fixed 1920x1080 canvas, scaled to fit ---------- */
#viewport { position: fixed; inset: 0; display: grid; place-items: center; }
#stage { position: absolute; width: 1920px; height: 1080px; left: 50%; top: 50%; transform-origin: center; overflow: hidden; direction: rtl;
  background: #f4f2f4 url(../img/paper.webp) center/cover; }
#stage::before { content: ''; position: absolute; inset: 0; background: url(../img/blobs.webp) center/cover; opacity: .95; pointer-events: none; }
#stage.court::after { content: ''; position: absolute; left: -80px; top: 160px; width: 1100px; height: 920px; background: url(../img/court2.webp) left bottom/cover;
  filter: grayscale(1) contrast(.7); opacity: .09; pointer-events: none; mask-image: linear-gradient(90deg, #000 40%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent); }

#screen { position: absolute; inset: 0 116px 0 0; z-index: 2; }
.layer-in { animation: layerIn .55s cubic-bezier(.2,.7,.2,1) backwards; }
#screen > .layer-in { position: absolute; inset: 0; }
@keyframes layerIn { from { opacity: 0; transform: translateY(18px); } }
.rise { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.pop { animation: pop .45s cubic-bezier(.3,1.5,.5,1) backwards; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }

/* ---------- sidebar ---------- */
#sidebar { position: absolute; right: 0; top: 0; bottom: 0; width: 116px; z-index: 5; background: linear-gradient(180deg, #74208a, var(--purple) 40%, var(--purple-dk));
  border-radius: 46px 0 0 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; box-shadow: -8px 0 30px rgba(84,15,102,.18); }
#sidebar.hidden { transform: translateX(120%); }
#sidebar { transition: transform .5s ease; }
.side-btn { position: relative; width: 66px; height: 58px; border: 0; border-radius: 10px; background: linear-gradient(180deg, #fff, #dcd8de); color: var(--purple);
  box-shadow: 0 4px 0 #b9b1bd, 0 8px 14px rgba(0,0,0,.22); display: grid; place-items: center; transition: transform .15s, background .2s; }
.side-btn svg { width: 32px; height: 32px; }
.side-btn:hover { transform: translateY(-2px); }
.side-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #b9b1bd; }
.side-btn.active { background: linear-gradient(180deg, var(--gold), #e89c22); color: #fff; box-shadow: 0 4px 0 #b9761a, 0 8px 14px rgba(0,0,0,.22); }
.side-btn[disabled] { opacity: .35; cursor: default; transform: none; }
.side-btn .tip { position: absolute; right: 84px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: #fff; color: var(--purple-dk); font-size: 20px; font-weight: 600;
  padding: 8px 16px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: opacity .15s; }
.side-btn:hover .tip, .side-btn:focus-visible .tip { opacity: 1; }

/* ---------- header ---------- */
.hdr { position: absolute; top: 80px; right: 70px; left: 210px; display: flex; flex-direction: column; align-items: flex-start; gap: 26px; z-index: 3; }
.hdr-title { display: flex; align-items: stretch; gap: 18px; max-width: 100%; }
.hdr-title .ico { width: 100px; min-height: 84px; border-radius: 10px; background: var(--magenta); color: #fff; display: grid; place-items: center; flex: none; }
.hdr-title .ico svg { width: 52px; height: 52px; }
.hdr-title h1 { margin: 0; background: var(--purple-dk); color: #fff; font-size: 36px; font-weight: 700; line-height: 1.35; padding: 16px 34px; border-radius: 10px; min-height: 84px; display: flex; align-items: center; }
.hdr-sub { background: linear-gradient(180deg, #f8bd47, #eda634); color: #fff; font-size: 32px; font-weight: 600; padding: 10px 46px; border-radius: 10px; margin-inline-start: 118px; box-shadow: 0 6px 14px rgba(237,166,52,.28); }

/* ---------- nav ---------- */
#nav { position: absolute; bottom: 48px; left: calc(50% - 58px); transform: translateX(-50%); z-index: 6; display: flex; gap: 18px; padding: 12px; border-radius: 12px;
  background: rgba(230,226,232,.85); border: 2px solid #c9c3cc; box-shadow: 0 8px 22px rgba(0,0,0,.1); backdrop-filter: blur(6px); }
#nav.hidden { display: none; }
.nav-btn { display: flex; align-items: center; gap: 22px; height: 56px; padding: 0 16px 0 22px; border: 0; border-radius: 8px; background: var(--purple-dk); color: #fff; font-size: 26px; font-weight: 500; transition: filter .15s, transform .15s; }
.nav-btn .chev { width: 40px; height: 34px; border-radius: 6px; background: #fff; color: var(--purple); display: grid; place-items: center; }
.nav-btn .chev svg { width: 22px; height: 22px; }
.nav-btn#btnPrev { flex-direction: row; padding: 0 22px 0 16px; }
.nav-btn#btnPrev .chev { order: -1; }
.nav-btn:hover:not([disabled]) { filter: brightness(1.15); transform: translateY(-1px); }
.nav-btn[disabled] { background: #b8afbb; cursor: default; }
.nav-btn.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(247,180,55,.35); } }

.hint { position: absolute; bottom: 64px; right: 150px; z-index: 6; display: flex; align-items: center; gap: 14px; background: var(--magenta); color: #fff; font-size: 22px; padding: 10px 24px 10px 14px; border-radius: 40px; }
.hint i { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 18px; }

/* narration toggle + progress */
#audioCtl { position: absolute; left: 34px; bottom: 54px; z-index: 6; display: flex; gap: 10px; }
#audioCtl button { width: 58px; height: 58px; border-radius: 50%; border: 0; background: #fff; color: var(--purple); box-shadow: 0 6px 14px rgba(0,0,0,.14); display: grid; place-items: center; }
#audioCtl button svg { width: 28px; height: 28px; }
#audioCtl button.off { color: #aaa; }
#progress { position: absolute; left: 0; right: 116px; top: 0; height: 8px; z-index: 7; background: rgba(84,15,102,.1); }
#progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .5s ease; }

/* ---------- common cards ---------- */
.card { background: #fff; border-radius: 18px; border: 2px solid transparent; background-clip: padding-box; position: relative; box-shadow: 0 18px 40px rgba(84,15,102,.10); }
.card::before { content: ''; position: absolute; inset: -2px; border-radius: 20px; padding: 2px; background: linear-gradient(135deg, var(--gold), var(--magenta) 60%, var(--purple-dk));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.body-text { font-size: 30px; line-height: 1.9; color: var(--ink); }
.btn { border: 0; border-radius: 10px; background: var(--purple-dk); color: #fff; font-size: 26px; font-weight: 600; padding: 14px 30px; display: inline-flex; align-items: center; gap: 14px; transition: filter .15s, transform .15s; }
.btn:hover:not([disabled]) { filter: brightness(1.15); transform: translateY(-1px); }
.btn.gold { background: linear-gradient(180deg, #f8bd47, #eda634); color: #3a1446; }
.btn.ghost { background: #fff; color: var(--purple-dk); border: 2px solid var(--purple-dk); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn svg { width: 28px; height: 28px; }

/* ---------- cover ---------- */
.cover { position: absolute; inset: 0 -116px 0 0; }
.cover .photo { position: absolute; left: 0; top: 0; width: 1150px; height: 1080px; background: url(../img/cover_books.webp) center/cover;
  clip-path: polygon(0 0, 92% 0, 86% 12%, 95% 24%, 84% 37%, 97% 52%, 86% 66%, 95% 80%, 84% 92%, 90% 100%, 0 100%); animation: coverIn 1.2s cubic-bezier(.2,.7,.2,1) both; }
.cover .photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(84,15,102,.15), rgba(159,41,133,.35)); }
@keyframes coverIn { from { clip-path: polygon(0 0, 0 0, 0 12%, 0 24%, 0 37%, 0 52%, 0 66%, 0 80%, 0 92%, 0 100%, 0 100%); } }
.cover .txt { position: absolute; right: 150px; top: 250px; width: 640px; text-align: right; }
.cover .kicker { display: inline-block; font-size: 26px; color: var(--magenta); font-weight: 600; letter-spacing: 0; margin-bottom: 26px; padding: 8px 20px; border-radius: 30px; background: rgba(159,41,133,.08); }
.cover h1 { font-size: 64px; line-height: 1.45; margin: 0 0 18px; color: var(--purple-dk); font-weight: 800; }
.cover .meta { font-size: 26px; color: var(--gray); margin-bottom: 54px; }
.cover .start { font-size: 34px; padding: 18px 64px; background: linear-gradient(90deg, var(--rose), var(--orange) 60%, var(--gold)); border-radius: 14px; color: #fff; border: 0; font-weight: 700; box-shadow: 0 14px 30px rgba(239,57,110,.3); }
.cover .start:hover { transform: translateY(-2px); }
.cover .moj { position: absolute; left: 60px; top: 50px; z-index: 2; color: #fff; font-size: 22px; font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,.4); }

/* ---------- menu ---------- */
.menu-grid { position: absolute; top: 380px; right: 70px; left: 120px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; }
.axis { position: relative; height: 300px; border-radius: 16px; border: 0; background: linear-gradient(180deg, #f2f0f3, #dedadf); box-shadow: 0 12px 26px rgba(0,0,0,.12); padding: 70px 26px 26px; text-align: center;
  font-size: 25px; line-height: 1.6; color: var(--ink); font-weight: 500; transition: transform .2s, box-shadow .2s; display: flex; align-items: center; justify-content: center; }
.axis .num { position: absolute; top: -22px; right: 22px; width: 76px; height: 64px; border-radius: 0 0 0 0; background: #fff; color: var(--purple-dk); font-size: 38px; font-weight: 800; display: grid; place-items: center;
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); }
.axis.current { background: #fff; box-shadow: 0 0 0 3px var(--purple), 0 18px 36px rgba(109,26,125,.22); }
.axis.current .num { background: var(--purple-dk); color: #fff; }
.axis:hover:not(.locked) { transform: translateY(-6px); }
.axis.locked { cursor: not-allowed; color: #8a8290; }
.axis .state { position: absolute; bottom: 16px; left: 16px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.axis .state svg { width: 26px; height: 26px; }
.axis.done .state { background: var(--ok); color: #fff; }
.axis.locked .state { background: #c8c2cb; color: #fff; }
.menu-meta { position: absolute; top: 760px; right: 70px; left: 120px; display: flex; justify-content: space-between; align-items: center; font-size: 24px; color: var(--gray); }
.meter { width: 520px; height: 14px; border-radius: 10px; background: #e3dde5; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--grad); }

/* ---------- objectives ---------- */
.obj-wrap { position: absolute; top: 285px; right: 70px; left: 140px; bottom: 168px; padding: 30px 50px 26px 400px; display: flex; flex-direction: column; justify-content: center; }
.obj-wrap .lead { font-size: 28px; font-weight: 600; margin-bottom: 18px; color: var(--purple-dk); }
.obj-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.obj-list li { display: flex; align-items: stretch; gap: 0; }
.obj-list .n { flex: none; width: 70px; display: grid; place-items: center; background: var(--magenta); color: #fff; font-weight: 700; font-size: 26px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 22% 50%); border-radius: 0 8px 8px 0; }
.obj-list .t { flex: 1; font-size: 22px; line-height: 1.55; padding: 9px 24px; background: #fff; border: 2px solid #e6d7ea; border-right: 0; border-radius: 8px 0 0 8px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0); }
.obj-list li:nth-child(even) .n { background: var(--orange); }
.target { position: absolute; left: 60px; top: 50%; transform: translateY(-50%); width: 300px; height: 300px; }

/* ---------- section cover ---------- */
.sec { position: absolute; inset: 0; }
.sec .frame { position: absolute; left: 150px; top: 180px; width: 720px; height: 720px; border-radius: 60px; padding: 26px; border: 3px dashed rgba(109,26,125,.35); }
.sec .frame .ph { width: 100%; height: 100%; border-radius: 44px; background-size: cover; background-position: center; box-shadow: 0 30px 60px rgba(84,15,102,.28); border: 10px solid #fff; animation: kb 9s ease-out both; }
@keyframes kb { from { background-size: 118%; } to { background-size: 100%; } }
.sec .label { position: absolute; right: 220px; top: 50%; transform: translateY(-50%); font-size: 58px; font-weight: 800; color: #fff; padding: 22px 70px; border-radius: 80px; background: var(--purple); box-shadow: 0 0 0 10px #fff, 0 0 0 13px rgba(109,26,125,.4), 0 20px 40px rgba(84,15,102,.25); }
.sec .label.rose { background: linear-gradient(90deg, var(--rose), var(--pink)); box-shadow: 0 0 0 10px #fff, 0 0 0 13px rgba(239,57,110,.4), 0 20px 40px rgba(239,57,110,.25); }
.sec .label.gold { background: linear-gradient(90deg, #eda634, var(--gold)); box-shadow: 0 0 0 10px #fff, 0 0 0 13px rgba(247,180,55,.5), 0 20px 40px rgba(237,166,52,.25); }
.sec .label.orange { background: linear-gradient(90deg, var(--orange), var(--gold)); box-shadow: 0 0 0 10px #fff, 0 0 0 13px rgba(253,137,64,.5), 0 20px 40px rgba(253,137,64,.25); }
.sec .axis-tag { position: absolute; right: 220px; top: 300px; font-size: 26px; color: var(--magenta); font-weight: 600; max-width: 760px; line-height: 1.6; }

/* ---------- quote (legal text / opinion) ---------- */
.quote { position: absolute; top: 400px; right: 330px; left: 330px; padding: 90px 70px 50px; }
.quote .tab { position: absolute; top: -2px; left: -2px; width: 230px; height: 50px; background: var(--purple); border-radius: 18px 0 30px 0; }
.quote .marks { position: absolute; top: -70px; right: 60px; display: flex; gap: 12px; }
.quote .marks span { font-size: 220px; line-height: 1; font-weight: 800; height: 140px; overflow: hidden; display: block; }
.quote .marks span:first-child { color: var(--magenta); } .quote .marks span:last-child { color: var(--gold); }
.quote .body-text { font-size: 32px; line-height: 2; }
.quote .art { display: block; margin-top: 10px; font-size: 26px; font-weight: 700; color: var(--purple-dk); }
.cite { position: absolute; right: 0; bottom: -96px; font-size: 26px; font-weight: 700; color: var(--purple-dk); background: #fff; border-radius: 10px; padding: 16px 30px; box-shadow: 0 10px 24px rgba(0,0,0,.08); border: 1px solid #eee; }
.quote.dense { top: 285px; padding: 70px 60px 34px; }
.quote.dense .body-text { font-size: 26px; line-height: 1.85; }

/* ---------- numbered list (summary) ---------- */
.nlist { position: absolute; top: 285px; right: 70px; left: 140px; bottom: 170px; padding: 36px 46px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.nlist .it { display: flex; align-items: center; gap: 22px; font-size: 24px; line-height: 1.55; }
.nlist .it .n { flex: none; width: 66px; height: 54px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 24px; border-radius: 10px 0 0 10px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 20% 50%); }
.nlist .it .t { flex: 1; background: #fff; border: 2px solid #ece3ee; padding: 10px 24px; border-radius: 10px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 2% 50%); padding-left: 44px; }
.nlist .it:nth-child(3n+1) .n { background: var(--purple); } .nlist .it:nth-child(3n+2) .n { background: var(--magenta); } .nlist .it:nth-child(3n) .n { background: var(--rose); }

/* ---------- discussion ---------- */
.disc { position: absolute; top: 285px; right: 120px; left: 190px; bottom: 175px; display: grid; grid-template-columns: 1fr 420px; gap: 34px; }
.disc .q { padding: 40px 50px; display: flex; flex-direction: column; overflow: hidden; }
.disc .q h2 { margin: 0 0 16px; font-size: 34px; color: var(--purple-dk); }
.disc .q .body-text { font-size: 25px; line-height: 1.85; flex: 1; }
.disc .side { display: flex; flex-direction: column; gap: 18px; }
.disc .note { flex: 1; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.disc .note label { font-size: 22px; font-weight: 600; color: var(--magenta); }
.disc textarea, .task textarea { flex: 1; width: 100%; resize: none; border: 2px dashed #dccbe0; border-radius: 12px; padding: 16px; font: 22px/1.7 'Alexandria', sans-serif; color: var(--ink); background: #fcfafd; }
.qmark { position: absolute; left: 30px; bottom: 26px; font-size: 150px; font-weight: 800; color: var(--magenta); opacity: .12; line-height: 1; pointer-events: none; }
.key { padding: 36px 46px; }
.key h2 { margin: 0 0 14px; font-size: 32px; color: var(--purple-dk); display: flex; align-items: center; gap: 12px; }
.key .chk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.key .chk li { display: flex; gap: 14px; align-items: flex-start; font-size: 23px; line-height: 1.6; padding: 8px 12px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.key .chk li:hover { background: #f7eff8; }
.key .chk li .box { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 2px solid var(--magenta); display: grid; place-items: center; margin-top: 3px; color: #fff; }
.key .chk li.on .box { background: var(--magenta); }
.key .chk li .box svg { width: 22px; height: 22px; opacity: 0; } .key .chk li.on .box svg { opacity: 1; }
.selfscore { margin-top: 12px; font-size: 22px; color: var(--purple-dk); font-weight: 600; min-height: 34px; }

/* ---------- case (scenario) ---------- */
.case { position: absolute; top: 80px; right: 50px; left: 130px; bottom: 170px; border-radius: 26px; overflow: hidden; box-shadow: 0 30px 60px rgba(84,15,102,.2); border: 3px solid #fff; }
.case .bg { position: absolute; inset: 0; background: url(../img/office.webp) center/cover; filter: blur(3px) saturate(1.05); transform: scale(1.04); }
.case .bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.25)); }
.case .chars { position: absolute; left: 10px; bottom: -30px; direction: ltr; display: flex; align-items: flex-end; gap: 0; }
.case .chars img { height: 840px; filter: drop-shadow(0 20px 26px rgba(0,0,0,.35)); animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.case .chars img + img { margin-left: -70px; height: 880px; animation-delay: .15s; }
.case .bubble { position: absolute; right: 70px; top: 150px; width: 820px; padding: 50px 56px; background: rgba(255,255,255,.93); backdrop-filter: blur(6px); border-radius: 26px; box-shadow: 0 20px 40px rgba(0,0,0,.18); }
.case .bubble p { margin: 0; font-size: 30px; line-height: 1.85; color: var(--purple-dk); font-weight: 500; text-align: center; }
.case .bubble .step { position: absolute; top: -22px; right: 40px; background: var(--magenta); color: #fff; font-size: 20px; font-weight: 600; padding: 6px 18px; border-radius: 20px; }
.case .logo { position: absolute; left: 560px; bottom: 50px; width: 300px; padding: 18px; border-radius: 22px; background: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.case .logo img { width: 100%; display: block; }
.case .pager { position: absolute; left: 50px; top: 40px; display: flex; gap: 10px; }
.case .pager i { width: 46px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.6); }
.case .pager i.on { background: var(--magenta); }

/* ---------- task ---------- */
.task { position: absolute; top: 80px; right: 50px; left: 130px; bottom: 170px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 30px; }
.task .brief { padding: 44px 52px; position: relative; overflow: hidden; }
.task .brief h2 { margin: 0 0 6px; font-size: 34px; color: var(--purple-dk); display: flex; align-items: center; gap: 14px; }
.task .brief .role { font-size: 25px; color: var(--magenta); font-weight: 600; margin-bottom: 18px; }
.task .brief ul { margin: 0; padding: 0 30px 0 0; }
.task .brief li { font-size: 24px; line-height: 1.75; margin-bottom: 6px; }
.task .brief li::marker { color: var(--orange); }
.task .draft { padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.task .draft label { font-size: 24px; font-weight: 700; color: var(--purple-dk); }
.task .draft small { font-size: 19px; color: var(--gray); line-height: 1.6; }

/* ---------- challenge ---------- */
.chal { position: absolute; top: 268px; right: 70px; left: 140px; bottom: 160px; padding: 26px 40px; display: flex; flex-direction: column; }
.chal .prompt { font-size: 28px; font-weight: 700; color: var(--purple-dk); margin-bottom: 6px; display: flex; gap: 14px; align-items: center; }
.chal .prompt .tag { font-size: 18px; font-weight: 600; background: var(--gold); color: var(--ink); padding: 4px 14px; border-radius: 20px; }
.chal .sub { font-size: 21px; color: var(--gray); margin-bottom: 18px; }
.chal .area { flex: 1; min-height: 0; }
.chal .foot { display: flex; align-items: center; gap: 20px; margin-top: 14px; }
.chal .fb { font-size: 23px; font-weight: 600; min-height: 34px; }
.chal .fb.ok { color: var(--ok); } .chal .fb.bad { color: var(--bad); }
/* sort */
.sort { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; height: 100%; }
.sort .pool { display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; }
.chip { font-size: 19px; line-height: 1.45; padding: 7px 14px; border-radius: 12px; background: #fff; border: 2px solid #d9c6de; color: var(--ink); text-align: right; cursor: grab; box-shadow: 0 4px 10px rgba(0,0,0,.06); transition: transform .15s, border-color .15s, background .15s; user-select: none; }
.chip:hover { border-color: var(--magenta); }
.chip.sel { border-color: var(--gold); background: #fff8e8; transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(247,180,55,.35); }
.chip.ok { border-color: var(--ok); background: #eaf7f1; } .chip.bad { border-color: var(--bad); background: #fdeef0; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(6px); } 75% { transform: translateX(-6px); } }
.chip.dragging { opacity: .4; }
.bins { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; min-height: 0; height: 100%; }
.bin { border-radius: 16px; border: 3px dashed #d9c6de; background: rgba(255,255,255,.6); padding: 10px; display: flex; flex-direction: column; gap: 7px; min-height: 160px; transition: background .15s, border-color .15s; cursor: pointer; overflow: auto; }
.bin h3 { margin: 0 0 4px; font-size: 23px; color: #fff; padding: 8px 14px; border-radius: 10px; text-align: center; }
.bin:nth-child(1) h3 { background: var(--purple); } .bin:nth-child(2) h3 { background: var(--orange); }
.bin.over, .bin.target { border-color: var(--gold); background: #fffaf0; }
/* order */
.order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.order li { display: flex; align-items: center; gap: 16px; background: #fff; border: 2px solid #e2d3e6; border-radius: 12px; padding: 10px 14px; font-size: 23px; line-height: 1.5; cursor: grab; transition: transform .2s, border-color .2s, background .2s; }
.order li .n { flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--purple-dk); color: #fff; font-weight: 700; display: grid; place-items: center; }
.order li .t { flex: 1; }
.order li .mv { display: flex; gap: 6px; }
.order li .mv button { width: 42px; height: 42px; border-radius: 8px; border: 2px solid #d9c6de; background: #fff; color: var(--purple); display: grid; place-items: center; }
.order li .mv button svg { width: 22px; height: 22px; }
.order li.ok { border-color: var(--ok); background: #eaf7f1; } .order li.bad { border-color: var(--bad); background: #fdeef0; }
.order li.over { border-color: var(--gold); }

/* ---------- model answer tabs ---------- */
.ans { position: absolute; top: 285px; right: 70px; left: 140px; bottom: 170px; display: flex; flex-direction: column; overflow: hidden; }
.tabs { display: flex; border-bottom: 3px solid var(--purple-dk); background: #faf7fb; border-radius: 18px 18px 0 0; overflow: hidden; }
.tabs button { flex: 1; border: 0; border-left: 1px solid #e3d8e6; background: transparent; padding: 12px 8px; font-size: 17px; font-weight: 600; line-height: 1.45; color: var(--purple-dk); position: relative; transition: background .15s; }
.tabs button:last-child { border-left: 0; }
.tabs button:hover { background: #f1e6f3; }
.tabs button.on { background: var(--purple-dk); color: #fff; }
.tabs button.seen::after { content: ''; position: absolute; top: 8px; left: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); }
.tabs button.on.seen::after { background: var(--gold); }
.panel { flex: 1; padding: 34px 50px; overflow: auto; font-size: 25px; line-height: 1.9; }
.panel ul { margin: 0; padding: 0 30px 0 0; } .panel li::marker { color: var(--magenta); }
.panel p { margin: 0 0 10px; }

/* ---------- readings ---------- */
.read { position: absolute; top: 300px; right: 300px; left: 300px; padding: 22px; border-radius: 40px; background: linear-gradient(135deg, var(--purple), var(--magenta)); box-shadow: 0 24px 50px rgba(84,15,102,.3); }
.read .in { background: #fff; border-radius: 26px; padding: 60px 64px 44px; position: relative; }
.read .in .q { position: absolute; top: 18px; left: 40px; font-size: 120px; line-height: 1; color: var(--purple); font-weight: 800; height: 80px; overflow: hidden; }
.read ul { margin: 0 0 26px; padding: 0 30px 0 0; } .read li { font-size: 25px; line-height: 1.8; margin-bottom: 10px; } .read li::marker { color: var(--magenta); }
.hdr-mini { position: absolute; top: 96px; right: 70px; display: flex; align-items: center; gap: 14px; background: var(--purple-dk); color: #fff; font-size: 30px; font-weight: 700; padding: 12px 28px; border-radius: 10px; }
.hdr-mini svg { width: 32px; height: 32px; }

/* ---------- video ---------- */
.vid { position: absolute; top: 56px; left: 50%; width: 1552px; height: 873px; transform: translateX(-50%); border-radius: 22px; overflow: hidden; background: #0d0610; box-shadow: 0 30px 60px rgba(0,0,0,.3); }
.vid video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.vid .vbar { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 26px; display: flex; align-items: center; gap: 18px; background: linear-gradient(0deg, rgba(0,0,0,.75), transparent); opacity: 0; transition: opacity .25s; direction: ltr; }
.vid:hover .vbar, .vid.paused .vbar { opacity: 1; }
.vbar button { width: 54px; height: 54px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); color: var(--purple-dk); display: grid; place-items: center; flex: none; }
.vbar button svg { width: 26px; height: 26px; }
.vbar .track { flex: 1; height: 10px; border-radius: 6px; background: rgba(255,255,255,.3); position: relative; cursor: pointer; }
.vbar .track span { position: absolute; inset: 0 auto 0 0; background: var(--grad); border-radius: 6px; }
.vbar .time { color: #fff; font-size: 20px; min-width: 150px; text-align: center; font-variant-numeric: tabular-nums; }
.vid .big { position: absolute; inset: 0; margin: auto; width: 140px; height: 140px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--purple-dk); display: grid; place-items: center; box-shadow: 0 0 0 16px rgba(255,255,255,.25); }
.vid .big svg { width: 60px; height: 60px; margin-left: 8px; }
.vid:not(.paused) .big { display: none; }
.vid-tag { position: absolute; top: 90px; right: 70px; z-index: 3; background: var(--purple-dk); color: #fff; font-size: 22px; font-weight: 600; padding: 8px 20px; border-radius: 8px; }

/* ---------- lesson summary ---------- */
.lsum { position: absolute; top: 285px; right: 70px; left: 140px; bottom: 170px; padding: 36px 50px; overflow: auto; }
.lsum p { font-size: 20.5px; line-height: 1.8; margin: 0 0 10px; }
.lsum b { color: var(--magenta); }

/* ---------- end ---------- */
.end { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.end .badge { width: 200px; height: 200px; border-radius: 50%; margin: 0 auto 30px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 20px 50px rgba(159,41,133,.35); }
.end .badge svg { width: 100px; height: 100px; }
.end h2 { font-size: 54px; color: var(--purple-dk); margin: 0 0 14px; }
.end p { font-size: 28px; color: var(--gray); margin: 0 0 30px; }

/* ---------- overlays ---------- */
.overlay { position: absolute; inset: 0; z-index: 20; background: rgba(40,10,50,.55); display: grid; place-items: center; backdrop-filter: blur(4px); }
.modal { width: 1180px; max-height: 860px; overflow: auto; background: #fff; border-radius: 24px; padding: 50px 60px; position: relative; }
.modal h2 { margin: 0 0 24px; font-size: 38px; color: var(--purple-dk); }
.modal .x { position: absolute; top: 24px; left: 24px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: #f1e9f3; color: var(--purple-dk); display: grid; place-items: center; }
.modal .x svg { width: 26px; height: 26px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 40px; }
.help-grid div { display: flex; gap: 16px; align-items: center; font-size: 24px; }
.help-grid .side-btn { flex: none; pointer-events: none; }
.toast { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); z-index: 30; background: var(--purple-dk); color: #fff; font-size: 24px; padding: 14px 30px; border-radius: 40px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: layerIn .3s both; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

[hidden] { display: none !important; }
.chal .prompt .tag { white-space: nowrap; }
.quote.dense { top: 250px; }
.quote.dense .body-text { font-size: 24px; line-height: 1.75; }
.quote.dense .marks { display: none; }
.quote.dense .cite { position: static; display: inline-block; margin-top: 16px; padding: 10px 22px; font-size: 22px; }

.vbar .vm, .vbar .vf { width: 48px; height: 48px; }
.vbar .vm svg, .vbar .vf svg { width: 24px; height: 24px; }
.vid:fullscreen { width: 100%; height: 100%; border-radius: 0; transform: none; }
.review-badge { position: absolute; top: 18px; left: 24px; z-index: 8; background: var(--gold); color: var(--ink); font-size: 18px; font-weight: 700; padding: 6px 16px; border-radius: 20px; }

/* ---------- v2: discussion with photo, case/task split layout ---------- */
.disc { grid-template-columns: 1fr 560px; }
.disc-ph { border-radius: 26px; background-size: cover; background-position: center; border: 10px solid #fff; box-shadow: 0 24px 50px rgba(84,15,102,.25); }
.case2 { position: absolute; top: 60px; right: 40px; left: 120px; bottom: 160px; display: grid; grid-template-columns: 760px 1fr; gap: 30px; }
.case2 .story { order: -1; }
.case2 .stagebox { position: relative; border-radius: 26px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 30px 60px rgba(84,15,102,.22); }
.case2 .bg { position: absolute; inset: 0; background: url(../img/office.webp) center/cover; filter: blur(2px) saturate(1.05); transform: scale(1.05); }
.case2 .bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(84,15,102,.35), transparent 45%); }
.case2 .chars { position: absolute; inset: auto 0 -20px 0; display: flex; justify-content: center; align-items: flex-end; direction: ltr; }
.case2 .chars img { height: 760px; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.case2 .chars.c2 img { height: 700px; }
.case2 .chars.c2 img + img { margin-left: -40px; height: 730px; animation-delay: .15s; }
.case2 .story { padding: 44px 50px; display: flex; flex-direction: column; justify-content: center; gap: 18px; overflow: hidden; }
.case2 .kick { display: inline-flex; align-self: flex-start; align-items: center; gap: 12px; background: var(--magenta); color: #fff; font-size: 24px; font-weight: 700; padding: 8px 22px; border-radius: 30px; }
.case2 .kick svg { width: 28px; height: 28px; }
.case2 .story p { margin: 0; font-size: 25px; line-height: 1.9; color: var(--ink); }
.case2 .story p + p { padding-top: 16px; border-top: 2px dashed #eadcef; }
.case2 .party { align-self: flex-start; width: 210px; padding: 10px 14px; border-radius: 16px; background: #fff; border: 2px solid #eee; }
.case2 .party img { width: 100%; display: block; }
.case2 .role { font-size: 24px; color: var(--magenta); font-weight: 600; }
.case2 ul { margin: 0; padding: 0 30px 0 0; } .case2 li { font-size: 23px; line-height: 1.75; margin-bottom: 4px; } .case2 li::marker { color: var(--orange); }

/* ---------- v3: cinematic case scenes ---------- */
.case2 .stagebox.scene { background-size: cover; background-position: center; }

/* ---------- v3: match (توصيل) ---------- */
.match { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 170px; height: 100%; align-content: center; }
.match .lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mcol { display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.mi { position: relative; text-align: right; font-size: 22px; line-height: 1.5; padding: 16px 22px; border-radius: 14px; background: #fff; border: 2px solid #e2d3e6; color: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,.06); transition: border-color .15s, transform .15s; }
.mi:hover { border-color: var(--magenta); transform: translateY(-1px); }
.mi .dot { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--c, #c9b5cf); transform: translateY(-50%); }
.mcol.a .mi .dot { left: -10px; } .mcol.b .mi .dot { right: -10px; }
.mcol.a .mi { font-weight: 600; color: var(--purple-dk); }
.mi.sel { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(247,180,55,.35); }
.mi.linked { border-color: var(--c); } .mi.linked .dot { background: var(--c); }
.mi.ok { background: #eaf7f1; } .mi.bad { background: #fdeef0; }

/* ---------- v3: predict & flip cards (قلب الكروت) ---------- */
.pcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; height: 100%; perspective: 1600px; }
.pcard { position: relative; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,.7,.2,1); min-height: 300px; }
.pcard .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 20px; padding: 26px 22px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 14px 30px rgba(84,15,102,.14); }
.pcard .front { background: linear-gradient(160deg, #fff, #f6eff8); border: 2px solid #e6d7ea; }
.pcard .front p { margin: 0; font-size: 23px; line-height: 1.6; font-weight: 600; color: var(--purple-dk); }
.pcard .choices { display: flex; flex-direction: column; gap: 10px; }
.pcard .choices .btn { justify-content: center; font-size: 21px; padding: 10px 14px; }
.pcard .back { transform: rotateY(180deg); background: linear-gradient(160deg, var(--purple-dk), var(--magenta)); color: #fff; justify-content: flex-start; gap: 12px; }
.pcard.bad .back { background: linear-gradient(160deg, #7a1d3a, var(--rose)); }
.pcard .verdict { display: inline-flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; background: rgba(255,255,255,.18); padding: 6px 14px; border-radius: 20px; align-self: flex-start; }
.pcard .verdict svg { width: 20px; height: 20px; }
.pcard .pans { margin: 0; font-size: 30px; font-weight: 800; color: var(--gold); }
.pcard .why { margin: 0; font-size: 19px; line-height: 1.6; opacity: .95; }
.pcard.flipped { transform: rotateY(180deg); }

/* ---------- v3: answer as steps (accordion timeline) ---------- */
.ans.steps { padding: 26px 34px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.step-it { border-radius: 14px; border: 2px solid #eadcef; background: #fff; overflow: hidden; }
.step-h { width: 100%; display: flex; align-items: center; gap: 16px; border: 0; background: transparent; padding: 12px 18px; font-size: 22px; font-weight: 700; color: var(--purple-dk); text-align: right; }
.step-h .n { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--purple-dk); color: #fff; display: grid; place-items: center; font-size: 20px; }
.step-h .tick { margin-inline-start: auto; width: 30px; height: 30px; border-radius: 50%; background: #eee; color: #fff; display: grid; place-items: center; }
.step-h .tick svg { width: 18px; height: 18px; }
.step-it.seen .tick { background: var(--ok); }
.step-it.open { border-color: var(--magenta); box-shadow: 0 10px 24px rgba(159,41,133,.12); }
.step-it.open .step-h .n { background: var(--magenta); }
.step-b { display: none; padding: 0 76px 18px 26px; font-size: 22px; line-height: 1.85; }
.step-b ul { margin: 0; padding: 0 26px 0 0; } .step-b li::marker { color: var(--magenta); } .step-b p { margin: 0 0 8px; }
.step-it.open .step-b { display: block; }

/* ---------- v3: answer as flip cards ---------- */
.ans.fcards { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 20px; perspective: 1800px; overflow: visible; }
.fcard { position: relative; border: 0; padding: 0; background: none; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,.7,.2,1); text-align: right; }
.fcard .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; padding: 22px 26px; overflow: auto; box-shadow: 0 12px 26px rgba(84,15,102,.14); }
.fcard .front { background: linear-gradient(160deg, var(--purple-dk), var(--magenta)); color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.fcard .front .n { width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 800; font-size: 22px; display: grid; place-items: center; }
.fcard .front .h { font-size: 24px; font-weight: 700; line-height: 1.5; }
.fcard .front .flipme { font-size: 17px; opacity: .8; }
.fcard.seen .front .n { background: var(--ok); color: #fff; }
.fcard .back { transform: rotateY(180deg); background: #fff; border: 2px solid #eadcef; font-size: 19px; line-height: 1.75; color: var(--ink); }
.fcard .back ul { margin: 0; padding: 0 22px 0 0; } .fcard .back p { margin: 0 0 6px; } .fcard .back li::marker { color: var(--magenta); }
.fcard.flipped { transform: rotateY(180deg); }

/* ---------- v3: section cover — keep label clear of the photo ---------- */
.sec .frame { left: 120px; top: 190px; width: 680px; height: 680px; }
.sec .label, .sec .axis-tag { right: 160px; max-width: 820px; }
.sec .axis-tag { top: 330px; }
.sec .label { white-space: nowrap; }

.hdr-title h1.long { font-size: 27px; white-space: nowrap; }

/* v3.1 QA fixes */
.step-it { flex-shrink: 0; }
.ans.steps { overflow-x: hidden; padding: 22px 34px; }
.bin .chip { font-size: 17px; padding: 5px 10px; }
.bin { gap: 5px; }
.fcard .back { font-size: 17px; line-height: 1.65; padding: 18px 22px; }

/* v4: quote citation inside the card, never touching the nav */
.quote { top: 330px; padding: 80px 70px 40px; }
.quote .body-text { font-size: 30px; line-height: 1.9; }
.quote .cite { position: static; display: inline-block; margin-top: 22px; padding: 12px 26px; font-size: 23px; background: #f6eef8; border: 0; box-shadow: none; }

/* ---------- v4: progress & completion ---------- */
.axis { flex-direction: column; justify-content: space-between; padding: 64px 22px 20px; height: 330px; }
.axis .ttl { flex: 1; display: flex; align-items: center; justify-content: center; }
.axis .ax-foot { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.axis .chip-st { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; padding: 4px 14px; border-radius: 20px; background: #ebe5ee; color: #6e6574; }
.axis .chip-st svg { width: 18px; height: 18px; }
.axis .ax-bar { height: 8px; border-radius: 6px; background: rgba(84,15,102,.12); overflow: hidden; }
.axis .ax-bar i { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.axis.done { background: linear-gradient(180deg, #f2fbf7, #dff3ea); }
.axis.done .num { background: var(--ok); color: #fff; }
.axis.done .chip-st { background: var(--ok); color: #fff; }
.axis.done .ax-bar i { background: var(--ok); }
.axis.partial { background: #fff; box-shadow: 0 0 0 3px var(--gold), 0 16px 32px rgba(247,180,55,.22); }
.axis.partial .chip-st { background: #fff3db; color: #8a5a00; }
.axis.fresh { background: #fff; box-shadow: 0 0 0 3px var(--magenta), 0 18px 36px rgba(159,41,133,.22); animation: freshGlow 2.2s ease-in-out infinite; }
.axis.fresh .num { background: var(--magenta); color: #fff; }
.axis.fresh .chip-st { background: var(--magenta); color: #fff; }
@keyframes freshGlow { 50% { box-shadow: 0 0 0 6px rgba(159,41,133,.45), 0 18px 40px rgba(159,41,133,.3); } }

.side-btn.todo::after { content: ''; position: absolute; top: -5px; left: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--orange); border: 3px solid var(--purple); }

.ax-end { position: absolute; inset: 40px 40px 60px 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ax-end .badge { width: 150px; height: 150px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 14px rgba(31,157,107,.15), 0 20px 40px rgba(31,157,107,.3); margin-bottom: 22px; }
.ax-end .badge svg { width: 80px; height: 80px; }
.ax-end h2 { font-size: 50px; color: var(--purple-dk); margin: 0 0 6px; }
.ax-end > p { font-size: 26px; color: var(--magenta); margin: 0 0 26px; font-weight: 600; }
.ax-list { width: 1100px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.ax-row { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 14px; padding: 12px 20px; font-size: 22px; text-align: right; border: 2px solid #eee; }
.ax-row span:nth-child(2) { flex: 1; }
.ax-row .dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.ax-row .dot svg { width: 22px; height: 22px; }
.ax-row.ok .dot { background: var(--ok); color: #fff; } .ax-row.ok b { color: var(--ok); }
.ax-row.todo { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(159,41,133,.12); }
.ax-row.todo .dot { background: var(--magenta); color: #fff; } .ax-row.todo b { color: var(--magenta); }
.ax-btns { display: flex; gap: 18px; }
.ax-btns #nextAx svg { transform: scaleX(1); }

/* ---------- v4: phones in portrait — ask to rotate ---------- */
@media (orientation: portrait) and (max-width: 900px) {
  #viewport::after { content: 'لأفضل تجربة، لفّ الموبايل بالعرض ⟲'; position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 30px; text-align: center;
    background: linear-gradient(160deg, #540F66, #9F2985); color: #fff; font: 700 22px/1.8 'Alexandria', sans-serif; direction: rtl; }
}

/* ---------- v5: no black flash on video start, no cropped-then-full photos ---------- */
.vid { background-color: #0d0610; background-size: cover; background-position: center; }
.vid video { opacity: 0; transition: opacity .35s ease; }
.vid.ready video { opacity: 1; }
.sec .frame .ph { animation: phIn .6s ease-out backwards; }
@keyframes phIn { from { opacity: 0; } }

/* ---------- v6: ui-ux-pro-max pass ---------- */
/* where am I: step x of y inside the axis */
#where { position: absolute; top: 24px; left: 34px; z-index: 7; background: rgba(255,255,255,.85); color: var(--purple-dk); font-size: 19px; font-weight: 700; padding: 6px 16px; border-radius: 20px; box-shadow: 0 4px 12px rgba(84,15,102,.12); }
/* reserved, tinted space while photos load (no empty white holes) */
.sec .frame .ph, .case2 .stagebox.scene, .disc-ph { background-color: #3a1446; }
/* buffering indicator on video */
.vid.playing:not(.ready)::after { content: ''; position: absolute; top: 50%; left: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; border: 6px solid rgba(255,255,255,.25); border-top-color: var(--gold); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* touch screens: the stage is scaled down, so enlarge hit targets to stay >= ~44px on device */
@media (pointer: coarse) {
  .side-btn { width: 92px; height: 80px; }
  .side-btn svg { width: 40px; height: 40px; }
  #sidebar { width: 130px; gap: 18px; }
  .nav-btn { height: 84px; font-size: 34px; padding: 0 22px 0 30px; }
  .nav-btn .chev { width: 54px; height: 46px; }
  #audioCtl button { width: 84px; height: 84px; }
  .btn { padding: 20px 38px; font-size: 30px; }
  .chip { font-size: 22px; padding: 12px 18px; }
  .order li .mv button { width: 64px; height: 64px; }
  .vbar button { width: 74px; height: 74px; }
  .vid .vbar { opacity: 1; }
  .pcard .choices .btn { padding: 16px; font-size: 24px; }
}
