/* ╔══════════════════════════════════════════════════════════╗
   ║  doc.css — الملفات: الأغلفة، الصفحات، العناصر، المحرّر،   ║
   ║  العارض، وحركات الفتح والختم.                             ║
   ╚══════════════════════════════════════════════════════════╝ */

/* ───────────────────────── غلاف الملف ───────────────────────── */
.folder { position: relative; width: var(--fw, 380px); aspect-ratio: .8; perspective: 1800px; container-type: inline-size; direction: ltr; --fb: #101114; --ff: #16171b; --lb: #f1ead8; --lt: #1a1a1a; --st: #b3121f; }
.folder.sm { --fw: 100%; }
.fd-back { position: absolute; inset: 7% 0 0 0; border-radius: 3cqw 3.6cqw 3.6cqw 3.6cqw; background: var(--fb); box-shadow: 0 6cqw 12cqw -4cqw rgba(0, 0, 0, .75); }
.fd-tab-b { position: absolute; top: -6.5%; left: 0; width: 40%; height: 9%; background: var(--fb); border-radius: 3cqw 3cqw 0 0; }
.fd-sheets { position: absolute; inset: 9% 3.5% 2.5% 3.5%; transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .45s; container-type: inline-size; }
.fd-sheets > i { position: absolute; inset: 0; background: #fbfaf6; border-radius: 1.5cqw; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.fd-sheets > i:nth-child(1) { transform: rotate(-2.2deg) translate(-1%, 1%); background: #efece4; }
.fd-sheets > i:nth-child(2) { transform: rotate(1.4deg); background: #f6f3ec; }
.fd-sheets > i:nth-child(3) { background: linear-gradient(transparent 92%, rgba(0, 0, 0, .04) 0) 0 0/100% 6.2cqw, #fdfcf9; }
.fd-mini { position: absolute; inset: 0; overflow: hidden; border-radius: 1.5cqw; }
.fd-mini .pg { transform-origin: 0 0; }
.fd-front {
  position: absolute; inset: 7% 0 0 0; border-radius: 3cqw 3.6cqw 3.6cqw 3.6cqw; background: var(--ff);
  transform-origin: left center; transition: transform .85s cubic-bezier(.3, .7, .2, 1); backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12cqw 7cqw 7cqw; overflow: hidden;
  box-shadow: inset 0 0 0 .5cqw rgba(255, 255, 255, .05), inset 0 -10cqw 20cqw -10cqw rgba(0, 0, 0, .45), 0 2cqw 6cqw -2cqw rgba(0, 0, 0, .6);
}
.fd-tab { position: absolute; top: 3cqw; right: 4cqw; font-family: 'JetBrains Mono', monospace; font-size: 3.2cqw; font-weight: 700; color: var(--lt); background: var(--lb); padding: .6cqw 2cqw; border-radius: 1cqw; letter-spacing: .05em; opacity: .9; }
.fd-strip { position: absolute; top: 9cqw; left: -16cqw; width: 64cqw; transform: rotate(-45deg); background: var(--st); color: #fff; text-align: center; font: 700 3.3cqw Rajdhani, sans-serif; letter-spacing: .3em; padding: 1.1cqw 0; display: flex; justify-content: space-around; box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .4); }
.fd-strip span:last-child { display: none; }
.fd-emb { display: grid; justify-items: center; gap: 2cqw; margin-top: 2cqw; }
.fd-emb svg { width: 30cqw !important; height: 30cqw !important; filter: drop-shadow(0 2cqw 4cqw rgba(0, 0, 0, .5)); }
.fd-emb b { font: 700 3.6cqw Rajdhani, sans-serif; letter-spacing: .14em; color: var(--lt); text-align: center; }
.fd-label { width: 100%; background: var(--lb); color: var(--lt); border-radius: 1.6cqw; padding: 3cqw 4cqw; text-align: center; display: grid; gap: 1cqw; box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .35); direction: rtl; position: relative; z-index: 1; }
.fd-label small { font: 700 2.6cqw Rajdhani, sans-serif; letter-spacing: .22em; opacity: .7; direction: ltr; }
.fd-label b { font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: 5.8cqw; line-height: 1.35; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fd-label .mono { font-size: 3cqw; opacity: .75; direction: ltr; }
.fd-stamp { position: absolute; top: 46%; left: 50%; width: 66cqw; transform: translate(-50%, -50%) rotate(-13deg); opacity: .92; pointer-events: none; mix-blend-mode: normal; }
.fd-stamp .stamp, .fd-seal .stamp, .seal-hit .stamp { width: 100%; height: auto; }
.fd-seal { position: absolute; bottom: 28%; left: 6%; width: 38cqw; transform: rotate(-18deg); filter: drop-shadow(0 1cqw 1cqw rgba(0, 0, 0, .4)); z-index: 2; }
.fd-lock { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 2cqw; background: rgba(5, 3, 6, .62); backdrop-filter: blur(1.5px); color: #ff4d5e; }
.fd-lock svg { width: 16cqw; height: 16cqw; }
.fd-lock b { font: 700 4cqw Rajdhani, sans-serif; letter-spacing: .25em; }
.fd-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .09) 45%, transparent 60%); pointer-events: none; }
/* الأغلفة */
.fc-topsecret { --fb: #0b0b0d; --ff: radial-gradient(120% 90% at 30% 10%, #26272c, #0d0d10 70%); --lb: #121214; --lt: #f2f2f2; --st: #c1121f; }
.fc-topsecret .fd-label { border: .5cqw solid #c1121f; }
.fc-topsecret .fd-label small { color: #ff5a67; opacity: 1; }
.fc-secret { --fb: #3a070c; --ff: linear-gradient(150deg, #8d1420, #4c0a11); --lb: #f3e9d9; --lt: #3a070c; --st: #111; }
.fc-classified { --fb: #07142b; --ff: linear-gradient(150deg, #173b73, #0a1b3a); --lb: #dfe7f3; --lt: #0a1b3a; --st: #c9d3e0; }
.fc-classified .fd-strip { color: #0a1b3a; }
.fc-confidential { --fb: #b48d4f; --ff: linear-gradient(150deg, #ecd39f, #d4b273); --lb: #fffdf6; --lt: #3c2a10; --st: #c81e2e; }
.fc-confidential .fd-front { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(150deg, #ecd39f, #d4b273); }
.fc-confidential .fd-emb svg { opacity: .8; filter: sepia(.6) drop-shadow(0 1cqw 2cqw rgba(0, 0, 0, .3)); }
.fc-military { --fb: #2c311a; --ff: linear-gradient(150deg, #687040, #3e4426); --lb: #d9d3ae; --lt: #1d2410; --st: #1d2410; }
.fc-military .fd-emb.mil b { color: #e7e2c0; }
.fc-military .fd-label b { font-family: 'Black Ops One', 'IBM Plex Sans Arabic', sans-serif; letter-spacing: .02em; }
.fc-lspd { --fb: #071833; --ff: linear-gradient(160deg, #123a78, #0a2149 70%); --lb: #f6f2e2; --lt: #0f2c5c; --st: #e8c25a; }
.fc-lspd .fd-strip { color: #0f2c5c; }
.fc-lspd .fd-emb b { color: #e8c25a; font-size: 3.1cqw; }
.fc-normal { --fb: #b9c2cf; --ff: linear-gradient(150deg, #eef1f6, #d3dae4); --lb: #fff; --lt: #1f2a3a; --st: #6b7a90; }
.fc-normal .fd-strip { display: none; }
.folder.locked .fd-front { filter: saturate(.4) brightness(.8); }

/* ───────────────────────── قائمة الملفات ───────────────────────── */
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 22px; }
.fitem { cursor: pointer; display: grid; gap: 12px; align-content: start; }
.fi-fold { transition: transform .25s; }
.fitem:hover .fi-fold { transform: translateY(-6px) rotate(-1deg); }
.fitem:hover .fd-front { transform: rotateY(-22deg); }
.fitem.is-locked:hover .fd-front { transform: none; }
.fi-meta { display: grid; gap: 6px; }
.fi-meta b { font-size: 16px; line-height: 1.4; }
.fi-meta small { color: var(--mute); font-size: 12px; direction: ltr; text-align: end; }
.redacted { background: currentColor; color: var(--ink); border-radius: 3px; letter-spacing: -.1em; opacity: .85; }
.files-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; }
.fs-it { display: grid; gap: 8px; align-content: start; }
.fs-it b { font-size: 14.5px; line-height: 1.35; }
.fs-it small { color: var(--mute); font-size: 11.5px; direction: ltr; text-align: end; }
.fs-it:hover .fd-front { transform: rotateY(-20deg); }
.cover-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
.cp { border: 2px solid var(--line2); border-radius: 14px; padding: 12px 10px 10px; background: var(--plate); display: grid; gap: 4px; justify-items: center; text-align: center; transition: .15s; }
.cp .folder { margin-bottom: 6px; }
.cp b { font-family: var(--fl); letter-spacing: .08em; font-size: 15px; }
.cp small { color: var(--mute); font-size: 12px; }
.cp:hover { border-color: var(--line3); transform: translateY(-2px); }
.cp.on { border-color: var(--blue); box-shadow: var(--glow); background: var(--plate-up); }
.fm-head { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 14px; }
.fm-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.danger-t { color: var(--red) !important; }

/* رفض الوصول */
.denied { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle, rgba(60, 0, 8, .82), rgba(8, 0, 2, .94)); backdrop-filter: blur(6px); animation: fadein .2s both; }
.denied.out { animation: fadeout .3s both; }
.dn-box { text-align: center; border: 2px solid var(--red); border-radius: 18px; padding: 34px 40px; background: rgba(12, 2, 5, .9); box-shadow: 0 0 80px rgba(255, 40, 60, .35); max-width: 500px; color: #fff; }
.dn-ic { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: #e3263a; color: #fff; animation: pulseR 1.3s infinite; }
.dn-ic svg { width: 38px; height: 38px; }
@keyframes pulseR { 0% { box-shadow: 0 0 0 0 rgba(227, 38, 58, .7); } 100% { box-shadow: 0 0 0 26px rgba(227, 38, 58, 0); } }
.dn-box b.lat { display: block; font-size: 32px; color: #ff4d5e; letter-spacing: .3em; animation: glitch 1.6s infinite; direction: ltr; }
@keyframes glitch { 0%, 92%, 100% { transform: none; text-shadow: none; } 94% { transform: translate(-3px, 1px); text-shadow: 3px 0 #36e0ff; } 96% { transform: translate(3px, -1px); text-shadow: -3px 0 #ff2bd6; } }
.dn-box h3 { margin: 6px 0; font-size: 22px; }
.dn-box p { color: #f0b7bd; line-height: 1.9; margin: 0 0 18px; }

/* ───────────────────────── حركة الفتح والختم ───────────────────────── */
.fold-stage { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; background: rgba(1, 4, 10, 0); transition: background .35s, opacity .35s; }
.fold-stage.in { background: rgba(1, 4, 10, .86); backdrop-filter: blur(6px); }
[data-theme="light"] .fold-stage.in { background: rgba(225, 232, 244, .9); }
.fs-in { width: min(400px, 72vw); position: relative; transform: scale(.55) translateY(40px); opacity: 0; transition: transform .5s cubic-bezier(.2, .9, .3, 1.15), opacity .3s; }
.fs-in .folder { --fw: 100%; }
.fold-stage.in .fs-in { transform: none; opacity: 1; }
.fold-stage.open .fd-front { transform: rotateY(-165deg); }
.fold-stage.zoom .fd-sheets { transform: scale(2.6) translateY(-6%); opacity: 0; }
.fold-stage.zoom .fd-front, .fold-stage.zoom .fd-back { opacity: 0; transition: opacity .3s .1s, transform .85s; }
.fold-stage.out { opacity: 0; pointer-events: none; }
.seal-hit { position: absolute; top: 40%; left: 50%; width: 76%; z-index: 5; transform: translate(-50%, -50%) scale(3.2) rotate(-30deg); opacity: 0; pointer-events: none; }
.fold-stage.stamped .seal-hit { transform: translate(-50%, -50%) scale(1) rotate(-12deg); opacity: 1; transition: transform .23s cubic-bezier(.55, 0, .8, .2), opacity .1s; }
.fold-stage.shake .fs-in { animation: stampShake .45s; }
@keyframes stampShake { 15% { transform: translate(-4px, 3px) scale(.985); } 35% { transform: translate(4px, -2px); } 55% { transform: translate(-2px, 1px); } 75% { transform: translate(1px, 0); } }
.seal-done { text-align: center; opacity: 0; transform: translateY(14px); transition: .4s; color: var(--ink); }
.fold-stage.done .seal-done { opacity: 1; transform: none; }
.seal-done b.lat { display: block; font-size: 24px; letter-spacing: .32em; color: var(--green); direction: ltr; }
.seal-done h3 { margin: 4px 0; font-size: 22px; }
.seal-done p { margin: 0 0 14px; color: var(--mute); }

/* ───────────────────────── الصفحة وعناصرها ───────────────────────── */
.pg { position: relative; overflow: hidden; color: #111827; direction: rtl; font-family: 'IBM Plex Sans Arabic', sans-serif; text-align: right; user-select: none; }
.pg-bgv { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; }
.pg-els { position: absolute; inset: 0; }
.pg .el { position: absolute; box-sizing: border-box; }
.pg svg { width: 100%; height: 100%; }
.el .tx { width: 100%; min-height: 100%; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; box-sizing: border-box; }
.el .tx ul, .el .tx ol { margin: 0; padding-inline-start: 1.2em; }
.el.editing .tx { cursor: text; user-select: text; -webkit-user-select: text; outline: 1px dashed rgba(63, 169, 255, .6); }
.el .shp, .el .frm, .el .stp, .el .ico, .el .rdc, .el .lgo { width: 100%; height: 100%; display: block; box-sizing: border-box; }
.el .ln { width: 100%; height: 100%; overflow: visible; display: block; }
.frm { overflow: hidden; position: relative; }
.frm img, .frm video { width: 100%; height: 100%; display: block; }
.frm .ph { display: grid; place-content: center; justify-items: center; height: 100%; color: #6b7a90; font-weight: 700; background: repeating-linear-gradient(45deg, #e8edf5 0 10px, #dde4ef 10px 20px); border: 2px dashed #b8c3d4; box-sizing: border-box; }
.frm .ph svg { width: 34%; height: 34%; max-width: 64px; max-height: 64px; }
.frm.vid { background: #000; }
.frm.vid.keyed { background: transparent; }
.frm.vid.keyed video { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.frm .vbg { width: 100%; height: 100%; display: block; object-fit: contain; }
.prs .silh { width: 100%; height: 100%; }
.ico { display: grid !important; place-items: center; }
.ico svg { width: 100% !important; height: 100% !important; stroke-width: var(--sw, 1.8); }
.lgo svg { width: 100% !important; height: 100% !important; }
.rdc { background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 5px); border-radius: 2px; }
.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tbl td { border: 1.5px solid var(--tb); padding: 6px 10px; vertical-align: top; line-height: 1.5; min-height: 1.6em; height: 1.6em; overflow-wrap: anywhere; outline: none; }
.tbl td[contenteditable=true] { background: rgba(63, 169, 255, .1); cursor: text; user-select: text; }

/* مشغّل الصوت داخل الملف */
.aud {
  width: 100%; height: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 16px; border-radius: 18px; box-sizing: border-box;
  background: linear-gradient(135deg, #0a1322, #13243f); border: 1px solid color-mix(in srgb, var(--ac) 50%, transparent);
  box-shadow: 0 12px 34px -12px rgba(0, 0, 0, .7), inset 0 0 40px -16px var(--ac); color: #eaf1fb; position: relative; overflow: hidden; direction: rtl;
}
.aud::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px); pointer-events: none; }
.a-pp { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--ac); color: #04101f; display: grid; place-items: center; flex-shrink: 0; cursor: pointer;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ac) 20%, transparent), 0 0 26px color-mix(in srgb, var(--ac) 70%, transparent); position: relative; z-index: 1; }
.a-pp svg { width: 24px !important; height: 24px !important; }
.aud.on .a-pp { animation: aPulse 1.5s infinite; }
@keyframes aPulse { 50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--ac) 12%, transparent), 0 0 36px var(--ac); } }
.a-mid { flex: 1; min-width: 0; display: grid; gap: 7px; position: relative; z-index: 1; }
.a-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.a-top b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.a-t { font-size: 12px; color: #9fb3cf; white-space: nowrap; direction: ltr; }
.a-wave { position: relative; height: 32px; display: flex; align-items: center; gap: 2px; direction: ltr; cursor: pointer; }
.a-wave > i { flex: 1; background: rgba(255, 255, 255, .2); border-radius: 2px; min-width: 2px; }
.a-fill { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0); pointer-events: none; }
.a-fill > i { flex: 1; background: var(--ac); border-radius: 2px; min-width: 2px; box-shadow: 0 0 6px var(--ac); }
.aud.on .a-wave > i { animation: aBar 1.1s ease-in-out infinite; }
.aud.on .a-wave > i:nth-child(3n) { animation-delay: -.4s; } .aud.on .a-wave > i:nth-child(3n+1) { animation-delay: -.8s; }
@keyframes aBar { 50% { transform: scaleY(.6); } }
.a-vol { display: flex; align-items: center; gap: 6px; width: 104px; flex-shrink: 0; color: #9fb3cf; position: relative; z-index: 1; }
.a-vol svg { width: 18px !important; height: 18px !important; }
.a-vol input { width: 100%; accent-color: var(--ac); }
.a-rec { position: absolute; top: 5px; left: 12px; font: 700 9px Rajdhani, sans-serif; letter-spacing: .24em; color: var(--ac); display: flex; gap: 5px; align-items: center; opacity: .8; direction: ltr; }
.a-rec i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d5e; }
.aud.on .a-rec i { animation: blink 1s infinite; }

/* تحكّم الفيديو في العارض */
.vctl { position: absolute; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); opacity: 0; transition: .2s; direction: ltr; z-index: 2; }
.frm.vid:hover .vctl, .frm.vid:not(.on) .vctl { opacity: 1; }
.vctl button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.vctl button svg { width: 18px !important; height: 18px !important; }
.vctl .v-pp { background: #3fa9ff; }
.v-bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .25); cursor: pointer; position: relative; }
.v-bar i { position: absolute; inset-block: 0; left: 0; width: 0; border-radius: inherit; background: #3fa9ff; box-shadow: 0 0 8px #3fa9ff; }
.v-t { color: #fff; font-size: 12px; min-width: 76px; }
.v-vol { width: 84px; accent-color: #3fa9ff; }

/* ───────────────────────── العارض ───────────────────────── */
.ov-host, .vw-host { position: fixed; inset: 0; z-index: 50; }
.vw { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: 66px minmax(0, 1fr); background: var(--base); color: var(--ink); }
.vw::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0, 0, 0, .5)); pointer-events: none; }
.vw-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--plate); backdrop-filter: blur(10px); }
.vw-brand { display: flex; align-items: center; gap: 8px; }
.vw-brand .logo { width: 44px; height: 44px; }
.vw-brand b { font-size: 20px; letter-spacing: .3em; }
.vw-title { display: grid; min-width: 0; }
.vw-title b { font-size: 17px; line-height: 1.3; white-space: nowrap; overflow: hidden; }
.vw-title small { color: var(--mute); font-size: 12px; direction: ltr; text-align: end; }
.vw-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.vw-zn { min-width: 52px; text-align: center; font-size: 15px; }
.vw-body { position: relative; z-index: 1; display: grid; grid-template-columns: 320px minmax(0, 1fr) 150px; min-height: 0; }
.vw-info { overflow: auto; padding: 22px 20px; border-inline-end: 1px solid var(--line); background: var(--panel); display: grid; gap: 16px; align-content: start; }
.vw-fold { width: 200px; margin: 0 auto; }
.vw-info dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 14px; }
.vw-info dt { color: var(--mute); font-weight: 600; }
.vw-info dd { margin: 0; display: flex; align-items: center; gap: 6px; }
.vw-info dd .badge { width: 22px; height: 22px; }
.vw-sum { margin: 0; color: var(--ink2); line-height: 1.8; padding: 12px 14px; border-radius: 12px; background: rgba(63, 169, 255, .06); border: 1px solid var(--line); }
.vw-hint { font-size: 12.5px; color: var(--mute); line-height: 1.8; display: flex; gap: 8px; margin: 0; }
.vw-hint svg { flex-shrink: 0; margin-top: 3px; }
.vw-stage { position: relative; overflow: auto; display: flex; padding: 30px 70px; }
.vw.lensing .vw-stage, .vw.lensing .book { cursor: none; }
.vw.zoomed .vw-stage { cursor: grab; }
.vw-cover { margin: auto; width: min(380px, 60vw); cursor: pointer; display: grid; justify-items: center; gap: 18px; }
.vw-cover .folder { --fw: 100%; transition: transform .3s; }
.vw-cover:hover .folder { transform: translateY(-6px); }
.vw-cover:hover .fd-front { transform: rotateY(-18deg); }
.vw-cover.opening .fd-front { transform: rotateY(-165deg); }
.vw-cover.opening .folder { transform: scale(1.06); }
.vw-open { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 99px; background: var(--blue); color: #fff; font-weight: 700; animation: blink 1.6s infinite; }
.book { margin: auto; position: relative; perspective: 2800px; flex-shrink: 0; }
.book-in { position: absolute; left: 0; top: 0; width: 794px; height: 1123px; transform-origin: 0 0; transform-style: preserve-3d; }
.leaf { position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.35, .55, .2, 1), opacity .2s; }
.leaf.past { transform: rotateY(-178deg); opacity: 0; pointer-events: none; transition: transform .9s cubic-bezier(.35, .55, .2, 1), opacity .25s .7s; }
.lf-front, .lf-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.lf-front { box-shadow: 0 34px 90px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .1); }
.lf-front::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .12), transparent 4%); }
.lf-back { transform: rotateY(180deg); background: linear-gradient(90deg, #d4d0c6, #f2efe8 30%, #e8e4db); }
.vw-nav { position: fixed; top: 50%; z-index: 4; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line2); background: var(--plate-up); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); transition: .15s; }
.vw-nav:hover:not(:disabled) { background: var(--blue); color: #fff; border-color: var(--blue); }
.vw-nav:disabled { opacity: .3; }
.vw-nav svg { width: 24px; height: 24px; }
.vw-nav.prev { right: 342px; } .vw-nav.next { left: 172px; }
.vw:not(.opened) .vw-nav, .vw:not(.opened) .vw-count { display: none; }
.vw-count { position: fixed; bottom: 18px; left: calc(150px + (100vw - 470px) / 2); transform: translateX(-50%); z-index: 4; padding: 6px 16px; border-radius: 99px; background: var(--plate-up); border: 1px solid var(--line2); font-size: 15px; box-shadow: var(--shadow); }
.loupe { position: absolute; z-index: 6; width: 240px; height: 240px; border-radius: 50%; overflow: hidden; pointer-events: none; border: 3px solid var(--blue); box-shadow: 0 0 0 6px rgba(63, 169, 255, .2), 0 20px 50px rgba(0, 0, 0, .6); background: #fff; }
.loupe::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 30px rgba(0, 0, 0, .35); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .25), transparent 40%); }
.lp-in { position: absolute; left: 0; top: 0; width: 794px; height: 1123px; transform-origin: 0 0; }
.vw-thumbs { overflow: auto; padding: 16px 14px; border-inline-start: 1px solid var(--line); background: var(--panel); display: grid; gap: 14px; align-content: start; }
.vt { border: 2px solid transparent; border-radius: 8px; padding: 0; background: none; display: grid; gap: 4px; justify-items: center; cursor: pointer; }
.vt-s { width: 110px; height: 156px; overflow: hidden; border-radius: 6px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6); pointer-events: none; }
.vt-s .pg { transform: scale(.1386); transform-origin: 0 0; }
.vt span { font-size: 13px; color: var(--mute); }
.vt.on { border-color: var(--blue); } .vt.on span { color: var(--blue); }
.vw-music { padding: 14px; border-radius: 16px; border: 1px solid var(--line2); background: linear-gradient(160deg, rgba(31, 124, 255, .16), rgba(54, 224, 255, .04)); display: grid; gap: 12px; position: relative; overflow: hidden; }
.vm-art { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; background: #061226; display: grid; place-items: center; color: var(--cyan); }
.vm-art iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.vm-art .vm-ph svg { width: 40px; height: 40px; }
.vw-music.has-yt .vm-ph { display: none; }
.vm-txt small { display: block; color: var(--blue); font-weight: 700; font-size: 12px; }
.vm-txt b { font-size: 14.5px; line-height: 1.4; }
.vm-ctl { display: flex; align-items: center; gap: 8px; }
.vm-ctl .vm-vol { flex: 1; min-width: 0; }
.vm-vn { width: 30px; text-align: center; }
.vm-eq { position: absolute; top: 14px; left: 14px; display: flex; gap: 2px; align-items: flex-end; height: 18px; z-index: 2; }
.vm-eq i { width: 3px; height: 4px; background: var(--cyan); border-radius: 2px; }
.vw-music.on .vm-eq i { animation: eq .8s ease-in-out infinite; }
.vw-music.on .vm-eq i:nth-child(odd) { animation-delay: -.35s; }
body.share-mode #vig { opacity: .6; }

/* ───────────────────────── المحرّر ───────────────────────── */
body.ed-open { overflow: hidden; }
.ed { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: 62px minmax(0, 1fr); background: var(--bg2); color: var(--ink); }
.ed.closing { opacity: 0; transition: opacity .3s; }
.ed-top { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--plate-up); z-index: 3; }
.ed-fold { color: var(--blue); }
.ed-title { flex: 0 1 340px; min-width: 120px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; font-weight: 700; font-size: 17px; padding: 0 10px; color: var(--ink); outline: none; }
.ed-title:hover { border-color: var(--line2); } .ed-title:focus { border-color: var(--blue); background: var(--panel); }
.ed-save { font-size: 13px; font-weight: 600; color: var(--green); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ed-save.pending { color: var(--amber); } .ed-save.saving { color: var(--blue); } .ed-save.err { color: var(--red); }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }
.ed-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.ed-sep { width: 1px; height: 26px; background: var(--line2); margin: 0 4px; }
.ed-zn { min-width: 48px; text-align: center; cursor: pointer; }
.flip-x svg { transform: scaleX(-1); } .flip-y svg { transform: rotate(180deg); }
[data-pa="up"] svg, [data-la="up"] svg, [data-x="fwd"] svg { transform: rotate(180deg); }
.ed-body { display: grid; grid-template-columns: 80px 340px minmax(0, 1fr); min-height: 0; }
.ed-tabs { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-inline-end: 1px solid var(--line); background: var(--plate-up); overflow-y: auto; }
.ed-tabs button { display: grid; justify-items: center; gap: 5px; padding: 11px 4px; border-radius: 12px; border: 0; background: transparent; color: var(--mute); font-size: 12px; font-weight: 600; }
.ed-tabs button svg { width: 22px; height: 22px; }
.ed-tabs button:hover { color: var(--ink); background: rgba(63, 169, 255, .06); }
.ed-tabs button.on { background: rgba(63, 169, 255, .15); color: var(--blue); }
.ed-panel { overflow-y: auto; padding: 16px; border-inline-end: 1px solid var(--line); background: var(--panel2); }
.ed-panel h4 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.ed-panel h4 svg { color: var(--blue); }
.ed-panel h5 { margin: 18px 0 8px; font-size: 13px; color: var(--mute); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ep-note { font-size: 12.5px; color: var(--mute); line-height: 1.8; margin: 8px 0; }
.ep-ask { padding: 12px; border-radius: 12px; border: 1px solid var(--blue); background: rgba(63, 169, 255, .08); display: grid; gap: 10px; margin-bottom: 12px; }
.ep-grid { display: grid; gap: 8px; }
.ep-grid.g2 { grid-template-columns: repeat(2, 1fr); } .ep-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.ep-grid.g4 { grid-template-columns: repeat(4, 1fr); } .ep-grid.g5 { grid-template-columns: repeat(5, 1fr); }
.ep-it { min-height: 58px; border-radius: 10px; border: 1px solid var(--line); background: var(--plate); color: var(--ink2); display: grid; place-items: center; padding: 6px; transition: .12s; position: relative; overflow: hidden; }
.ep-it:hover { border-color: var(--blue); color: var(--blue); background: var(--plate-up); transform: translateY(-1px); }
.ep-it svg { width: 26px; height: 26px; }
.ep-it.shp { color: var(--blue); } .ep-it.shp svg { width: 36px; height: 36px; }
.shp-p { display: block; width: 34px; height: 34px; background: currentColor; }
.ep-it[data-line] svg { width: 54px; height: 20px; }
.ep-it .logo, .ep-it .badge { width: 46px !important; height: 46px !important; }
.ep-it[data-pstar] svg { width: 50px !important; height: 50px !important; }
.ep-it.prs-p { height: 90px; }
.ep-it.prs-p .el { position: static !important; transform: none !important; }
.stp-p { font: 700 13px Rajdhani, 'IBM Plex Sans Arabic', sans-serif; letter-spacing: .1em; color: #d61f37 !important; border: 2px solid #d61f37 !important; min-height: 44px; background: rgba(214, 31, 55, .05) !important; }
.ep-it.wide { display: flex; gap: 8px; font-weight: 700; font-size: 13.5px; }
.rdc-p { display: inline-block; width: 46px; height: 12px; background: #0a0a0a; border-radius: 2px; }
.tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tpl { border: 2px solid var(--line); border-radius: 12px; padding: 6px; background: var(--plate); display: grid; gap: 6px; justify-items: center; transition: .15s; }
.tpl:hover { border-color: var(--blue); transform: translateY(-2px); }
.tpl b { font-size: 13px; }
.tpl-s { width: 132px; height: 187px; overflow: hidden; border-radius: 6px; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .5); pointer-events: none; }
.tpl-s .pg { transform: scale(.1663); transform-origin: 0 0; }
.tx-pre { display: grid; gap: 8px; margin-top: 12px; }
.tx-it { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--plate); color: var(--ink); text-align: start; transition: .12s; }
.tx-it:hover { border-color: var(--blue); }
.up-drop { margin: 10px 0; padding: 18px; border: 2px dashed var(--line2); border-radius: 12px; display: grid; justify-items: center; gap: 6px; color: var(--mute); font-size: 13px; text-align: center; }
.up-drop svg { width: 28px; height: 28px; }
.up-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.up-it { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #071222; padding: 0; display: grid; place-items: center; }
.up-it img, .up-it video { width: 100%; height: 100%; object-fit: cover; }
.up-it:hover { border-color: var(--blue); }
.up-t { position: absolute; bottom: 6px; left: 6px; background: rgba(0, 0, 0, .7); color: #fff; border-radius: 6px; padding: 3px; display: grid; }
.up-t svg { width: 14px; height: 14px; }
.up-aud { display: grid; justify-items: center; gap: 4px; color: var(--cyan); padding: 8px; text-align: center; }
.up-aud small { font-size: 11px; color: var(--ink2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.up-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; display: none; place-items: center; }
.up-x svg { width: 13px; height: 13px; }
.up-it:hover .up-x { display: grid; }
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bg-it { border: 2px solid var(--line); border-radius: 10px; padding: 4px; background: var(--plate); display: grid; gap: 4px; }
.bg-it i { display: block; height: 62px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .1); }
.bg-it small { font-size: 11.5px; color: var(--ink2); }
.bg-it.on { border-color: var(--blue); }
.pal { display: flex; flex-wrap: wrap; gap: 6px; }
.pal button, .pal .pal-custom { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--line2); cursor: pointer; padding: 0; position: relative; display: grid; place-items: center; }
.pal.sm button { width: 22px; height: 22px; border-radius: 6px; }
.pal .pal-custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); color: #fff; }
.pal .pal-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.snd-cur { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--plate); }
.snd-cur.has { border-color: var(--blue); background: rgba(63, 169, 255, .08); }
.sc-art { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #061226; color: var(--cyan); flex-shrink: 0; }
.sc-art img { width: 100%; height: 100%; object-fit: cover; }
.snd-cur small { display: block; color: var(--mute); font-size: 12px; }
.snd-cur b { font-size: 14px; line-height: 1.4; }
.lay-list { display: grid; gap: 6px; }
.lay { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--plate); cursor: pointer; }
.lay.on { border-color: var(--blue); background: rgba(63, 169, 255, .1); }
.l-ic { color: var(--blue); display: grid; } .l-n { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.icon-btn:disabled { opacity: .35; pointer-events: none; }

.ed-main { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.ed-ctx { border-bottom: 1px solid var(--line); background: var(--plate-up); padding: 8px 14px; display: grid; gap: 6px; min-height: 58px; align-content: center; z-index: 2; }
.cx-hint { color: var(--mute); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-hint b { color: var(--ink2); }
.cx-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-row.sub { padding-top: 6px; border-top: 1px dashed var(--line); }
.cx-t { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--blue); margin-inline-end: 6px; }
.cx-font, .cx-sel { height: 36px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); padding: 0 8px; max-width: 190px; }
.cx-in { height: 36px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); padding: 0 10px; width: 170px; }
.cx-num { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 9px; overflow: hidden; height: 36px; }
.cx-num button { width: 28px; height: 100%; border: 0; background: var(--panel); font-weight: 700; }
.cx-num input { width: 48px; height: 100%; border: 0; text-align: center; background: transparent; color: var(--ink); -moz-appearance: textfield; }
.cx-num input::-webkit-inner-spin-button { display: none; }
.cx-num2 { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mute); font-weight: 700; }
.cx-num2 svg { width: 13px; height: 13px; }
.cx-num2 input { width: 62px; height: 32px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); text-align: center; font-family: var(--fl); font-size: 14px; }
.cx-rng { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mute); font-weight: 600; }
.cx-rng input { width: 90px; }
.cx-l { font-size: 12px; color: var(--mute); }
.cx-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink2); }
.cb { position: relative; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line2); display: grid; place-items: center; cursor: pointer; background: var(--panel); overflow: hidden; }
.cb i { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .25); background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%); background-size: 8px 8px; background-position: 0 0, 4px 4px; }
.cb i[style] { background-image: none; }
.cb.hl i { width: 22px; height: 8px; position: absolute; bottom: 5px; border-radius: 3px; }
.cb.hl svg { width: 15px; height: 15px; margin-top: -8px; }
.cb input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg.sm { padding: 3px; } .seg.sm button { height: 30px; padding: 0 10px; font-size: 13px; }
.cx-more { position: relative; }
.cx-more summary { list-style: none; cursor: pointer; }
.cx-more summary::-webkit-details-marker { display: none; }
.cx-pop { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 10; width: 270px; padding: 14px; border-radius: 14px; background: var(--plate-up); border: 1px solid var(--line2); box-shadow: var(--shadow); display: grid; gap: 10px; }
.cx-pop label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.cx-pop label.row { display: flex; }

.ed-stage { overflow: auto; outline: none; background: radial-gradient(circle at 50% 0%, rgba(63, 169, 255, .05), transparent 50%), repeating-linear-gradient(45deg, rgba(120, 170, 255, .025) 0 12px, transparent 12px 24px); padding: 26px 40px 90px; }
.ed-col { display: flex; flex-direction: column; align-items: center; gap: 28px; min-width: min-content; }
.pg-block { display: grid; gap: 8px; }
.pg-head { display: flex; align-items: center; gap: 6px; color: var(--mute); font-size: 13px; }
.pg-head b { color: var(--ink2); }
.pg-block.cur .pg-head b { color: var(--blue); }
.pg-wrap { position: relative; box-shadow: 0 24px 70px -24px rgba(0, 0, 0, .85); outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .15s; touch-action: none; }
.pg-block.cur .pg-wrap { outline-color: rgba(63, 169, 255, .55); }
.pg-scale { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pg-wrap .el { cursor: move; }
.pg-wrap .el video, .pg-wrap .el audio, .pg-wrap .el input, .pg-wrap .el button { pointer-events: none; }
.pg-wrap .el.editing { cursor: text; }
.pg-add { align-self: center; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 26px; border-radius: 14px; border: 2px dashed var(--line3); background: transparent; color: var(--ink2); font-weight: 700; }
.pg-add:hover { border-color: var(--blue); color: var(--blue); background: rgba(63, 169, 255, .06); }
.ov { position: absolute; inset: 0; pointer-events: none; --inv: 1; z-index: 9999; }
.sbox { position: absolute; box-sizing: border-box; border: calc(2px * var(--inv)) solid #3fa9ff; transform-origin: center; box-shadow: 0 0 0 calc(1px * var(--inv)) rgba(255, 255, 255, .5); }
.sbox.locked { border-color: #f59e0b; border-style: dashed; }
.sbox.multi { border-style: dashed; }
.sbox.ghost { border-width: calc(1px * var(--inv)); box-shadow: none; opacity: .7; }
.sbox .h { position: absolute; width: calc(13px * var(--inv)); height: calc(13px * var(--inv)); background: #fff; border: calc(2px * var(--inv)) solid #1f7cff; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: auto; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.h-nw { left: 0; top: 0; cursor: nwse-resize; } .h-n { left: 50%; top: 0; cursor: ns-resize; } .h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.h-e { left: 100%; top: 50%; cursor: ew-resize; } .h-se { left: 100%; top: 100%; cursor: nwse-resize; } .h-s { left: 50%; top: 100%; cursor: ns-resize; }
.h-sw { left: 0; top: 100%; cursor: nesw-resize; } .h-w { left: 0; top: 50%; cursor: ew-resize; }
.sbox .h-n, .sbox .h-s { width: calc(22px * var(--inv)); height: calc(9px * var(--inv)); border-radius: calc(5px * var(--inv)); }
.sbox .h-e, .sbox .h-w { width: calc(9px * var(--inv)); height: calc(22px * var(--inv)); border-radius: calc(5px * var(--inv)); }
.h-rot { position: absolute; left: 50%; top: 100%; margin-top: calc(22px * var(--inv)); width: calc(28px * var(--inv)); height: calc(28px * var(--inv)); transform: translateX(-50%); background: #fff; border-radius: 50%; display: grid; place-items: center; color: #1f6feb; cursor: grab; pointer-events: auto; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.h-rot svg { width: calc(16px * var(--inv)) !important; height: calc(16px * var(--inv)) !important; }
.s-size { position: absolute; bottom: 100%; left: 50%; margin-bottom: calc(8px * var(--inv)); transform: translateX(-50%); font-size: calc(12px * var(--inv)); background: #1f6feb; color: #fff; padding: calc(2px * var(--inv)) calc(7px * var(--inv)); border-radius: calc(6px * var(--inv)); white-space: nowrap; direction: ltr; }
.s-lock { position: absolute; top: calc(-14px * var(--inv)); right: calc(-14px * var(--inv)); width: calc(28px * var(--inv)); height: calc(28px * var(--inv)); background: #f59e0b; color: #fff; border-radius: 50%; display: grid; place-items: center; }
.s-lock svg { width: calc(15px * var(--inv)) !important; height: calc(15px * var(--inv)) !important; }
.guide { position: absolute; background: #ff2bd6; box-shadow: 0 0 4px #ff2bd6; }
.guide.gv { top: 0; bottom: 0; width: calc(1.5px * var(--inv)); } .guide.gh { left: 0; right: 0; height: calc(1.5px * var(--inv)); }
.marq { position: absolute; border: calc(1.5px * var(--inv)) dashed #3fa9ff; background: rgba(63, 169, 255, .1); }
.rm-ov { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 6px; background: rgba(3, 8, 18, .78); color: #fff; text-align: center; font-size: 15px; padding: 10px; }
.rm-ov .spin { width: 34px; height: 34px; border-width: 3px; color: #36e0ff; }
.rm-ov small { color: #9fb3cf; font-size: 12px; } .rm-ov em { font-style: normal; font-family: var(--fl); font-size: 20px; color: #36e0ff; }
.ed-prog { position: fixed; bottom: 18px; left: 18px; z-index: 60; display: grid; grid-template-columns: auto 160px auto; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--plate-up); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 13.5px; }
.ed-prog span { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.ed-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .2s; }
.ed-prog em { font-style: normal; font-family: var(--fl); color: var(--blue); }
.ed-drop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(4, 12, 26, .72); border: 4px dashed var(--blue); pointer-events: none; }
.ed-drop div { display: grid; justify-items: center; gap: 8px; color: #fff; font-size: 20px; }
.ed-drop svg { width: 60px; height: 60px; color: var(--cyan); }

/* ───────────────────────── الشاشات الصغيرة ───────────────────────── */
@media (max-width: 1200px) {
  .vw-body { grid-template-columns: 270px minmax(0, 1fr) 0; }
  .vw-thumbs { display: none; }
  .vw-nav.prev { right: 290px; } .vw-nav.next { left: 18px; }
  .vw-count { left: calc((100vw - 270px) / 2); }
  .ed-body { grid-template-columns: 72px 300px minmax(0, 1fr); }
  .ed-tools .btn.sm:not(.primary) { padding: 0 10px; }
}
@media (max-width: 900px) {
  .vw-top { gap: 8px; padding: 0 10px; } .vw-top .tag { display: none; }
  .vw-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .vw-info { padding: 10px; border: 0; }
  .vw-info > :not(.vw-music) { display: none; }
  .vw-music { grid-template-columns: 90px minmax(0, 1fr); } .vm-art { grid-row: span 2; }
  .vw-stage { padding: 16px; }
  .vw-nav.prev { right: 10px; } .vw-nav.next { left: 10px; } .vw-nav { width: 44px; height: 44px; top: auto; bottom: 14px; }
  .vw-count { left: 50%; }
  .ed-body { grid-template-columns: 62px minmax(0, 1fr); }
  .ed-panel { position: fixed; top: 62px; bottom: 0; right: 62px; width: min(330px, calc(100vw - 62px)); z-index: 6; transform: translateX(110%); transition: transform .22s; box-shadow: var(--shadow); }
  .ed.panel-open .ed-panel { transform: none; }
  .ed-tabs button span { font-size: 10.5px; }
  .ed-title { flex-basis: 140px; font-size: 15px; }
  .ed-tools .ed-sep, .ed-tools [data-a=zin], .ed-tools [data-a=zout], .ed-zn, .ed-save { display: none; }
  .ed-stage { padding: 16px 12px 80px; }
}

/* تعديلات الأغلفة: ختم LSPD والعسكري تحت الشعار لا فوقه، والعادي بشعار باهت */
.fc-lspd .fd-stamp, .fc-military .fd-stamp { top: 57%; width: 58cqw; }
.fc-normal .fd-emb svg { filter: grayscale(1) opacity(.45); }
/* المصغّرات: الصفحة أعرض من حاويتها، وفي RTL تطفح لليسار فتختفي بعد التصغير — نثبّتها LTR */
.tpl-s, .vt-s, .fd-mini, .lp-in, .ep-it.prs-p { direction: ltr; }
.vw-stage { padding: 22px 70px 70px; }
.vw-count { bottom: 14px; }
