/* ============================================================
   theme.css — طبقة إضافية تُحمَّل بعد style.css و discover.css
   - رموز ألوان (Color Tokens) للوضعين الليلي والساطع
   - لغة iOS 26: زجاج (Liquid Glass مبسّط)، زوايا متداخلة، شريط عائم
   - شاشة الفحص (Detect)
   لا تغيّر أي منطق؛ الوضع الليلي يبقى الافتراضي البصري الحالي.
   ============================================================ */

/* ---------- 1) الرموز ---------- */
:root {
    color-scheme: dark;
    --glass-bg: rgba(24, 25, 36, .62);
    --glass-bg-strong: rgba(24, 25, 36, .82);
    --glass-border: rgba(255, 255, 255, .14);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .16);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --glass-blur: saturate(180%) blur(22px);
    --on-accent: #fff;
    --surface-tint: rgba(255, 255, 255, .06);
    --ok: #30d158; --warn: #ffd60a; --bad: #ff453a;
    --ease-ios: cubic-bezier(.32, .72, 0, 1);
    --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
    --radius: 22px; --radius-sm: 16px; --radius-lg: 30px;
    --nav-h: 66px;
    --nav-bottom: calc(max(var(--safe-bottom) - 14px, 0px) + 6px);   /* مسافة الشريط من الأسفل: أدنى من قبل مع احترام safe-area */
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f2f2f7;
    --bg2: #ffffff;
    --card: #ffffff;
    --card2: #eeeef3;
    --line: rgba(60, 60, 67, .12);
    --line2: rgba(60, 60, 67, .22);
    --text: #0b0b12;
    --text2: #3c3c43;
    --muted: #6b6b76;
    --pink: #e5214a;
    --pink2: #ff4d73;
    --gold: #b88700;
    --green: #1f9d4a;
    --glass-bg: rgba(255, 255, 255, .66);
    --glass-bg-strong: rgba(255, 255, 255, .86);
    --glass-border: rgba(255, 255, 255, .7);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .9);
    --glass-shadow: 0 10px 30px rgba(20, 20, 40, .14);
    --surface-tint: rgba(0, 0, 0, .04);
    --ok: #1f9d4a; --warn: #b88700; --bad: #d62f26;
}

/* مناطق تبقى داكنة دائماً (فيديو، كاميرا، اقتصاص، خريطة الفيديو) */
:root[data-theme="light"] .page-shorts,
:root[data-theme="light"] .sh-rec,
:root[data-theme="light"] .crop-ov,
:root[data-theme="light"] .dw-vfeed,
:root[data-theme="light"] .ludo-screen {
    color-scheme: dark;
    --bg: #000; --bg2: #0d0d10; --card: #161823; --card2: #1f2130;
    --line: rgba(255, 255, 255, .09); --line2: rgba(255, 255, 255, .16);
    --text: #fff; --text2: #c9cad2; --muted: #8a8b99; --pink: #fe2c55;
    --glass-bg: rgba(24, 25, 36, .62); --glass-border: rgba(255, 255, 255, .14);
    color: #fff;
}

/* ---------- 2) تحويل سلس بين الوضعين ---------- */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
    transition: background-color .28s ease, color .28s ease, border-color .28s ease, fill .28s ease, stroke .28s ease !important;
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: ease; }

/* ---------- 3) تطبيق الرموز على العناصر التي كانت بألوان ثابتة ---------- */
body { background: var(--bg); }
#game-section { background: var(--bg); }
#auth-section { background: radial-gradient(circle at 20% 0%, rgba(37,244,238,.12), transparent 45%), radial-gradient(circle at 90% 100%, rgba(254,44,85,.16), transparent 45%), var(--bg); }
.auth-tab.active, .bnav-btn.active, .dw-tab.on, .dm-row.req b, .dm-row.unread .dm-mid span, .contact-link { color: var(--text); }
input[type="text"], input[type="email"], input[type="password"] { color: var(--text); }
.top-avatar, .me-avatar, .pf-preview { border-color: var(--text); }
:root[data-theme="light"] .me-card { background: linear-gradient(180deg, #ffe9ef, var(--card)); }
.chat-tabs button.active, .dw-sortbar button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.pf-colors button { border-color: var(--bg); }
.pf-colors button.sel { box-shadow: 0 0 0 3px var(--text); }
.online-av i { border-color: var(--bg); }
.mail-badge { border-color: var(--bg); }
.btn-primary:disabled, .btn-game:disabled { background: var(--card2); color: var(--muted); }
.modal-overlay { background: rgba(0, 0, 0, .55); }
:root[data-theme="light"] .modal-overlay { background: rgba(20, 20, 35, .38); }

/* ---------- 4) زجاج iOS 26 ---------- */
.topbar {
    background: var(--glass-bg); border-bottom: 1px solid var(--glass-border);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.notification {
    background: var(--glass-bg-strong); color: var(--text); border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-hi); border-radius: 20px;
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.modal-box { background: var(--glass-bg-strong); border-radius: 30px 30px 0 0; border: 1px solid var(--glass-border); box-shadow: var(--glass-hi);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.card { box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(0, 0, 0, .06); }
:root[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(20,20,40,.05), 0 8px 24px rgba(20,20,40,.06); border-color: transparent; }

/* شريط التنقل العائم — زجاج سائل (Liquid Glass) */
.bottom-nav {
    bottom: var(--nav-bottom); width: calc(100% - 24px); max-width: calc(var(--maxw) - 24px);
    height: 58px; padding: 4px 8px; gap: 2px; justify-content: space-between; border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, .20);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .20) 0%, rgba(255, 255, 255, .05) 42%, rgba(255, 255, 255, .02) 100%),
        rgba(28, 29, 42, .38);
    -webkit-backdrop-filter: blur(26px) saturate(190%) brightness(1.08); backdrop-filter: blur(26px) saturate(190%) brightness(1.08);
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, .50),   /* لمعة الحافة العليا */
        inset 0 -1px 0 rgba(255, 255, 255, .10),    /* انعكاس الحافة السفلى */
        inset 0 0 22px rgba(255, 255, 255, .07),    /* توهج داخلي */
        0 14px 34px rgba(0, 0, 0, .38), 0 2px 6px rgba(0, 0, 0, .20);
    isolation: isolate;
    transition: transform .38s var(--ease-ios), opacity .25s ease; will-change: transform;
}
/* بريق منحنٍ من الأعلى */
.bottom-nav::before {
    content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(120% 90% at 50% -25%, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, 0) 55%); mix-blend-mode: soft-light;
}
/* حدّ متدرّج لامع (mask) */
.bottom-nav::after {
    content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none; padding: 1px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .06) 38%, rgba(255, 255, 255, .06) 62%, rgba(255, 255, 255, .45));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
:root[data-theme="light"] .bottom-nav {
    border-color: rgba(255, 255, 255, .75);
    background: linear-gradient(180deg, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, .35) 50%, rgba(255, 255, 255, .25) 100%), rgba(255, 255, 255, .30);
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .5), inset 0 0 22px rgba(255, 255, 255, .45),
        0 14px 34px rgba(20, 20, 50, .16), 0 2px 6px rgba(20, 20, 50, .08);
}
:root[data-theme="light"] .bottom-nav::after {
    background: linear-gradient(160deg, #fff, rgba(255, 255, 255, .25) 40%, rgba(255, 255, 255, .25) 60%, rgba(255, 255, 255, .9));
}
.bnav-btn { z-index: 1; min-width: 0; min-height: 46px; padding: 0 2px; border-radius: 26px; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.bnav-btn svg { width: 21px; height: 21px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); transition: transform .35s var(--ease-spring); }
.bnav-btn span { font-size: .6em; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.bnav-btn:not(.active) { color: color-mix(in srgb, var(--text) 62%, transparent); }
.bnav-pill {
    position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 26px; pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .09)); border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 14px rgba(0, 0, 0, .18);
    transform: translate3d(0, 0, 0); opacity: 0; will-change: transform, width;
    transition: transform .45s var(--ease-spring), width .45s var(--ease-spring), opacity .2s;
}
.bnav-pill.on { opacity: 1; }
:root[data-theme="light"] .bnav-pill {
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .55)); border-color: rgba(255, 255, 255, .9);
    box-shadow: inset 0 1px 0 #fff, 0 4px 14px rgba(20, 20, 50, .12);
}
/* زر النشر المركزي: مربّع دائري متدرّج مع لمعة زجاجية وتوهج نابض (يغطي تصميم style.css القديم ذي الجانبين) */
.bnav-center { position: relative; z-index: 1; width: 52px; height: 40px; margin: 0 5px; flex-shrink: 0; -webkit-tap-highlight-color: transparent; }
.bnav-center::before, .bnav-center::after { display: none; }
.bnav-center b {
    position: relative; overflow: hidden; width: 100%; height: 100%; margin: 0; border-radius: 18px; color: #fff;
    background: linear-gradient(145deg, #ff4d73 0%, #e5214a 46%, #ff8a3d 100%);
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 8px 20px rgba(229, 33, 74, .45), inset 0 1.5px 0 rgba(255, 255, 255, .6), inset 0 -3px 8px rgba(120, 0, 25, .30);
    transition: transform .35s var(--ease-spring), filter .2s;
    animation: ctrGlow 3.2s ease-in-out infinite;
}
.bnav-center b::after { content: ''; position: absolute; inset: 0 0 48% 0; pointer-events: none; background: linear-gradient(rgba(255, 255, 255, .38), rgba(255, 255, 255, 0)); }
.bnav-center b::before { position: relative; z-index: 1; }
.bnav-center b svg { position: relative; z-index: 1; width: 20px; height: 20px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); transition: transform .35s var(--ease-spring); }
.bnav-center:active b { transform: scale(.9); }
.bnav-center:active b svg { transform: rotate(90deg); }
@media (hover: hover) { .bnav-center:hover b { filter: brightness(1.08); } }
@keyframes ctrGlow {
    0%, 100% { box-shadow: 0 8px 20px rgba(229, 33, 74, .42), inset 0 1.5px 0 rgba(255, 255, 255, .6), inset 0 -3px 8px rgba(120, 0, 25, .30); }
    50% { box-shadow: 0 10px 28px rgba(255, 90, 80, .62), inset 0 1.5px 0 rgba(255, 255, 255, .6), inset 0 -3px 8px rgba(120, 0, 25, .30); }
}

/* الكيبورد مفتوح (الصنف يضيفه theme.js): الشريط ينزلق للأسفل ويختفي بدل أن يرتفع مع الكيبورد */
html.kb-open .bottom-nav { transform: translate(-50%, calc(100% + 40px)); opacity: 0; pointer-events: none; }
html.kb-open { --nav-h: 0px; --safe-bottom: 0px; }   /* نستعيد المساحة التي كان يحجزها الشريط */

/* انتقال الصفحات (transform + opacity فقط = يعمل على GPU) */
.page { animation: pageIn .42s var(--ease-ios) both; }
@keyframes pageIn { from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.985); } to { opacity: 1; transform: none; } }
button, .row-btn, .bnav-btn { touch-action: manipulation; }
.btn-primary, .btn-secondary, .row-btn, .icon-btn { transition: transform .25s var(--ease-spring), filter .15s, background-color .2s; }

/* ---------- 5) مفتاح المظهر (Segmented) ---------- */
.seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); isolation: isolate; }
.seg button { position: relative; z-index: 1; min-height: 40px; border: 0; background: none; border-radius: 13px; font-weight: 800; font-size: .86em; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; transition: color .2s; }
.seg button svg { width: 18px; height: 18px; }
.seg button[aria-checked="true"] { color: var(--text); }
.seg-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; inset-inline-start: 3px; width: calc((100% - 6px) / 3); border-radius: 13px; background: var(--card); box-shadow: 0 2px 8px rgba(0, 0, 0, .18), var(--glass-hi); transition: transform .45s var(--ease-spring); }
html[dir="rtl"] .seg-thumb { transform: translate3d(calc(var(--i, 0) * -100%), 0, 0); }
html:not([dir="rtl"]) .seg-thumb { transform: translate3d(calc(var(--i, 0) * 100%), 0, 0); }

/* ---------- 7) إمكانية الوصول والأداء ---------- */
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .topbar, .bottom-nav, .notification, .modal-box { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card); }
    .bottom-nav::before { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .topbar, .bottom-nav, .notification, .modal-box { background: var(--card); }
}

/* ============================================================
   8) الشعار MARSA (وسط الشريط العلوي) — تدرّج أحمر ← أسود
   ============================================================ */
.topbar .brand { position: absolute; left: 50%; top: calc(var(--safe-top) + var(--top-h) / 2); transform: translate(-50%, -50%); direction: ltr; line-height: 1; pointer-events: none; -webkit-user-select: none; user-select: none; }
.brand-t {
    display: block; font-family: 'Cairo', system-ui, sans-serif; font-weight: 900; font-size: 1.34rem; letter-spacing: .2em; padding-inline-start: .2em;
    background: linear-gradient(100deg, #ff1f4b 0%, #e5214a 28%, #a30f2c 58%, #3a0710 80%, #000 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
    -webkit-text-stroke: .6px rgba(255, 255, 255, .32); paint-order: stroke fill;      /* حدّ خفيف يُبقي الحروف السوداء مقروءة في الوضع الليلي */
    filter: drop-shadow(0 2px 10px rgba(229, 33, 74, .35));
}
:root[data-theme="light"] .brand-t { -webkit-text-stroke: 0; filter: drop-shadow(0 2px 6px rgba(229, 33, 74, .22)); }

/* ============================================================
   9) هياكل التحميل (Skeleton) — تلميع واحد خفيف يعمل على transform فقط
   ============================================================ */
.sk { position: relative; display: block; overflow: hidden; background: var(--card2); border-radius: 10px; }
.sk::after { content: ''; position: absolute; inset: 0; transform: translate3d(-100%, 0, 0); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .10), transparent); animation: skSweep 1.25s ease-in-out infinite; }
:root[data-theme="light"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); }
@keyframes skSweep { to { transform: translate3d(100%, 0, 0); } }
.sk-circle { border-radius: 50%; flex-shrink: 0; }
.sk-line { height: 11px; border-radius: 6px; margin: 5px 0; }
.sk-bubble { height: 38px; border-radius: 16px; }
.sk-thumb { aspect-ratio: 9 / 16; border-radius: 6px; }
.sk-media { aspect-ratio: 4 / 3; border-radius: 0; }
.sk-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.sk-row { pointer-events: none; }
.chat-sk { pointer-events: none; }
.chat-sk .sk-bubble { max-width: 78%; }
.sk-post { overflow: hidden; pointer-events: none; }
.sk-post-h { display: flex; align-items: center; gap: 11px; padding: 14px; }
/* هيكل الفيديو القصير بنفس ارتفاع .sh-item (داكن دائماً كالصفحة نفسها) */
.sh-sk { position: relative; height: calc(100dvh - var(--top-h) - var(--safe-top) - var(--nav-h) - var(--safe-bottom)); scroll-snap-align: start; background: #0a0a0e; overflow: hidden; pointer-events: none; }
.sh-sk-side { position: absolute; inset-inline-end: 12px; bottom: 22px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.sh-sk-info { position: absolute; inset-inline: 14px 84px; bottom: 22px; }
.sh-sk-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sh-sk .sk { background: #1b1d29; }

/* ============================================================
   10) نافذة الإعدادات
   ============================================================ */
.st-body { overflow-y: auto; padding: 4px 16px 20px; display: flex; flex-direction: column; gap: 20px; }
.st-sec > h4 { font-size: .78em; font-weight: 800; color: var(--muted); margin: 0 6px 8px; }
.st-user { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; margin-bottom: 10px; background: var(--card2); border-radius: var(--radius-sm); font-size: .9em; }
.st-user span { color: var(--muted); font-weight: 700; }
.st-user b { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-logout { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px; border-radius: 18px; font-weight: 900; font-size: .95em;
    color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 32%, transparent);
    transition: transform .25s var(--ease-spring), background-color .2s; }
.st-logout svg { width: 20px; height: 20px; }
.st-logout:active { transform: scale(.97); }
.row-btn#settings-open > span { color: var(--text); }

/* ============================================================
   11) أداء: تجاوز رسم ما خارج الشاشة + تقليل تكلفة التمرير
   ============================================================ */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
.chat-messages, .sh-feed, .dw-row, .dw-vfeed { -webkit-overflow-scrolling: touch; }
@media (pointer: coarse) {
    .topbar { -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); }   /* blur أخف على الهواتف */
}

/* ============================================================
   12) شاشة البداية (تظهر حتى نعرف هل توجد جلسة محفوظة)
   ============================================================ */
#boot { position: fixed; inset: 0; z-index: 30000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: #000; transition: opacity .35s ease; animation: bootOut 0s 8s forwards; }
#boot.done { opacity: 0; pointer-events: none; }
#boot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; background: #000; user-select: none; -webkit-user-drag: none; }
#boot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg, #000); }
#boot.has-video .brand-t, #boot.has-video .boot-bar { display: none; }
.boot-bar { position: relative; width: 92px; height: 3px; border-radius: 3px; overflow: hidden; background: var(--line2, rgba(255, 255, 255, .2)); }
.boot-bar::after { content: ''; position: absolute; inset: 0; width: 40%; border-radius: 3px; background: linear-gradient(90deg, #e5214a, #ff8a3d); animation: bootBar 1s ease-in-out infinite; }
@keyframes bootBar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes bootOut { to { opacity: 0; visibility: hidden; pointer-events: none; } }   /* شبكة أمان: تختفي بعد 8 ثوانٍ مهما حصل */

/* ============================================================
   13) الفلاتر والنصوص على الصور والفيديو
   ============================================================ */
.sh-fx, .sh-fxlayer { position: absolute; inset: 0; pointer-events: none; container-type: inline-size; overflow: hidden; }
.fx-t { position: absolute; transform: translate(-50%, -50%); max-width: 92%; text-align: center; font-weight: 900; line-height: 1.25; word-break: break-word; font-size: 7cqw; text-shadow: 0 1px 8px rgba(0, 0, 0, .55); touch-action: none; -webkit-user-select: none; user-select: none; }
.sh-fxlayer .fx-t { pointer-events: auto; cursor: grab; padding: 2px 6px; border-radius: 8px; }
.sh-fxlayer .fx-t.sel { outline: 1.5px dashed rgba(255, 255, 255, .85); outline-offset: 2px; }
.sh-edtabs button { padding: 0 6px; font-size: .74em; gap: 4px; }
.sh-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.sh-scroll::-webkit-scrollbar { display: none; }
.sh-scroll button { flex: 0 0 auto; min-width: 68px; padding: 0 12px; direction: rtl; }
.sh-txrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.sh-txrow .sh-chips { flex: 1; }
#sh-tx-in { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff; padding: 0 12px; font-family: inherit; }
.sh-txbtn { min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; background: #fe2c55; color: #fff; font-weight: 800; font-family: inherit; }
.sh-txbtn.danger { background: rgba(255, 255, 255, .14); }
.sh-txbtn:disabled { opacity: .4; }
.sh-sw { display: flex; gap: 10px; margin: 2px 0 10px; }
.sh-sw button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); padding: 0; transition: transform .2s var(--ease-spring); }
.sh-sw button.on { border-color: #fff; box-shadow: 0 0 0 2px #fe2c55; transform: scale(1.12); }
.sh-tip { font-size: .72em; color: #8a8b99; text-align: center; margin-top: 2px; }

/* ============================================================
   14) السحب للتحديث
   ============================================================ */
.ptr { position: fixed; left: 50%; top: calc(var(--safe-top) + var(--top-h) + 4px); z-index: 450; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--text); background: var(--glass-bg-strong); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow), var(--glass-hi);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    opacity: 0; transform: translate3d(0, -60px, 0) scale(.6); pointer-events: none; will-change: transform, opacity; }
.ptr.anim { transition: transform .3s var(--ease-ios), opacity .25s ease; }
.ptr svg { width: 20px; height: 20px; }
.ptr.spin svg { animation: ptrSpin .8s linear infinite; }
@keyframes ptrSpin { to { transform: rotate(360deg); } }

/* ============================================================
   15) تمرير أكثر ثباتاً + استجابة أفضل للمس
   ============================================================ */
/* وضع overflow على html وbody معاً يجعل التمرير يتعطل أحياناً في WebView: نبقيه على html فقط */
html { height: auto; min-height: 100%; overflow-x: hidden; }
body { overflow-x: visible; }
.dw-row, .dw-cats, .dw-gallery { touch-action: manipulation; overscroll-behavior-x: contain; }
.dw-card, .dw-cat, .dw-pick, .row-btn, .bnav-btn, .game-tile { touch-action: manipulation; }
.dw-row { scroll-snap-type: x proximity; }