/* ===== كليب كات — هوية بصرية أصلية: زمردي ← كهرماني على كحلي ===== */
@font-face { font-family: 'Cairo'; src: url('../assets/fonts/Cairo-Variable.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }
:root {
  --primary: #12c2a0; --primary-ink: #04221c; --accent: #f5a524; --like: #ff5d73; --danger: #ff5d73; --ok: #19c37d;
  --grad: linear-gradient(135deg, #12c2a0 0%, #5fd08a 45%, #f5a524 100%);
  --radius: 16px; --nav-h: 64px; --app-w: 480px; --notice-gap: 0px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
[data-theme=dark] { --bg: #0b1020; --bg2: #0f1630; --surface: #141c34; --surface2: #1c2644; --text: #eef2ff; --muted: #97a1c0; --line: rgba(255,255,255,.09); --shadow: 0 10px 30px rgba(0,0,0,.35); color-scheme: dark; }
[data-theme=light] { --bg: #f7f5f0; --bg2: #efece4; --surface: #ffffff; --surface2: #f2efe8; --text: #10162b; --muted: #5d6580; --line: rgba(16,22,43,.1); --shadow: 0 10px 30px rgba(16,22,43,.08); color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
@media (min-width: 700px) { body { background: radial-gradient(1200px 600px at 10% -10%, rgba(18,194,160,.14), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(245,165,36,.12), transparent 60%), var(--bg2); } }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--muted); } .sm { font-size: 13px; } .center { text-align: center; } .pad { padding: 24px; } .pad-x { padding: 0 16px; } .grow { flex: 1; min-width: 0; } .bad { color: var(--danger); }
[dir=rtl] .flip-rtl { transform: scaleX(-1); } [dir=ltr] .flip-ltr { transform: scaleX(-1); }
.rot-up { transform: rotate(90deg); } .rot-down { transform: rotate(-90deg); }

/* ===== الهيكل ===== */
#app { position: relative; max-width: var(--app-w); margin: 0 auto; min-height: 100dvh; background: var(--bg); }
@media (min-width: 700px) { #app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,.25); } }
@media (min-width: 1024px) { #app:not(.immersive) { --app-w: 820px; } }
#view { padding-bottom: calc(var(--nav-h) + 24px + var(--notice-gap) + env(safe-area-inset-bottom)); outline: none; }
#app.has-demo { --notice-gap: 40px; }
#app.immersive #view { padding: 0; height: 100dvh; overflow: hidden; position: relative; background: #000; }
.loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; border-top-color: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== الشريط السفلي ===== */
#nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--app-w); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 30; }
@media (min-width: 1024px) { #app:not(.immersive) #nav { max-width: 820px; } }
#app.immersive #nav { background: rgba(5,8,18,.92); border-top-color: rgba(255,255,255,.08); color: #fff; --muted: #a9b1cc; }
#nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); font-size: 11px; font-weight: 600; padding: 6px 0; transition: color .2s; }
#nav a.active { color: var(--text); } #app.immersive #nav a.active { color: #fff; }
#nav a.active .ic { color: var(--primary); }
#nav .nav-plus { justify-self: center; width: 52px; height: 38px; border-radius: 13px; background: var(--grad); color: var(--primary-ink); display: grid; place-items: center; padding: 0; box-shadow: 0 6px 18px rgba(18,194,160,.35); transition: transform .2s var(--ease); }
#nav .nav-plus:active { transform: scale(.92); }
#nav .dot { position: absolute; top: 2px; inset-inline-start: calc(50% + 6px); background: var(--accent); color: #1a1200; font-size: 10px; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

/* ===== العلامة ===== */
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; }
.brand-name { font-size: 20px; letter-spacing: -.2px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { flex: none; filter: drop-shadow(0 3px 8px rgba(18,194,160,.35)); }

/* ===== أزرار ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); border-radius: 12px; padding: 9px 16px; font-weight: 700; cursor: pointer; transition: transform .15s var(--ease), background .2s, opacity .2s; text-align: center; }
.btn:hover { background: color-mix(in srgb, var(--surface2) 80%, var(--primary)); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); color: var(--primary-ink); border-color: transparent; box-shadow: 0 6px 18px rgba(18,194,160,.25); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 13px 18px; font-size: 16px; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.glass, .icon-btn.glass { background: rgba(10,14,28,.35); border: 1px solid rgba(255,255,255,.15); color: #fff; backdrop-filter: blur(8px); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 0; background: transparent; color: inherit; cursor: pointer; transition: background .2s; }
.icon-btn:hover { background: var(--surface2); }
.icon-btn.danger { color: var(--danger); }
.lang-txt { font-weight: 800; font-size: 14px; }

/* ===== الصفحات ===== */
.page { padding: 0 16px; animation: fadeUp .35s var(--ease); }
.page.narrow { max-width: 560px; margin: 0 auto; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.page-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; margin: 0 -16px 8px; padding: 10px 12px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.page-head h1 { flex: 1; font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tools { display: flex; gap: 2px; } .ph-spacer { width: 8px; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; margin: 22px 0 10px; }
.sec-title .ic { color: var(--primary); }
.sub-title { font-size: 14px; color: var(--muted); margin: 16px 0 6px; }
.lead { color: var(--muted); margin: 4px 0 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card h2 { font-size: 16px; margin-bottom: 10px; }
.note, .warn, .demo-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin: 10px 0; font-size: 13.5px; }
.note { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); }
.warn { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.warn .ic, .demo-banner .ic { color: var(--accent); flex: none; margin-top: 2px; }
.demo-banner { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 16%, var(--surface)) 0 12px, color-mix(in srgb, var(--accent) 9%, var(--surface)) 12px 24px); border: 1px dashed var(--accent); font-weight: 700; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 16px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 17px; }
.empty p { margin: 0; max-width: 300px; }
.pill { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--surface2); vertical-align: middle; }
.pill.feat { background: linear-gradient(135deg, #f5a524, #ffd27a); color: #2a1a00; }
.pill.pop { background: var(--grad); color: var(--primary-ink); }
.vbadge { display: inline-flex; color: var(--primary); vertical-align: middle; margin-inline-start: 3px; }
.row-end { display: flex; justify-content: flex-end; } .row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }

/* ===== النماذج ===== */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field textarea, .field select { width: 100%; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: none; transition: border .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.field input[type=file] { font-size: 13px; max-width: 100%; }
.field.locked { opacity: .55; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-err { color: var(--danger); min-height: 1em; margin: 0; font-size: 13px; font-weight: 700; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface2); border-radius: 14px; margin: 12px 0; }
.seg > * { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; padding: 8px; border-radius: 10px; color: var(--muted); font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.seg > .on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; margin: 8px 0 12px; color: var(--muted); }
.searchbar input { flex: 1; border: 0; background: transparent; padding: 11px 0; outline: none; color: var(--text); min-width: 0; }
.searchbar:focus-within { border-color: var(--primary); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; flex-wrap: nowrap; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 6px 13px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .2s; }
.chip small { color: var(--muted); font-weight: 600; }
.chip.on, .chip.hot { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.chip.on { background: var(--grad); color: var(--primary-ink); border-color: transparent; }

/* ===== الصور الرمزية والشبكات ===== */
.av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--surface2); flex: none; }
.av.sm { width: 34px; height: 34px; } .av.lg { width: 72px; height: 72px; } .av.xl { width: 96px; height: 96px; border: 3px solid var(--surface); box-shadow: 0 0 0 3px var(--primary); }
.av.sq { border-radius: 12px; } .av.sys { display: grid; place-items: center; background: var(--surface2); }
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -16px; }
@media (min-width: 1024px) { .vgrid { grid-template-columns: repeat(4, 1fr); margin: 0; gap: 6px; } .vcell { border-radius: 10px; } }
.vcell { position: relative; aspect-ratio: 9/16; overflow: hidden; background: var(--surface2); }
.vcell img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.vcell:hover img { transform: scale(1.05); }
.vviews { position: absolute; bottom: 5px; inset-inline-start: 6px; color: #fff; font-size: 12px; font-weight: 700; display: flex; gap: 3px; align-items: center; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.vshop { position: absolute; top: 6px; inset-inline-end: 6px; background: var(--accent); color: #2a1a00; border-radius: 8px; padding: 3px; display: grid; }
.list { display: grid; gap: 4px; }
.urow { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; color: var(--text); }
.urow:hover { background: var(--surface2); }
.urow b, .urow span { display: block; }
.creators { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.creator { flex: none; width: 104px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; font-size: 13px; }
.creator b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.creator .muted { font-size: 11px; }

/* ===== الفيد ===== */
.feed-top { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; color: #fff; background: linear-gradient(rgba(0,0,0,.45), transparent); pointer-events: none; }
.feed-top > * { pointer-events: auto; }
.feed-brand .brand-name { font-size: 17px; }
.feed-tabs { display: flex; gap: 16px; font-weight: 800; font-size: 16px; }
.feed-tabs a { color: rgba(255,255,255,.65); padding: 4px 0; position: relative; transition: color .2s; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.feed-tabs a.on { color: #fff; }
.feed-tabs a.on::after { content: ''; position: absolute; bottom: -2px; left: 25%; right: 25%; height: 3px; border-radius: 3px; background: var(--grad); }
.feed-tools { display: flex; justify-content: flex-end; gap: 4px; }
.feed-tools .icon-btn { color: #fff; width: 34px; height: 34px; }
@media (max-width: 380px) { .feed-brand .brand-name { display: none; } }
.feed { position: absolute; inset: 0 0 var(--nav-h) 0; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.feed::-webkit-scrollbar { display: none; }
.feed-empty { position: absolute; inset: 0 0 var(--nav-h) 0; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 50% 30%, #17234a, #05070f); }
.feed-empty .empty h3 { color: #fff; }
.slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; color: #fff; }
.slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shade { position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.65)); pointer-events: none; }
.tap-layer { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.rail { position: absolute; z-index: 3; inset-inline-end: 8px; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rail-av { position: relative; margin-bottom: 6px; }
.rail-av .av { width: 50px; height: 50px; border: 2px solid #fff; }
.follow-plus { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 8px; border: 0; background: var(--grad); color: var(--primary-ink); display: grid; place-items: center; cursor: pointer; padding: 0; transition: transform .2s var(--ease), background .3s; }
.follow-plus.done { background: #fff; color: var(--primary); }
.rbtn { display: flex; flex-direction: column; align-items: center; gap: 1px; background: none; border: 0; color: #fff; cursor: pointer; font-size: 12px; font-weight: 700; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); padding: 0; transition: transform .15s var(--ease); }
.rbtn:active { transform: scale(.88); }
.rbtn.on[data-a=like] { color: var(--like); }
.rbtn.on.save { color: var(--accent); }
.rbtn span { color: #fff; }
.rbtn.small { width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.35); justify-content: center; }
.rbtn.pop .ic { animation: pop .4s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }
.disc { width: 40px; height: 40px; border-radius: 50%; padding: 8px; background: conic-gradient(#222, #444, #222, #444, #222); animation: spin 5s linear infinite; }
.disc img { width: 100%; height: 100%; border-radius: 50%; }
.slide:not(.active) .disc { animation-play-state: paused; }
.meta { position: absolute; z-index: 2; inset-inline-start: 14px; inset-inline-end: 76px; bottom: 16px; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.uname { color: #fff; font-weight: 800; font-size: 16px; }
.when { color: rgba(255,255,255,.75); font-size: 13px; }
.cap { margin: 4px 0 6px; font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.htag { color: #fff; font-weight: 800; }
.sound { display: flex; align-items: center; gap: 6px; font-size: 13px; max-width: 230px; }
.marquee { overflow: hidden; white-space: nowrap; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee span { display: inline-block; padding-inline-start: 100%; animation: marquee 9s linear infinite; }
[dir=rtl] .marquee span { animation-name: marquee-rtl; }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes marquee-rtl { to { transform: translateX(100%); } }
.shop-card { margin-top: 10px; display: flex; align-items: center; gap: 10px; width: 100%; max-width: 330px; padding: 7px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(12,16,32,.55); backdrop-filter: blur(10px); color: #fff; text-align: start; cursor: pointer; animation: slideIn .5s .6s var(--ease) both; text-shadow: none; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } }
.shop-card .pimg { width: 48px; height: 48px; border-radius: 10px; }
.shop-card b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-store { display: flex; align-items: center; gap: 3px; font-size: 11px; color: rgba(255,255,255,.75); }
.shop-card .price { color: var(--accent); font-weight: 800; font-size: 13px; }
.shop-card em { font-style: normal; color: rgba(255,255,255,.7); font-size: 11px; }
.shop-cta { background: var(--grad); color: var(--primary-ink); font-weight: 800; font-size: 12.5px; padding: 6px 12px; border-radius: 10px; }
.mute-hint { position: absolute; z-index: 4; top: 42%; left: 50%; transform: translate(-50%, -10px); display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.55); color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; opacity: 0; transition: .3s; pointer-events: none; white-space: nowrap; }
.mute-hint.show { opacity: 1; transform: translate(-50%, 0); }
.flash { position: absolute; z-index: 4; top: 50%; left: 50%; transform: translate(-50%, -50%); color: rgba(255,255,255,.9); opacity: 0; pointer-events: none; }
.flash.go { animation: flash .6s var(--ease); }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); } }
.burst { position: absolute; z-index: 5; color: var(--like); pointer-events: none; transform: translate(-50%, -50%) rotate(var(--rot)); animation: burst .9s var(--ease) forwards; filter: drop-shadow(0 6px 16px rgba(255,93,115,.5)); }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot)) scale(.3); } 20% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.15); } 40% { transform: translate(-50%, -50%) rotate(var(--rot)) scale(.95); } 100% { opacity: 0; transform: translate(-50%, -160%) rotate(var(--rot)) scale(1.1); } }
.progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.18); }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); }
[dir=rtl] .progress i { margin-inline-start: 0; }
.feed-arrows { display: none; }
@media (min-width: 900px) and (hover: hover) { .feed-arrows { display: flex; flex-direction: column; gap: 8px; position: absolute; z-index: 6; top: 50%; transform: translateY(-50%); inset-inline-start: 12px; } }

/* ===== اللوحة السفلية ===== */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(3,6,15,.55); opacity: 0; transition: opacity .25s; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 82dvh; display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .3s var(--ease); box-shadow: 0 -10px 40px rgba(0,0,0,.3); outline: none; padding-bottom: env(safe-area-inset-bottom); }
.sheet-wrap.open .sheet { transform: none; } .sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 8px 14px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 16px; }
.sheet-body { overflow-y: auto; padding: 14px; }
.comments-sheet .sheet { height: 70dvh; } .comments-sheet .sheet-body { display: flex; flex-direction: column; padding: 0; flex: 1; }
.cmt-list { list-style: none; margin: 0; padding: 8px 14px; flex: 1; overflow-y: auto; }
.cmt { display: flex; gap: 10px; padding: 8px 0; animation: fadeUp .3s var(--ease); }
.cmt p { margin: 2px 0 0; }
.cmt-form { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.cmt-form input { flex: 1; min-width: 0; background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; padding: 9px 14px; outline: none; }
.cmt-form input:focus { border-color: var(--primary); }
.prod-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.prod-row { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; }
.pimg { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface2); }
.pimg.lg { width: 120px; height: 120px; margin: 0 auto; }
.price { font-weight: 800; color: var(--accent); }
[data-theme=light] .price { color: #b86e00; }

/* ===== الإشعارات ===== */
.notifs { list-style: none; margin: 0; padding: 0; }
.notif { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; }
.notif.unread { background: color-mix(in srgb, var(--primary) 9%, transparent); }
.notif.unread::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; }
.nthumb { width: 44px; height: 58px; border-radius: 8px; object-fit: cover; }

/* ===== الملف الشخصي ===== */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 0 4px; }
.pname { font-size: 20px; font-weight: 800; margin-top: 10px; }
.pstats { display: flex; gap: 26px; margin: 10px 0; }
.pstats div { display: flex; flex-direction: column; } .pstats b { font-size: 18px; } .pstats span { font-size: 12.5px; color: var(--muted); }
.pbio { margin: 4px 0 10px; max-width: 360px; }
.pactions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.store-chip { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); width: 100%; max-width: 360px; text-align: start; }
.store-chip img { width: 40px; height: 40px; border-radius: 10px; }
.store-chip small { display: block; color: var(--primary); font-weight: 700; }

/* ===== الرفع ===== */
.upload-form { display: grid; gap: 14px; }
.drop { position: relative; display: grid; place-items: center; aspect-ratio: 9/14; max-height: 52dvh; border: 2px dashed color-mix(in srgb, var(--primary) 55%, transparent); border-radius: 20px; background: color-mix(in srgb, var(--primary) 6%, var(--surface)); cursor: pointer; overflow: hidden; margin: 0 auto; width: 100%; max-width: 340px; transition: border-color .2s; }
.drop:hover, .drop:focus-within { border-color: var(--accent); }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px; color: var(--primary); }
.drop-empty b { color: var(--text); }
.drop .preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.drop-change { position: absolute; bottom: 10px; z-index: 2; }
.tag-products { display: grid; gap: 8px; }
.tagp { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border .2s, background .2s; }
.tagp input { position: absolute; opacity: 0; }
.tagp img { width: 44px; height: 44px; border-radius: 10px; }
.tagp span { flex: 1; } .tagp b, .tagp small { display: block; } .tagp small { color: var(--accent); font-weight: 700; }
.tagp .tick { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.tagp:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.tagp:has(input:checked) .tick { background: var(--grad); border-color: transparent; color: var(--primary-ink); }
.tagp:has(input:focus-visible) { outline: 3px solid var(--accent); }

/* ===== المتاجر ===== */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 18px; margin: 6px 0 4px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #12c2a0 0%, #0e6f78 45%, #182456 100%); box-shadow: var(--shadow); }
.hero::after { content: ''; position: absolute; inset-inline-end: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(245,165,36,.55), transparent 70%); }
.hero h2 { font-size: 22px; font-weight: 900; }
.hero p { margin: 4px 0 12px; opacity: .9; font-size: 14px; }
.hero-txt { position: relative; z-index: 1; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; position: relative; z-index: 1; }
.slot { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 10px 12px; backdrop-filter: blur(6px); }
.slot b { font-size: 24px; font-weight: 900; display: block; line-height: 1.1; } .slot span { font-size: 12.5px; opacity: .9; } .slot small { font-size: 11px; opacity: .75; }
.meter { height: 6px; border-radius: 6px; background: rgba(127,127,127,.25); overflow: hidden; margin: 6px 0 2px; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 6px; transition: width .6s var(--ease); }
.slot.gold .meter i { background: linear-gradient(90deg, #f5a524, #ffd27a); }
.slots.inline { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; margin: 6px 0 14px; color: var(--muted); }
.slots.inline .ic { color: var(--primary); vertical-align: -3px; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.hscroll .store-card { flex: 0 0 78%; max-width: 300px; scroll-snap-align: start; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.store-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: var(--text); box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.store-card:hover { transform: translateY(-3px); }
.store-card.is-featured { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.sc-banner { position: relative; height: 78px; background-size: cover; background-position: center; }
.sc-banner .pill { position: absolute; top: 8px; inset-inline-start: 8px; }
.sc-body { display: flex; gap: 10px; align-items: center; padding: 0 12px 12px; margin-top: -18px; position: relative; }
.sc-logo { width: 48px; height: 48px; border-radius: 14px; border: 3px solid var(--surface); background: #fff; flex: none; }
.sc-body b { display: block; font-size: 14.5px; margin-top: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-banner { height: 150px; margin: -8px -16px 0; background-size: cover; background-position: center; }
@media (min-width: 1024px) { .sp-banner { height: 220px; border-radius: 0 0 22px 22px; } }
.sp-head { display: flex; align-items: flex-end; gap: 12px; margin-top: -34px; position: relative; flex-wrap: wrap; }
.sp-logo { width: 78px; height: 78px; border-radius: 20px; border: 4px solid var(--bg); background: #fff; box-shadow: var(--shadow); flex: none; }
.sp-head h1 { font-size: 21px; font-weight: 900; }
.sp-desc { margin: 10px 0; color: var(--muted); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.prod-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.prod-card img { aspect-ratio: 1; width: 100%; object-fit: cover; }
.pc-body { padding: 10px; display: grid; gap: 4px; }
.pc-body h3 { font-size: 14px; }
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; transition: transform .2s var(--ease); }
.plan:hover { transform: translateY(-3px); }
.plan.popular { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; }
.plan .pill.pop { position: absolute; top: -11px; inset-inline-start: 16px; }
.plan h2 { font-size: 18px; font-weight: 800; }
.plan-price b { font-size: 28px; font-weight: 900; } .plan-price span { color: var(--muted); margin-inline-start: 4px; }
.plan ul { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 7px; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.plan li.ok .ic { color: var(--primary); flex: none; margin-top: 2px; }
.plan li.no { color: var(--muted); text-decoration: line-through; opacity: .7; } .plan li.no .ic { flex: none; margin-top: 2px; }
.summary .sum-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.summary .total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; font-size: 17px; }
.mini-feats { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.mini-feats .ic { color: var(--primary); vertical-align: -2px; }
.methods { display: grid; gap: 8px; }
.method { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 700; transition: border .2s, background .2s; }
.method input { accent-color: var(--primary); width: 18px; height: 18px; }
.method:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, transparent); }

/* ===== لوحة البائع والمشرف ===== */
.dash-store { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; color: #fff; overflow: hidden; background: var(--bn) center/cover; margin-bottom: 14px; }
.dash-store::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,8,20,.75), rgba(5,8,20,.35)); }
.dash-store > * { position: relative; } .dash-store h1 { font-size: 19px; } .dash-store .muted { color: rgba(255,255,255,.8); }
.dash-store .sp-logo { width: 58px; height: 58px; border-width: 2px; border-color: rgba(255,255,255,.6); }
.dash-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.dash-grid .card { margin: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; }
.status .dot-s { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 25%, transparent); }
.status.ok { color: var(--ok); } .status.bad { color: var(--danger); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; }
.renew-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.big { font-size: 34px; font-weight: 900; line-height: 1.1; } .big small { font-size: 16px; color: var(--muted); }
.stat-card .btn { margin-top: 10px; }
.prod-admin { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.prod-admin li { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.prod-admin img { width: 54px; height: 54px; border-radius: 10px; }
.prod-admin .grow > * { display: block; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 70%, transparent); border-radius: 8px; }
@media (max-width: 640px) {
  .table-wrap.stack { overflow: visible; border: 0; background: transparent; }
  .table-wrap.stack .tbl { min-width: 0; width: 100%; white-space: normal; }
  .table-wrap.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap.stack tbody, .table-wrap.stack tr, .table-wrap.stack td { display: block; }
  .table-wrap.stack tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin: 0 0 10px; padding: 10px 12px; }
  .table-wrap.stack td { border: 0; padding: 6px 0; text-align: start; }
  .table-wrap.stack td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 2px; }
}
.tbl { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
.tbl bdi[dir="ltr"], .tbl bdi { direction: ltr; unicode-bidi: isolate; }
.tbl th, .tbl td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 700; background: var(--surface2); position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); } .kpi b { font-size: 22px; font-weight: 900; } .kpi small { color: var(--muted); margin-inline-start: 4px; }
.kpi:first-child { background: var(--grad); color: var(--primary-ink); border: 0; } .kpi:first-child span { color: rgba(4,34,28,.75); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 18px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; position: relative; }
.bar i { width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; background: var(--grad); animation: grow .7s var(--ease) both; transform-origin: bottom; }
.bar small { font-size: 11px; color: var(--muted); } .bar em { position: absolute; top: 0; font-style: normal; font-size: 11px; font-weight: 700; }
@keyframes grow { from { transform: scaleY(0); } }
.plan-break { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-break li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 10px; background: var(--surface2); border-radius: 12px; }

/* ===== المصادقة ===== */
.auth-hero { display: flex; flex-direction: column; align-items: center; padding: 16px 0 4px; }
.auth-hero .brand-name { font-size: 30px; }
.demo-logins { display: grid; gap: 8px; margin: 18px 0; }

/* ===== Toasts ===== */
#toasts { position: fixed; z-index: 80; top: 14px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 10px 14px; border-radius: 14px; font-weight: 700; font-size: 14px; animation: toastIn .3s var(--ease); transition: opacity .3s, transform .3s; text-align: center; }
.toast.ok { border-color: color-mix(in srgb, var(--primary) 60%, transparent); }
.toast.warn { border-color: var(--accent); }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.page-head h1, .pname { unicode-bidi: plaintext; }
.two > * { min-width: 0; }
.field input[type=file] { width: 100%; padding: 8px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface2); }
.field input[type=file]::file-selector-button { font: inherit; font-weight: 700; border: 0; border-radius: 8px; padding: 5px 10px; margin-inline-end: 8px; background: var(--grad); color: var(--primary-ink); cursor: pointer; }
html, body { overflow-x: clip; }
.plan li.no { text-decoration: none; opacity: .55; }
@media (max-width: 599px) { .sp-head > .btn { order: 3; flex-basis: 100%; } .sp-head h1 { font-size: 19px; } }
.sp-head .grow { padding-bottom: 4px; }
.btn.glass:hover, .icon-btn.glass:hover { background: rgba(255,255,255,.22); }
/* تنبيه النسخة التجريبية */
#demoNotice { position: fixed; z-index: 35; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); padding: 4px 6px 4px 12px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--shadow); white-space: nowrap; }
[dir=rtl] #demoNotice { padding: 4px 12px 4px 6px; }
#demoNotice span { overflow: hidden; text-overflow: ellipsis; }
#demoNotice button { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(127,127,127,.2); color: inherit; cursor: pointer; padding: 0; flex: none; }
#app.immersive #demoNotice { bottom: auto; top: calc(54px + env(safe-area-inset-top)); background: rgba(10,14,28,.55); color: #fff; border-color: rgba(245,165,36,.6); backdrop-filter: blur(8px); }
#app.immersive .mute-hint { top: 42%; }
.status.warn-s { color: var(--accent); }
[data-theme=light] .status.warn-s { color: #b86e00; }
.form-ok { color: var(--ok); font-weight: 700; font-size: 13px; margin: 0; }

/* ===== المرحلة 1: الإعدادات/الخصوصية/الردود (© 2026 وطن النهار) ===== */
.set-sec { margin-block: 12px; display: grid; gap: 10px; }
.set-sec h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0; }
.set-sec h3 { font-size: .95rem; margin: 4px 0; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; color: inherit; text-decoration: none; }
.set-row .grow { display: grid; gap: 2px; }
.set-row input[type=checkbox] { inline-size: 44px; block-size: 24px; accent-color: var(--primary); }
.set-row select { min-inline-size: 150px; padding: 6px 10px; border-radius: 10px; background: transparent; color: inherit; border: 1px solid var(--line); }
.set-row select option { color: #0b1020; }
.set-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.set-user { display: flex; align-items: center; gap: 8px; }
.set-user .urow { flex: 1; min-inline-size: 0; }
.set-btns { display: flex; gap: 6px; }
.set-sec.soon { opacity: .75; }
.menu-list { display: grid; gap: 6px; }
.btn.bad, .linkbtn.bad { color: var(--danger); }
.radio-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.cmt.reply { margin-inline-start: 40px; }
.cmt-acts { display: flex; gap: 14px; margin-top: 2px; }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; opacity: .7; font: inherit; font-size: .8rem; cursor: pointer; }
.linkbtn:hover { opacity: 1; text-decoration: underline; }
.reply-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: .85rem; opacity: .85; }
/* سياسة المتاجر */
.buyer-note { font-size: .82rem; line-height: 1.6; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--line); margin: 8px 0; }
.policy article h2 { font-size: 1rem; margin: 18px 0 6px; }
.policy article li { line-height: 1.8; margin-block: 4px; }
.policy-title { font-size: 1.2rem; margin: 0 0 8px; }
.policy-foot { margin-top: 18px; }

/* ===== المرحلة 2: الاستوديو ومكتبة الأصوات (© 2026 وطن النهار) ===== */
.studio-src { display: grid; gap: 12px; margin: 12px 0 18px; }
.src-card { display: grid; gap: 4px; place-items: center; text-align: center; padding: 22px 16px; border-radius: 18px; border: 1px dashed var(--line); background: var(--surface); color: inherit; cursor: pointer; }
.src-card b { font-size: 1.05rem; }
.src-card small { color: var(--muted); }
.src-card:disabled { opacity: .5; cursor: not-allowed; }
.cam-wrap { position: relative; aspect-ratio: 9/14; max-height: 58dvh; margin: 0 auto; width: 100%; max-width: 360px; border-radius: 18px; overflow: hidden; background: #000; }
.cam-wrap .cam { width: 100%; height: 100%; object-fit: cover; }
.cam-hud { position: absolute; top: 10px; inset-inline: 12px; color: #fff; font-weight: 700; text-shadow: 0 1px 4px #000; }
.studio-bar { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.rec-btn.recording { background: #e5484d; color: #fff; }
.edit-prev { position: relative; aspect-ratio: 9/14; max-height: 48dvh; margin: 0 auto 12px; width: 100%; max-width: 320px; border-radius: 16px; overflow: hidden; background: #000; }
.edit-prev .preview { width: 100%; height: 100%; object-fit: cover; }
.text-layer { position: absolute; inset: 0; pointer-events: none; }
.text-layer .tx { position: absolute; left: 50%; transform: translate(-50%, -50%); font-weight: 800; text-shadow: 0 1px 4px #000; pointer-events: auto; white-space: nowrap; }
.text-layer .tx button { margin-inline-start: 6px; border: 0; background: rgba(0,0,0,.45); color: #fff; border-radius: 99px; width: 22px; height: 22px; cursor: pointer; }
.trim { display: grid; gap: 4px; }
.trim input[type=range] { width: 100%; }
.text-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.text-form input[type=text], .text-form input#tx { flex: 1; min-width: 120px; padding: 6px 8px; }
.tx-list { list-style: none; margin: 0; padding: 0; }
.card.tight { padding: 12px; display: grid; gap: 8px; }
.check-row { display: flex; gap: 8px; align-items: center; }
.pub-prev img { width: 100%; max-width: 220px; margin: 0 auto 8px; display: block; border-radius: 12px; }
.sound-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.sound-row a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.sound-head audio { margin: 8px 0; }
.row-end { display: flex; justify-content: flex-end; margin: 8px 0; }

/* المرحلة 3: الرسائل والمسودات */
.chat-page { display: flex; flex-direction: column; height: calc(100dvh - var(--nav-h) - var(--notice-gap) - env(safe-area-inset-bottom)); }
.msgs { flex: 1; overflow: auto; list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; gap: 8px; align-items: flex-end; width: fit-content; max-width: 80%; }
.msg:not(.mine) { margin-left: auto; margin-right: 0; }
.msg.mine { margin-left: 0; margin-right: auto; }
.msg .bubble { padding: 8px 12px; border-radius: 16px; background: var(--surface); }
.msg.mine .bubble { background: var(--accent); color: #1a1200; }
.msg.deleted { opacity: .65; font-style: italic; }
.msg-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg .linkbtn { color: inherit; text-decoration: underline; opacity: .85; }
.bubble .clip-share { display: flex; gap: 8px; align-items: center; color: inherit; text-decoration: none; }
.bubble .clip-share img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; }
.chat-form { display: flex; gap: 8px; padding: 8px 12px 16px; border-top: 1px solid var(--line, rgba(127,127,127,.2)); }
.chat-form input { flex: 1; }
.share-sheet { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; z-index: 40; }
.share-sheet .sheet { background: var(--bg, #111); width: 100%; max-height: 70vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 16px; }
.radio-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.draft-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.draft-row { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface); }
.draft-row img { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; }
.urow { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.seg .pill { margin-inline-start: 4px; }

/* عزل النصوص اللاتينية (مثل رقم إصدار السياسة) داخل فقرات عربية */
bdi[dir="ltr"] { direction: ltr; unicode-bidi: isolate; }

.policy-meta, .policy-intro, .policy-ver { display: block; margin: 8px 0 0; line-height: 1.7; }
.policy-meta, .policy-ver { color: var(--muted); font-size: 13.5px; }
.policy-code { direction: ltr; unicode-bidi: isolate; display: block; margin: 2px 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--surface2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: normal; word-break: keep-all; text-align: start; }
.policy-intro { margin: 8px 0 12px; }

/* المرحلة 4: ديويتو وستيتش */
.duet-stage { display: grid; direction: ltr; width: 100%; max-height: 64vh; aspect-ratio: 9/16; background: #000; border-radius: 16px; overflow: hidden; }
.duet-stage.lr { grid-template-columns: 1fr 1fr; }
.duet-stage.tb { grid-template-rows: 1fr 1fr; }
.duet-stage.lr.src-left { grid-template-areas: "src me"; grid-template-columns: 1fr 1fr; }
.duet-stage.lr.src-right { grid-template-areas: "me src"; grid-template-columns: 1fr 1fr; }
.duet-stage.tb.src-top { grid-template-areas: "src" "me"; grid-template-rows: 1fr 1fr; }
.duet-stage.tb.src-bottom { grid-template-areas: "me" "src"; grid-template-rows: 1fr 1fr; }
.duet-stage .duet-src { grid-area: src; width: 100%; height: 100%; object-fit: cover; background: #111; }
.duet-stage .cam, .duet-stage .preview { grid-area: me; width: 100%; height: 100%; object-fit: cover; }
.remix-attr { display: block; margin: 4px 0 0; font-size: 13px; font-weight: 700; color: #fff; opacity: .92; text-decoration: none; }
.remix-attr.muted { opacity: .7; font-weight: 600; }
.remix-count { display: block; margin: 2px 0 4px; color: #fff; opacity: .85; }
.remix-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cam-hud { text-align: center; margin-top: 6px; font-weight: 800; }
.studio .chips { flex-wrap: wrap; }

