/* =============================================================================
   Tatwar UI — نظام التصميم الموحّد
   يُحمّل بعد كل ملفات الأنماط الأخرى ويحكم: الألوان، المقاسات، المسافات،
   الأزرار، البطاقات، الجداول، التبويبات، الحقول.
   قواعد ثابتة:
   - خلفية بيضاء داخل اللعب.
   - الذهبي للإجراء الرئيسي فقط.
   - أربعة موارد في صف واحد على الجوال.
   - لا تدرّجات على الأزرار، لا ظلال تحتها، لا زوايا 999.
   ========================================================================== */

:root {
    /* سطح فاتح */
    --ui-bg: #ffffff;
    --ui-surface: #ffffff;
    --ui-surface-2: #faf8f4;
    --ui-surface-3: #f3efe7;
    --ui-line: #e6ded1;
    --ui-line-2: #d5c9b6;

    /* حبر */
    --ui-ink: #241c16;
    --ui-ink-2: #6a5b4d;
    --ui-ink-3: #97887a;

    /* سطح داكن (الهيدر والفوتر والأشرطة) */
    --ui-chrome: #1a1310;
    --ui-chrome-2: #221a15;
    --ui-chrome-3: #2c2219;
    --ui-chrome-line: rgba(255, 255, 255, .09);
    --ui-chrome-line-2: rgba(255, 255, 255, .16);
    --ui-chrome-ink: #efe6d8;
    --ui-chrome-ink-2: #a8998a;

    /* لهجة واحدة */
    --ui-accent: #a4530e;
    --ui-accent-hover: #8c4409;
    --ui-accent-ink: #ffffff;
    --ui-accent-soft: #fdf3e7;
    --ui-accent-line: #e8c79b;

    /* ذهبي — للإجراء الرئيسي فقط */
    --ui-gold: #e0a63c;
    --ui-gold-hover: #cf9528;
    --ui-gold-ink: #201408;

    /* دلالات */
    --ui-ok: #17693c;
    --ui-ok-soft: #eaf6ee;
    --ui-ok-line: #c6e3d0;
    --ui-warn: #9a5b06;
    --ui-warn-soft: #fdf4e3;
    --ui-warn-line: #ecd6ac;
    --ui-danger: #a52318;
    --ui-danger-soft: #fdeeec;
    --ui-danger-line: #eec3bd;
    --ui-info: #1f4f9c;
    --ui-info-soft: #eef3fb;
    --ui-info-line: #c9d8ef;

    /* لوح فاتح خلف الصور ذات الخلفية البيضاء — يبقى فاتحاً في الوضعين */
    --ui-plate: #ffffff;
    --ui-plate-line: #e6ded1;

    /* حواف */
    --ui-r-xs: 4px;
    --ui-r-sm: 6px;
    --ui-r-md: 8px;
    --ui-r-lg: 10px;
    --ui-r-xl: 12px;

    /* ارتفاعات ثابتة للتحكم */
    --ui-h-xs: 26px;
    --ui-h-sm: 30px;
    --ui-h-md: 36px;
    --ui-h-lg: 42px;

    /* مسافات */
    --ui-1: 4px;
    --ui-2: 8px;
    --ui-3: 12px;
    --ui-4: 16px;
    --ui-5: 20px;
    --ui-6: 24px;

    /* قياس الخط */
    --ui-fs-xs: 11px;
    --ui-fs-sm: 12px;
    --ui-fs-md: 13px;
    --ui-fs-lg: 15px;
    --ui-fs-xl: 18px;
    --ui-fs-2xl: 22px;

    --ui-font: "Cairo", "Segoe UI", Tahoma, sans-serif;
    --ui-shadow-pop: 0 8px 24px rgba(26, 19, 16, .18);

    /* ارتفاعات الهيكل */
    --ui-hdr-1: 44px;
    --ui-hdr-2: 25px;
}

/* -----------------------------------------------------------------------------
   1. تطبيع الطباعة — الخط يحمل 400/700 فقط، فأي 500/600/800 يُنتج ثِقلاً صناعياً
   -------------------------------------------------------------------------- */
body.vip-enhanced-body,
body.tatwar-kingdom-hud {
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md);
    color: var(--ui-ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.vip-enhanced-body [style*="font-weight"],
body.vip-enhanced-body b,
body.vip-enhanced-body strong,
body.vip-enhanced-body th,
body.vip-enhanced-body h1,
body.vip-enhanced-body h2,
body.vip-enhanced-body h3,
body.vip-enhanced-body h4 {
    font-weight: 700;
}

/* أي عنصر طُلب له 500/600/800/900 يُثبّت على 700 أو 400 */
body.vip-enhanced-body :is(a, span, div, td, li, p, button, label, em, small)[class] {
    font-synthesis-weight: none;
}

/* أرقام بعرض ثابت — يمنع رقص الأرقام في المؤقتات والموارد */
.timer,
.premium-event-timer,
.enhanced-resources-number,
.premium-resource-pill .value,
#footer-time,
.tw-num,
td.val,
.premium-progress-time {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* -----------------------------------------------------------------------------
   2. الهيدر — صف هوية مضغوط + شريط حالة هادئ بسطر واحد
   -------------------------------------------------------------------------- */
header#premiumHeader {
    background: var(--ui-chrome) !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ui-chrome-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: var(--ui-font) !important;
}

header#premiumHeader .premium-top-bar {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

/* ---- صف 1: الهوية ---- */
header#premiumHeader .premium-header-row-main {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: var(--ui-3) !important;
    min-height: var(--ui-hdr-1) !important;
    height: var(--ui-hdr-1) !important;
    padding: 0 var(--ui-3) !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

header#premiumHeader .premium-brand,
header#premiumHeader .premium-player-hub {
    display: flex !important;
    align-items: center !important;
    gap: var(--ui-2) !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0;
}

header#premiumHeader .premium-logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: var(--ui-2) !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
header#premiumHeader .premium-logo-mark {
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    border: 1px solid var(--ui-chrome-line-2) !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    box-shadow: none !important;
    flex: 0 0 40px !important;
}
header#premiumHeader .premium-logo-mark img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 50% !important;
    transform: none !important;
}
header#premiumHeader .premium-logo-text strong {
    color: var(--ui-chrome-ink) !important;
    font-size: var(--ui-fs-lg) !important;
    font-weight: 700 !important;
    letter-spacing: .1px;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    text-shadow: none !important;
}

/* الحماية — نص هادئ لا كبسولة */
header#premiumHeader .premium-protection-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: var(--ui-h-sm) !important;
    padding: 0 var(--ui-2) !important;
    margin: 0 !important;
    background: var(--ui-chrome-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-chrome-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink-2) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 400 !important;
    white-space: nowrap;
}
header#premiumHeader .premium-protection-badge .timer {
    color: var(--ui-chrome-ink) !important;
    font-weight: 700 !important;
}
header#premiumHeader .premium-protection-badge.no-protection {
    border-color: rgba(214, 96, 84, .38) !important;
}
header#premiumHeader .premium-protection-badge.no-protection .timer {
    color: #e58a7d !important;
}
header#premiumHeader .premium-protection-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    height: 22px !important;
    padding: 0 7px !important;
    margin: 0 2px 0 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 1px solid var(--ui-chrome-line-2) !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink-2) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
header#premiumHeader .premium-protection-btn:hover {
    background: rgba(255, 255, 255, .07) !important;
    color: var(--ui-chrome-ink) !important;
}

/* قوائم السيرفر واللغة — أشباح على الداكن */
header#premiumHeader .premium-meta-selectors {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
header#premiumHeader .premium-dd {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
header#premiumHeader .premium-dd-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: var(--ui-h-sm) !important;
    padding: 0 var(--ui-2) !important;
    margin: 0 !important;
    background: var(--ui-chrome-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-chrome-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    cursor: pointer;
    white-space: nowrap;
}
header#premiumHeader .premium-dd-toggle:hover {
    border-color: var(--ui-chrome-line-2) !important;
    background: var(--ui-chrome-3) !important;
}
header#premiumHeader .premium-dd-toggle .fa-chevron-down {
    font-size: 9px !important;
    opacity: .55;
}
header#premiumHeader .premium-dd-list {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-lg) !important;
    box-shadow: var(--ui-shadow-pop) !important;
    padding: var(--ui-1) !important;
    min-width: 168px;
    overflow: hidden;
}
header#premiumHeader .premium-dd-item {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: var(--ui-h-sm) !important;
    padding: 0 var(--ui-2) !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 400 !important;
    text-align: start !important;
    text-decoration: none !important;
    cursor: pointer;
}
header#premiumHeader .premium-dd-item:hover {
    background: var(--ui-surface-3) !important;
}
header#premiumHeader .premium-dd-item.is-on {
    background: var(--ui-accent-soft) !important;
    color: var(--ui-accent) !important;
    font-weight: 700 !important;
}

/* الذهب والفضة — قراءة رقمية هادئة */
header#premiumHeader .premium-resources-group {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
header#premiumHeader .premium-resource-pill,
header#premiumHeader a.premium-resource-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: var(--ui-h-sm) !important;
    min-width: 0 !important;
    padding: 0 var(--ui-2) !important;
    margin: 0 !important;
    background: var(--ui-chrome-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-chrome-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap;
}
header#premiumHeader .premium-resource-pill:hover {
    border-color: var(--ui-chrome-line-2) !important;
    background: var(--ui-chrome-3) !important;
}
header#premiumHeader .premium-resource-pill .icon-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 12px !important;
}
header#premiumHeader .premium-resource-pill.gold .icon-wrapper { color: var(--ui-gold) !important; }
header#premiumHeader .premium-resource-pill.silver .icon-wrapper { color: #b9c2cc !important; }
header#premiumHeader .premium-resource-pill .value {
    color: var(--ui-chrome-ink) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
}
header#premiumHeader .premium-resource-pill.clan-chat,
header#premiumHeader a.premium-resource-pill.clan-chat {
    background: var(--ui-chrome-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-chrome-line) !important;
    color: var(--ui-chrome-ink) !important;
}
header#premiumHeader .premium-resource-pill.clan-chat .icon-wrapper { color: var(--ui-gold) !important; }

/* أزرار أيقونية على اليمين */
header#premiumHeader .premium-mobile-toggle,
header#premiumHeader .premium-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    height: var(--ui-h-sm) !important;
    min-width: var(--ui-h-sm) !important;
    padding: 0 var(--ui-2) !important;
    margin: 0 !important;
    background: var(--ui-chrome-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-chrome-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer;
}
header#premiumHeader .premium-mobile-toggle:hover,
header#premiumHeader .premium-btn:hover {
    background: var(--ui-chrome-3) !important;
    border-color: var(--ui-chrome-line-2) !important;
}
header#premiumHeader .premium-btn.logout:hover {
    border-color: rgba(214, 96, 84, .45) !important;
    color: #e58a7d !important;
}
header#premiumHeader .premium-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ---- صف 2: شريط الحالة — سطر واحد، نص هادئ، فواصل رفيعة ---- */
header#premiumHeader .premium-header-row-status {
    min-height: var(--ui-hdr-2) !important;
    height: auto !important;
    padding: 0 var(--ui-3) !important;
    margin: 0 !important;
    background: var(--ui-chrome-2) !important;
    background-image: none !important;
    border: 0 !important;
    border-top: 1px solid var(--ui-chrome-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
header#premiumHeader .premium-status-panel {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-height: var(--ui-hdr-2) !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
header#premiumHeader .premium-status-panel::-webkit-scrollbar { display: none; }

header#premiumHeader .premium-status-primary,
header#premiumHeader .premium-status-events,
header#premiumHeader .premium-move-alerts {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

header#premiumHeader .premium-header-row-status .premium-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: var(--ui-hdr-2) !important;
    padding: 0 10px !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-inline-end: 1px solid var(--ui-chrome-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink-2) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 400 !important;
    white-space: nowrap;
}
header#premiumHeader .premium-header-row-status .premium-badge > i {
    font-size: 10px !important;
    opacity: .6;
    color: inherit !important;
}
header#premiumHeader .premium-header-row-status .premium-badge .timer {
    color: var(--ui-chrome-ink) !important;
    font-weight: 700 !important;
}
header#premiumHeader .premium-header-row-status .premium-round-badge .timer,
header#premiumHeader .premium-header-row-status .premium-round-badge span:first-of-type {
    color: var(--ui-gold) !important;
}
header#premiumHeader .premium-status-events .premium-badge:last-child {
    border-inline-end: 0 !important;
}

/* تنبيهات الحركة — النقطة الحمراء الوحيدة المسموح بها */
header#premiumHeader .premium-move-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: 20px !important;
    padding: 0 8px !important;
    margin: 0 6px !important;
    background: transparent !important;
    background-image: none !important;
    border: 1px solid currentColor !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap;
    animation: none !important;
}
header#premiumHeader .premium-move-pill.attack { color: #ef8577 !important; }
header#premiumHeader .premium-move-pill.reinforce { color: #7fb7e8 !important; }
header#premiumHeader .premium-move-pill.notify-enable { color: var(--ui-gold) !important; }
header#premiumHeader .premium-move-pill i { font-size: 10px !important; }

/* ---- شريط الأخبار — رفيع وصامت ---- */
header#premiumHeader .premium-news-ticker {
    display: flex !important;
    align-items: center !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 var(--ui-3) !important;
    margin: 0 !important;
    background: var(--ui-chrome) !important;
    background-image: none !important;
    border: 0 !important;
    border-top: 1px solid var(--ui-chrome-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
}
header#premiumHeader .premium-news-ticker-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex: 0 0 auto;
    padding: 0 !important;
    margin-inline-end: 10px !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-inline-end: 1px solid var(--ui-chrome-line) !important;
    border-radius: 0 !important;
    padding-inline-end: 10px !important;
    color: var(--ui-chrome-ink-2) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
    white-space: nowrap;
}
header#premiumHeader .premium-news-ticker-content span {
    color: var(--ui-chrome-ink-2) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 400 !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin-inline-end: 26px !important;
}

/* ---- التنقل الثانوي — تبويبات نصية هادئة بخط سفلي ---- */
header#premiumHeader .premium-desktop-nav {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
    height: 30px !important;
    padding: 0 var(--ui-3) !important;
    margin: 0 !important;
    background: var(--ui-chrome-2) !important;
    background-image: none !important;
    border: 0 !important;
    border-top: 1px solid var(--ui-chrome-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
header#premiumHeader .premium-desktop-nav::-webkit-scrollbar { display: none; }
header#premiumHeader .premium-nav-btn {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 0 0 auto;
    height: 34px !important;
    min-height: 0 !important;
    padding: 0 11px !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink-2) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    white-space: nowrap;
}
header#premiumHeader .premium-nav-btn i { font-size: 11px !important; opacity: .7; }
header#premiumHeader .premium-nav-btn:hover {
    background: rgba(255, 255, 255, .05) !important;
    color: var(--ui-chrome-ink) !important;
}
header#premiumHeader .premium-nav-btn.active {
    color: var(--ui-chrome-ink) !important;
    font-weight: 700 !important;
    box-shadow: inset 0 -2px 0 var(--ui-gold) !important;
}
header#premiumHeader .premium-nav-btn.active i { opacity: 1; color: var(--ui-gold) !important; }
header#premiumHeader .premium-nav-btn .badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px !important;
    background: var(--ui-danger) !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}

/* الدرج الجانبي */
.premium-more-drawer {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 0 !important;
    border-inline-start: 1px solid var(--ui-line) !important;
    border-radius: 0 !important;
    box-shadow: var(--ui-shadow-pop) !important;
    font-family: var(--ui-font) !important;
}
.premium-more-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: var(--ui-hdr-1) !important;
    padding: 0 var(--ui-3) !important;
    background: var(--ui-chrome) !important;
    background-image: none !important;
    border: 0 !important;
    color: var(--ui-chrome-ink) !important;
}
.premium-more-head strong { font-size: var(--ui-fs-lg) !important; font-weight: 700 !important; color: inherit !important; }
.premium-more-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: var(--ui-h-sm) !important;
    height: var(--ui-h-sm) !important;
    padding: 0 !important;
    background: transparent !important;
    border: 1px solid var(--ui-chrome-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink) !important;
    cursor: pointer;
}
.premium-more-body { padding: var(--ui-3) !important; background: var(--ui-surface) !important; }
.premium-more-label {
    margin: var(--ui-3) 0 var(--ui-1) !important;
    color: var(--ui-ink-3) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
    letter-spacing: .4px;
    text-transform: none;
}
.premium-more-label:first-child { margin-top: 0 !important; }
.premium-more-row { display: flex !important; flex-wrap: wrap !important; gap: 6px !important; margin: 0 0 var(--ui-2) !important; }
.premium-more-link {
    display: flex !important;
    align-items: center !important;
    gap: var(--ui-2) !important;
    min-height: var(--ui-h-md) !important;
    padding: 0 var(--ui-2) !important;
    margin: 0 0 4px !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    cursor: pointer;
}
.premium-more-link i { width: 16px; text-align: center; color: var(--ui-ink-3) !important; font-size: 12px !important; }
.premium-more-link:hover { background: var(--ui-surface-3) !important; }
.premium-more-link.is-on { border-color: var(--ui-accent-line) !important; background: var(--ui-accent-soft) !important; color: var(--ui-accent) !important; font-weight: 700 !important; }
.premium-more-link.is-on i { color: var(--ui-accent) !important; }
.premium-more-link.is-danger { color: var(--ui-danger) !important; }
.premium-more-link.is-danger i { color: var(--ui-danger) !important; }

/* -----------------------------------------------------------------------------
   3. شريط التنقل الرئيسي (دوائر ترافيان) — مضغوط، لا يُلمس محتوى الصور
   -------------------------------------------------------------------------- */
#header {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ui-line) !important;
    box-shadow: none !important;
}
#header #mtop {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    height: 67px !important;
    min-height: 67px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    position: relative;
    top: 0 !important;
    inset-inline: auto !important;
    width: 350px !important;
    max-width: 350px !important;
}
#header #mtop > a.header-icon,
#header #mtop > div#n5,
#header #mtop > div.message-report-container {
    position: relative !important;
    top: auto !important;
    inset-inline: auto !important;
    float: none !important;
    margin: 0 !important;
    flex: 0 0 70px !important;
}

/*
   البلاطة الأصلية 70×67. الصندوق والصورة لازم نفس المقاس
   وإلا يظهر فراغ أبيض بين الشريط الرمادي.
*/
html body #header #mtop { --nav-s: 1; }
html body #header #mtop > a.header-icon,
html body #header #mtop > a.header-icon img {
    display: block !important;
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    height: 67px !important;
    min-height: 67px !important;
    max-height: 67px !important;
    flex: 0 0 70px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-repeat: no-repeat !important;
    background-size: 70px 200px !important;
    background-position: 0 -21px !important;
    object-fit: none !important;
    filter: none !important;
    box-shadow: none !important;
    clip-path: none !important;
    overflow: hidden !important;
}
html body #header #mtop > a.header-icon:hover img {
    background-position: 0 -121px !important;
    transform: none !important;
}
html body #header #mtop > div#n5,
html body #header #mtop > div.message-report-container {
    display: block !important;
    position: relative !important;
    flex: 0 0 70px !important;
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    height: 67px !important;
    min-height: 67px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-repeat: no-repeat !important;
    background-size: 70px 100px !important;
    background-position: 0 -21px !important;
    box-shadow: none !important;
    clip-path: none !important;
    overflow: visible !important;
}
html body #header #mtop > div#n5 > a {
    height: 100% !important;
    transform: none !important;
}
html body #header #mtop > div#n5 > a img { display: none !important; }

/* -----------------------------------------------------------------------------
   4. شريط الموارد — أربعة في صف واحد، مقياس تعبئة نظيف
   -------------------------------------------------------------------------- */
#enhancedResourcesBar.enhanced-resources-container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 0 var(--ui-2) !important;
    padding: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
#enhancedResourcesBar .enhanced-resources-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 0 !important;
    direction: inherit !important;
}
#enhancedResourcesBar .resource-item { min-width: 0 !important; }
[dir="rtl"] #enhancedResourcesBar .enhanced-resources-number { --fill-dir: to left; }
[dir="ltr"] #enhancedResourcesBar .enhanced-resources-number { --fill-dir: to right; }

#enhancedResourcesBar .enhanced-resources-number {
    --fill: 0%;
    --tank: #cbb48a;
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 6px !important;
    margin: 0 !important;
    background: var(--ui-surface-3) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: inset 0 0 0 1px rgba(36, 28, 22, .04) !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
    line-height: 1;
    overflow: visible;
    white-space: nowrap;
}
#enhancedResourcesBar .r1-wrapper .enhanced-resources-number { --tank: #e6c98a; }
#enhancedResourcesBar .r2-wrapper .enhanced-resources-number { --tank: #d4a07a; }
#enhancedResourcesBar .r3-wrapper .enhanced-resources-number { --tank: #c5c8cc; }
#enhancedResourcesBar .r4-wrapper .enhanced-resources-number { --tank: #b5d39a; }
#enhancedResourcesBar .resource-item .enhanced-resources-number {
    background: linear-gradient(var(--fill-dir, to left), var(--tank) var(--fill), var(--ui-surface-3) var(--fill)) !important;
}
#enhancedResourcesBar .enhanced-resources-number > img,
#enhancedResourcesBar .enhanced-resources-number > img.storage-icon {
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 16px !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
    overflow: visible !important;
    object-fit: none !important;
    background-repeat: no-repeat !important;
    background-size: auto !important;
}
#enhancedResourcesBar .enhanced-storage-number > img.warehouse {
    flex-basis: 18px !important;
    width: 18px !important;
    height: 21px !important;
}
#enhancedResourcesBar .enhanced-storage-number > img.granary {
    flex-basis: 20px !important;
    width: 20px !important;
    height: 24px !important;
}
#enhancedResourcesBar .resource-item .enhanced-resources-number::before,
#enhancedResourcesBar .resource-item .enhanced-resources-number::after,
#enhancedResourcesBar .enhanced-resources-number::before,
#enhancedResourcesBar .enhanced-resources-number::after {
    content: none !important;
    display: none !important;
}
#enhancedResourcesBar .enhanced-resources-number.is-full {
    --tank: #e8c07a;
    border-color: var(--ui-warn-line) !important;
    color: var(--ui-warn) !important;
}
#enhancedResourcesBar .enhanced-storage-number {
    background: var(--ui-surface-2) !important;
    box-shadow: none !important;
}

/* السعات — سطر ثانوي صغير */
#enhancedResourcesBar .capacity-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    margin-top: 4px !important;
}
#enhancedResourcesBar .enhanced-storage-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 100% !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 6px !important;
    background: var(--ui-surface-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    color: var(--ui-ink-2) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    line-height: 1;
    white-space: nowrap;
    overflow: visible;
}
#enhancedResourcesBar .enhanced-storage-number::after { content: none !important; }

/* -----------------------------------------------------------------------------
   5. حاوية المحتوى + العناوين
   -------------------------------------------------------------------------- */
div#content {
    font-family: var(--ui-font) !important;
    color: var(--ui-ink) !important;
    background: transparent !important;
}
div#content h1,
div#content h2,
div#content h3,
div#content h4 {
    font-family: var(--ui-font) !important;
    color: var(--ui-ink) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    background-image: none !important;
    -webkit-text-fill-color: currentColor !important;
}
div#content h1 { font-size: var(--ui-fs-xl) !important; margin: 0 0 var(--ui-3) !important; }
div#content h2 { font-size: var(--ui-fs-lg) !important; margin: 0 0 var(--ui-2) !important; }
div#content h3 { font-size: var(--ui-fs-md) !important; margin: 0 0 var(--ui-2) !important; }
div#content p { line-height: 1.7; }

/* -----------------------------------------------------------------------------
   6. نظام الأزرار — شكل واحد، ثلاثة أحجام، أربع نبرات
   -------------------------------------------------------------------------- */
.tw-btn,
div#content a.tw-btn,
div#content button.tw-btn,
div#content input.tw-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: var(--ui-h-md) !important;
    min-height: var(--ui-h-md) !important;
    padding: 0 var(--ui-3) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line-2) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-align: center !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}
.tw-btn:hover { background: var(--ui-surface-3) !important; border-color: var(--ui-ink-3) !important; }
.tw-btn:disabled,
.tw-btn.is-disabled { opacity: .45 !important; cursor: not-allowed; }

.tw-btn.tw-sm { height: var(--ui-h-sm) !important; min-height: var(--ui-h-sm) !important; padding: 0 var(--ui-2) !important; font-size: var(--ui-fs-sm) !important; }
.tw-btn.tw-lg { height: var(--ui-h-lg) !important; min-height: var(--ui-h-lg) !important; padding: 0 var(--ui-5) !important; font-size: var(--ui-fs-lg) !important; }
.tw-btn.tw-block { width: 100% !important; }

/* الإجراء الرئيسي — لون صلب واحد، بلا تدرّج ولا ظل */
.tw-btn.tw-primary,
.tatwar-primary,
div#content a.tatwar-primary,
div#content button.tatwar-primary,
div#content input.tatwar-primary {
    background: var(--ui-accent) !important;
    background-image: none !important;
    border-color: var(--ui-accent) !important;
    color: var(--ui-accent-ink) !important;
    box-shadow: none !important;
}
.tw-btn.tw-primary:hover,
.tatwar-primary:hover { background: var(--ui-accent-hover) !important; border-color: var(--ui-accent-hover) !important; }

/* .tatwar-primary تُستخدم داخل جداول قديمة، فتحتاج صندوق الزر كاملاً */
div#content a.tatwar-primary,
div#content table a.tatwar-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: var(--ui-h-md) !important;
    min-height: var(--ui-h-md) !important;
    padding: 0 var(--ui-4) !important;
    border: 1px solid var(--ui-accent) !important;
    border-radius: var(--ui-r-md) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* الذهبي — إجراء الشراء/الترقية فقط */
.tw-btn.tw-gold {
    background: var(--ui-gold) !important;
    background-image: none !important;
    border-color: var(--ui-gold) !important;
    color: var(--ui-gold-ink) !important;
}
.tw-btn.tw-gold:hover { background: var(--ui-gold-hover) !important; border-color: var(--ui-gold-hover) !important; }

.tw-btn.tw-danger { background: var(--ui-danger) !important; border-color: var(--ui-danger) !important; color: #fff !important; }
.tw-btn.tw-ghost { background: transparent !important; border-color: transparent !important; color: var(--ui-accent) !important; }
.tw-btn.tw-ghost:hover { background: var(--ui-accent-soft) !important; border-color: var(--ui-accent-line) !important; }
.tw-btn.tw-icon { width: var(--ui-h-md) !important; padding: 0 !important; }
.tw-btn.tw-icon.tw-sm { width: var(--ui-h-sm) !important; }

/* ---- تطبيع الأزرار الموروثة على كل الصفحات ---- */
div#content a.build,
div#content a.trav_buttons,
div#content .dynamic_img,
div#content input[type="submit"],
div#content input[type="button"],
div#content button:not(.tw-btn):not(.tw-plain),
div#content .btn-train,
div#content .farm-submit-btn,
div#content .farm-button,
div#content .attack-btn,
div#content .info-button,
div#content .v2v-search,
div#content .v2v-confirm-btn,
div#content .v2v-merge-btn,
div#content .rpt-btn,
div#content .delete-btn,
div#content .archive-btn,
div#content .btn-icon,
div#content .clan-btn,
div#content .action-btn,
div#content .lux-btn,
div#content .save-btn,
div#content .md-btn,
div#content .support-close,
div#content .qactions a,
div#content .qactions button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: var(--ui-h-md) !important;
    padding: 0 var(--ui-3) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line-2) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer;
}
div#content a.build:hover,
div#content input[type="submit"]:hover,
div#content button:not(.tw-btn):not(.tw-plain):hover,
div#content .trav_buttons:hover,
div#content .dynamic_img:hover {
    background: var(--ui-surface-3) !important;
    border-color: var(--ui-ink-3) !important;
}

/* الإجراءات الحاسمة تأخذ اللهجة */
div#content #btn_ok,
div#content #btn_send,
div#content #btn_reply,
div#content #btn_save,
div#content #btn_train,
div#content #attack,
div#content input[name="attack"],
div#content .farm-submit-btn,
div#content .v2v-confirm-btn,
div#content .save-btn,
div#content .lux-btn.primary {
    background: var(--ui-accent) !important;
    background-image: none !important;
    border-color: var(--ui-accent) !important;
    color: var(--ui-accent-ink) !important;
}
div#content #btn_ok:hover,
div#content #btn_send:hover,
div#content #btn_train:hover,
div#content .farm-submit-btn:hover,
div#content .v2v-confirm-btn:hover { background: var(--ui-accent-hover) !important; border-color: var(--ui-accent-hover) !important; }

div#content .delete-btn,
div#content .lux-btn.danger,
div#content .pill-danger {
    color: var(--ui-danger) !important;
    border-color: var(--ui-danger-line) !important;
    background: var(--ui-danger-soft) !important;
}

/* روابط النص العادية تبقى روابط، لا أزرار */
div#content p a,
div#content li a,
div#content td a.plain,
div#content .tw-link {
    display: inline !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--ui-accent) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
div#content p a:hover,
div#content li a:hover,
div#content .tw-link:hover { text-decoration: underline !important; }

/* -----------------------------------------------------------------------------
   7. البطاقات — سطح واحد، حدّ شعري، رأس مضغوط
   -------------------------------------------------------------------------- */
.tw-card,
div#content .clan-card,
div#content .qcard,
div#content .support-card,
div#content .manual-card,
div#content .lg-card,
div#content .stat-card,
div#content .rpt-wrap,
div#content .msg_content,
div#content .content-box {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-xl) !important;
    box-shadow: none !important;
    padding: var(--ui-3) !important;
    margin: 0 0 var(--ui-3) !important;
    color: var(--ui-ink) !important;
}
html body div#content .qwrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 24px !important;
    box-sizing: border-box !important;
}
html body div#content .qgrid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
}
html body div#content .qgrid .qcard {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
html body div#content .qhero .qstat {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
html body div#content .qhero .qstat b { color: var(--ui-ink) !important; }
html body div#content .qbadge { margin: 0 !important; }
html body div#content .qactions a,
html body div#content .qactions button {
    width: 100% !important;
    background: var(--ui-accent) !important;
    border-color: var(--ui-accent) !important;
    color: var(--ui-accent-ink) !important;
}
html body div#content .qactions a.ghost {
    background: transparent !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink-2) !important;
}
@media screen and (min-width: 720px) {
    html body div#content .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

.tw-card-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: var(--ui-2);
    min-height: var(--ui-h-sm);
    margin: calc(var(--ui-3) * -1) calc(var(--ui-3) * -1) var(--ui-3) !important;
    padding: 0 var(--ui-3) !important;
    background: var(--ui-surface-2) !important;
    border-bottom: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-xl) var(--ui-r-xl) 0 0 !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
}

/* بطاقات الشريط الجانبي — كانت داكنة ومهدِرة للمساحة */
/* شبكة الصفحة: أعمدة أعرض قليلاً وفراغات أقل حتى تُرى البطاقات دفعة واحدة */
@media screen and (min-width: 1200px) {
    .vip-desktop-layout {
        grid-template-columns: 286px minmax(0, 1fr) 286px !important;
        column-gap: 14px !important;
        padding: 10px 14px 0 !important;
        min-height: 0 !important;
        align-items: start !important;
    }
    .vip-desktop-layout.vip-right-sidebar-empty { grid-template-columns: 286px minmax(0, 1fr) !important; }
    #vipLeftSidebar, #vipRightSidebar { max-width: 286px !important; gap: 10px !important; }
    #vipMainContent { padding-inline: 6px !important; }
}
.vip-sidebar-left,
.vip-sidebar-right { gap: 10px !important; }

.premium-rpg-card {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-xl) !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
}
.premium-rpg-card .premium-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: var(--ui-2) !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    background: var(--ui-surface-2) !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ui-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.premium-rpg-card .premium-card-title {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--ui-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    background-image: none !important;
    -webkit-text-fill-color: currentColor !important;
}
.premium-rpg-card .premium-card-title i { color: var(--ui-ink-3) !important; font-size: 11px !important; }
.premium-rpg-card .premium-card-body {
    padding: 8px 10px !important;
    margin: 0 !important;
    background: transparent !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-sm) !important;
}
.premium-rpg-card .premium-card-body:empty { display: none !important; }

/* عنصر قائمة داخل البطاقة — صف واحد مضغوط */
.premium-list-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: var(--ui-2) !important;
    min-height: 26px !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ui-surface-3) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-sm) !important;
}
.premium-list-item:last-child { border-bottom: 0 !important; }
.premium-item-left, .premium-item-right { display: flex !important; align-items: center !important; gap: 5px !important; min-width: 0; }
.premium-item-right { color: var(--ui-ink-2) !important; font-weight: 700 !important; }

/* صف معلومة في الشريط الجانبي — نبرة واحدة، ست حالات لونية */
.tw-srow {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: var(--ui-2) !important;
    min-height: 28px !important;
    margin: 0 0 4px !important;
    padding: 4px 8px !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-sm) !important;
}
.tw-srow:last-child { margin-bottom: 0 !important; }
.tw-srow-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    font-weight: 400;
}
.tw-srow-label i { font-size: 11px; opacity: .75; }
.tw-srow-label img { width: 16px; height: 16px; flex: 0 0 auto; }
.tw-srow-value {
    color: inherit;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.tw-srow.is-danger { background: var(--ui-danger-soft) !important; border-color: var(--ui-danger-line) !important; color: var(--ui-danger) !important; }
.tw-srow.is-info   { background: var(--ui-info-soft) !important;   border-color: var(--ui-info-line) !important; color: var(--ui-info) !important; }
.tw-srow.is-warn   { background: var(--ui-warn-soft) !important;   border-color: var(--ui-warn-line) !important; color: var(--ui-warn) !important; }
.tw-srow.is-ok     { background: var(--ui-ok-soft) !important;     border-color: var(--ui-ok-line) !important; color: var(--ui-ok) !important; }

/* بطاقة جائزة الذهب */
.tw-prize-body { text-align: center; }
.tw-prize-amount {
    margin: 2px 0 6px;
    color: var(--ui-accent) !important;
    font-size: var(--ui-fs-xl) !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
}
.tw-prize-note { color: var(--ui-ink-3) !important; font-size: var(--ui-fs-xs) !important; }
.tw-prize-winner { margin-top: 2px; color: var(--ui-ink) !important; font-size: var(--ui-fs-lg) !important; font-weight: 700 !important; }
.tw-prize-timer { margin-top: 2px; color: var(--ui-ink) !important; font-size: var(--ui-fs-lg) !important; font-weight: 700 !important; }
.tw-prize-timer.is-soon { color: var(--ui-danger) !important; }

/* حالة الفراغ — سطر واحد صغير لا بطاقة كاملة */
.tw-empty {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--ui-ink-3) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}
.tw-empty i { font-size: 11px; opacity: .7; }

.premium-card-body .premium-empty,
.premium-card-body .no-data,
.premium-empty-state {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 0 !important;
    padding: 2px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--ui-ink-3) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 400 !important;
    text-align: start !important;
}

/* ---- محتوى بطاقات الشريط الجانبي ----
   كانت مصمَّمة على خلفية داكنة، فتُحوَّل كلها إلى السطح الفاتح نفسه. */

/* صف قرية */
.vip-enhanced-body a.premium-village-row,
.premium-village-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    min-height: 30px !important;
    margin: 0 0 4px !important;
    padding: 5px 8px !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 400 !important;
    text-decoration: none !important;
}
.vip-enhanced-body a.premium-village-row:hover,
.premium-village-row:hover {
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-line-2) !important;
    transform: none !important;
    filter: none !important;
}
.premium-village-row.active,
.premium-village-row.is-on {
    background: var(--ui-accent-soft) !important;
    border-color: var(--ui-accent-line) !important;
    color: var(--ui-accent) !important;
    font-weight: 700 !important;
}
.premium-village-row .pvr-main {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
}
.premium-village-row .pvr-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: inherit;
}
.premium-village-row .pvr-capital { color: var(--ui-gold) !important; font-size: 10px; }
.premium-village-row .pvr-coords {
    color: var(--ui-ink-3) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 400;
    white-space: nowrap;
    direction: ltr;
    unicode-bidi: isolate;
}
.premium-village-row.active .pvr-coords { color: var(--ui-accent) !important; }

/* صف معجزة */
.vip-enhanced-body a.vip-wonder-row,
.vip-wonder-row {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 7px !important;
    width: 100% !important;
    min-height: 30px !important;
    margin: 0 0 4px !important;
    padding: 5px 7px !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    text-decoration: none !important;
}
.vip-enhanced-body a.vip-wonder-row:hover,
.vip-wonder-row:hover {
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-line-2) !important;
}
.vip-wonder-rank {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: var(--ui-r-xs) !important;
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink-2) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}
.vip-wonder-row.is-top .vip-wonder-rank { background: var(--ui-accent) !important; color: var(--ui-accent-ink) !important; }
/* سطر واحد: الاسم ثم المالك بجانبه، والمستوى في الطرف */
.vip-wonder-main {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 18px !important;
}
.vip-wonder-name { display: inline !important; color: var(--ui-ink) !important; font-size: var(--ui-fs-sm) !important; font-weight: 700 !important; }
.vip-wonder-owner { display: inline !important; margin-inline-start: 5px !important; color: var(--ui-ink-3) !important; font-size: var(--ui-fs-xs) !important; font-weight: 400 !important; }
.vip-wonder-level {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 2px !important;
    direction: ltr !important;
    color: var(--ui-accent) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
    line-height: 18px !important;
    white-space: nowrap !important;
}
.vip-wonder-level small { display: inline !important; color: var(--ui-ink-3) !important; font-size: 10px !important; font-weight: 400 !important; }
.vip-wonder-bar {
    grid-column: 1 / -1 !important;
    display: block !important;
    width: 100% !important;
    margin-top: 1px !important;
    background: var(--ui-surface-3) !important;
    border-radius: 999px !important;
    height: 3px !important;
    overflow: hidden !important;
}
.vip-wonder-bar > * { display: block !important; height: 100% !important; background: var(--ui-accent) !important; border-radius: 999px !important; }

/* الإنتاج بالساعة */
.production-item {
    display: block !important;
    margin: 0 0 4px !important;
    padding: 5px 8px !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
}
.production-item:last-child { margin-bottom: 0 !important; }
.production-item .prod-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin-bottom: 3px !important;
    line-height: 18px !important;
}
.production-item .prod-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
}
.production-item .prod-label img { width: 16px !important; height: 16px !important; }
.production-item .prod-rate {
    color: var(--ui-ok) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
}
.production-storage-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin-top: 3px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--ui-ink-3) !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 13px !important;
    font-variant-numeric: tabular-nums;
}
.production-storage-row * { color: var(--ui-ink-3) !important; }

/* جوائز الجولة */
.vip-prize-head {
    margin-bottom: 5px !important;
    color: var(--ui-ink-2) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}
/* قائمة واحدة: التسمية يمين والقيمة يسار — نفس نمط بقية صفوف السايدبار */
.vip-prize-card .round-prize-list,
.vip-prize-card ul.round-prize-list.is-compact {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.vip-prize-card .round-prize-list li {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 26px !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ui-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.vip-prize-card .round-prize-list li:last-child { border-bottom: 0 !important; }
.vip-prize-card .round-prize-list strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ui-ink-2) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 400 !important;
}
.vip-prize-card .round-prize-list em {
    flex: 0 0 auto;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-sm) !important;
    font-style: normal !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.vip-prize-links {
    display: flex !important;
    gap: 6px !important;
    margin-top: 8px !important;
}
.vip-prize-links a,
#vipRightSidebar .vip-prize-links a,
#vipLeftSidebar .vip-prize-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0 !important;
    height: var(--ui-h-sm) !important;
    min-height: var(--ui-h-sm) !important;
    padding: 0 10px !important;
    background: var(--ui-surface-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line-2) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
.vip-prize-links a:hover { background: var(--ui-surface-3) !important; border-color: var(--ui-ink-3) !important; }

/* بطاقات الوحدات */
.premium-army-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)) !important;
    gap: 4px !important;
}
.premium-troop-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    min-height: 46px !important;
    padding: 4px 2px !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
}
.premium-troop-count { color: var(--ui-ink) !important; font-size: var(--ui-fs-sm) !important; font-weight: 700 !important; }
.premium-troop-name { color: var(--ui-ink-3) !important; font-size: 10px !important; font-weight: 400 !important; }

/* طابور البناء */
.vip-build-job {
    margin: 0 0 5px !important;
    padding: 6px 8px !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
}
.vip-build-job:last-child { margin-bottom: 0 !important; }
.vip-build-job-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin-bottom: 5px !important;
}
.vip-build-job-name { color: var(--ui-ink) !important; font-size: var(--ui-fs-sm) !important; font-weight: 700 !important; min-width: 0; }
.vip-build-job-name small { color: var(--ui-ink-3) !important; font-size: var(--ui-fs-xs) !important; font-weight: 400 !important; }
.vip-build-job-meta { display: flex !important; align-items: center !important; gap: 6px !important; }
.vip-build-job-meta .timer { color: var(--ui-ink-2) !important; font-size: var(--ui-fs-sm) !important; font-weight: 700 !important; }
.vip-build-cancel,
.vip-enhanced-body a.vip-build-cancel {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    color: var(--ui-ink-3) !important;
    font-size: 10px !important;
}
.vip-build-cancel:hover { background: var(--ui-danger-soft) !important; border-color: var(--ui-danger-line) !important; color: var(--ui-danger) !important; }
.vip-finish-btn,
.vip-enhanced-body a.vip-finish-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-height: 22px !important;
    padding: 0 7px !important;
    margin: 0 !important;
    background: var(--ui-accent) !important;
    background-image: none !important;
    border: 1px solid var(--ui-accent) !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    color: var(--ui-accent-ink) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
.vip-finish-btn.is-off,
.vip-enhanced-body a.vip-finish-btn.is-off {
    background: var(--ui-surface) !important;
    border-color: var(--ui-line-2) !important;
    color: var(--ui-ink-3) !important;
}
.vip-finish-cost { opacity: .85; font-weight: 400 !important; }

/* أشرطة الولاء والتقدّم */
.premium-loyalty-bar-bg,
.premium-progress-bar,
.premium-progress-track {
    height: 4px !important;
    background: var(--ui-surface-3) !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    overflow: hidden;
}
.premium-loyalty-bar-fill,
.premium-progress-fill {
    height: 100% !important;
    background: var(--ui-accent) !important;
    background-image: none !important;
    border-radius: 999px !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body .prod-tank.premium-loyalty-bar-bg {
    height: 10px !important;
    min-height: 10px !important;
    margin: 5px 0 4px !important;
    background: var(--ui-surface-3) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: 999px !important;
    box-shadow: inset 0 0 0 1px rgba(36, 28, 22, .04) !important;
    overflow: hidden !important;
}
html body.vip-enhanced-body .prod-tank .premium-loyalty-bar-fill {
    display: block !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    background-image: none !important;
    border-radius: 999px !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body .prod-tank.r1-bar .premium-loyalty-bar-fill { background: #c9a45c !important; }
html body.vip-enhanced-body .prod-tank.r2-bar .premium-loyalty-bar-fill { background: #c08457 !important; }
html body.vip-enhanced-body .prod-tank.r3-bar .premium-loyalty-bar-fill { background: #8a8e94 !important; }
html body.vip-enhanced-body .prod-tank.r4-bar .premium-loyalty-bar-fill { background: #6fa35c !important; }
html body.vip-enhanced-body .premium-progress-bg {
    height: 8px !important;
    background: var(--ui-surface-3) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    box-shadow: none !important;
}

/* رأس القرية */
.premium-village-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: var(--ui-2) !important;
    min-height: 40px !important;
    padding: 0 var(--ui-3) !important;
    margin: 0 0 var(--ui-2) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-lg) !important;
    box-shadow: none !important;
}
.premium-village-name {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-lg) !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: currentColor !important;
}
.premium-village-edit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: var(--ui-h-xs) !important;
    height: var(--ui-h-xs) !important;
    padding: 0 !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line-2) !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    color: var(--ui-ink-2) !important;
    font-size: 11px !important;
    cursor: pointer;
}
.premium-village-edit-btn:hover { background: var(--ui-surface-3) !important; color: var(--ui-ink) !important; }
.premium-capital-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: var(--ui-h-xs) !important;
    padding: 0 var(--ui-2) !important;
    background: var(--ui-accent-soft) !important;
    background-image: none !important;
    border: 1px solid var(--ui-accent-line) !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    color: var(--ui-accent) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

/* -----------------------------------------------------------------------------
   8. الجداول — كثيفة وواضحة
   -------------------------------------------------------------------------- */
div#content table.tableNone,
div#content table.troop_details,
div#content table#plusFunctions,
div#content table#overview,
div#content table.row_table_data,
div#content table.clan-table,
div#content table.build_details,
div#content table.under_progress,
div#content table.new_building,
div#content table.v2v-troops,
div#content table.Ty,
div#content table.rate_details,
div#content table.md-table,
div#content .tw-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-lg) !important;
    box-shadow: none !important;
    overflow: hidden;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md) !important;
    color: var(--ui-ink) !important;
    margin: 0 0 var(--ui-3) !important;
}

div#content table.tableNone th, div#content table.tableNone td,
div#content table.troop_details th, div#content table.troop_details td,
div#content table#plusFunctions th, div#content table#plusFunctions td,
div#content table#overview th, div#content table#overview td,
div#content table.row_table_data:not(.top10) th, div#content table.row_table_data:not(.top10) td,
div#content table.build_details th, div#content table.build_details td,
div#content table.under_progress th, div#content table.under_progress td,
div#content table.new_building th, div#content table.new_building td,
div#content table.v2v-troops th, div#content table.v2v-troops td,
div#content table.Ty th, div#content table.Ty td,
div#content table.rate_details th, div#content table.rate_details td,
div#content .tw-table th, div#content .tw-table td {
    height: 32px;
    padding: 4px 8px !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ui-surface-3) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    font-size: var(--ui-fs-md) !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
}

div#content table thead th,
div#content table thead td,
div#content table th {
    background: var(--ui-surface-2) !important;
    background-image: none !important;
    color: var(--ui-ink-2) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-shadow: none !important;
    border-bottom: 1px solid var(--ui-line) !important;
    white-space: nowrap;
}
div#content table tbody tr:last-child td { border-bottom: 0 !important; }
div#content table tbody tr:hover td { background: var(--ui-surface-2) !important; }
div#content table td.none { color: var(--ui-ink-3) !important; }

/* -----------------------------------------------------------------------------
   9. التبويبات — نبرة واحدة في كل الصفحات
   -------------------------------------------------------------------------- */
div#content .rpt-tabs,
div#content .msg-tabs,
div#content .support-tabs,
div#content .train-tabs,
div#content .farm-navigation,
div#content .qtabs,
div#content .stats-nav,
div#content .stats-subnav,
div#content .manual-tabs,
div#content .lg-tabs,
div#content .plus-tabs,
div#content .unified-tabs,
div#content .md-tabs,
div#content #textmenu,
div#content .clan-sub,
div#content .profile-nav,
div#content .tw-tabs {
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 0 var(--ui-3) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-lg) !important;
    box-shadow: none !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
div#content .rpt-tabs::-webkit-scrollbar,
div#content .msg-tabs::-webkit-scrollbar,
div#content .support-tabs::-webkit-scrollbar,
div#content .farm-navigation::-webkit-scrollbar,
div#content .qtabs::-webkit-scrollbar,
div#content .stats-nav::-webkit-scrollbar,
div#content .tw-tabs::-webkit-scrollbar { display: none; }

div#content .rpt-tab,
div#content .msg-tab,
div#content .support-tab,
div#content .train-tabs a,
div#content .farm-nav-btn,
div#content .qtab,
div#content .lg-tab,
div#content .stats-nav a,
div#content .stats-subnav a,
div#content .manual-tabs a,
div#content .lg-tabs a,
div#content .plus-tabs a,
div#content a.plus-tab,
div#content .unified-tab,
div#content .md-tab-link,
div#content #textmenu a,
div#content .clan-sub-link,
div#content .profile-nav-link,
div#content a.rp-link,
div#content .tw-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex: 1 0 auto;
    min-width: 0;
    height: var(--ui-h-md) !important;
    min-height: var(--ui-h-md) !important;
    padding: 0 var(--ui-3) !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--ui-ink-2) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
}
div#content .rpt-tab:hover,
div#content .msg-tab:hover,
div#content .support-tab:hover,
div#content .farm-nav-btn:hover,
div#content .qtab:hover,
div#content #textmenu a:hover,
div#content .tw-tab:hover { background: var(--ui-surface-2) !important; color: var(--ui-ink) !important; }

div#content .rpt-tab.selected,
div#content .msg-tab.selected,
div#content .support-tab.selected,
div#content .support-tab.is-on,
div#content .support-tab.active,
div#content .train-tabs a.selected,
div#content .farm-nav-btn.active,
div#content .qtab.on,
div#content .lg-tab.on,
div#content .stats-nav a.is-on,
div#content .stats-nav a.selected,
div#content .stats-subnav a.is-on,
div#content .stats-subnav a.selected,
div#content .manual-tabs a.is-on,
div#content .lg-tabs a.is-on,
div#content .plus-tabs a.is-on,
div#content .plus-tabs a.selected,
div#content a.plus-tab.selected,
div#content .unified-tab.active,
div#content .md-tab-link.active,
div#content #textmenu a.selected,
div#content .clan-sub-link.is-on,
div#content .profile-nav-link.is-on,
div#content a.rp-link.is-on,
div#content .tw-tab.is-on {
    background: var(--ui-surface-2) !important;
    color: var(--ui-accent) !important;
    font-weight: 700 !important;
    box-shadow: inset 0 -2px 0 var(--ui-accent) !important;
}

/* -----------------------------------------------------------------------------
   10. الحقول — ارتفاع واحد
   -------------------------------------------------------------------------- */
div#content input[type="text"],
div#content input[type="number"],
div#content input[type="password"],
div#content input[type="email"],
div#content input[type="search"],
div#content select,
div#content textarea,
div#content .form-control {
    height: var(--ui-h-md);
    padding: 0 10px !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line-2) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 400 !important;
    box-sizing: border-box !important;
    outline: none;
}
div#content textarea {
    height: auto;
    min-height: 96px;
    padding: 8px 10px !important;
    line-height: 1.6;
}
div#content input:focus,
div#content select:focus,
div#content textarea:focus {
    border-color: var(--ui-accent) !important;
    box-shadow: 0 0 0 3px var(--ui-accent-soft) !important;
}
div#content input::placeholder,
div#content textarea::placeholder { color: var(--ui-ink-3) !important; }
div#content input[type="checkbox"],
div#content input[type="radio"] { accent-color: var(--ui-accent); width: 15px; height: 15px; }
div#content label { font-size: var(--ui-fs-md); color: var(--ui-ink-2); }

/* رسائل الحالة */
div#content .error,
div#content .clan-flash.err,
div#content .qflash.err,
div#content .flash-msg.err {
    padding: 8px 10px !important;
    background: var(--ui-danger-soft) !important;
    border: 1px solid var(--ui-danger-line) !important;
    border-radius: var(--ui-r-md) !important;
    color: var(--ui-danger) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
}
div#content .clan-flash.ok,
div#content .qflash.ok,
div#content .flash-msg.ok {
    padding: 8px 10px !important;
    background: var(--ui-ok-soft) !important;
    border: 1px solid var(--ui-ok-line) !important;
    border-radius: var(--ui-r-md) !important;
    color: var(--ui-ok) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
}

/* شرائح صغيرة */
.tw-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    padding: 0 7px;
    background: var(--ui-surface-2);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-r-xs);
    color: var(--ui-ink-2);
    font-size: var(--ui-fs-xs);
    font-weight: 700;
}
.tw-chip.ok { background: var(--ui-ok-soft); border-color: var(--ui-ok-line); color: var(--ui-ok); }
.tw-chip.warn { background: var(--ui-warn-soft); border-color: var(--ui-warn-line); color: var(--ui-warn); }
.tw-chip.danger { background: var(--ui-danger-soft); border-color: var(--ui-danger-line); color: var(--ui-danger); }

/* -----------------------------------------------------------------------------
   11. الفوتر — شبكة اختصارات هادئة
   -------------------------------------------------------------------------- */
#vipProfessionalFooter {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 0 !important;
    border-top: 1px solid var(--ui-line) !important;
    box-shadow: none !important;
    font-family: var(--ui-font) !important;
}
#vipProfessionalFooter .footer-operations-section {
    padding: var(--ui-2) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
}
#vipProfessionalFooter .footer-ops-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0 !important;
    margin: 0 0 6px !important;
    overflow: visible !important;
}
#vipProfessionalFooter .footer-ops-grid:last-child { margin-bottom: 0 !important; }
#vipProfessionalFooter .footer-op-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    position: relative !important;
    min-height: 52px !important;
    padding: 4px 2px 2px !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    color: var(--ui-ink-2) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
#vipProfessionalFooter .footer-op-ico {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 28px !important;
    max-width: 32px !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: var(--ui-r-md) !important;
    overflow: visible !important;
    line-height: 1 !important;
}
#vipProfessionalFooter .footer-op-btn i {
    font-size: 18px !important;
    color: var(--ui-ink-2) !important;
    opacity: .88;
    line-height: 1 !important;
}
#vipProfessionalFooter .footer-op-btn span.footer-op-label {
    display: block;
    width: 100%;
    overflow: hidden;
    color: inherit !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}
#vipProfessionalFooter .footer-op-btn:hover {
    background: transparent !important;
    border: 0 !important;
    color: var(--ui-ink) !important;
}
#vipProfessionalFooter .footer-op-btn:hover i { color: var(--ui-ink) !important; opacity: 1; }
#vipProfessionalFooter .footer-op-btn.is-on {
    background: transparent !important;
    border: 0 !important;
    color: var(--ui-accent) !important;
}
#vipProfessionalFooter .footer-op-btn.is-on .footer-op-ico {
    background: var(--ui-accent-soft) !important;
}
#vipProfessionalFooter .footer-op-btn.is-on i { color: var(--ui-accent) !important; opacity: 1; }
#vipProfessionalFooter .footer-op-btn.is-attack {
    background: transparent !important;
    border: 0 !important;
    color: var(--ui-danger) !important;
}
#vipProfessionalFooter .footer-op-btn.is-attack .footer-op-ico {
    background: var(--ui-danger-soft) !important;
}
#vipProfessionalFooter .footer-op-btn.is-attack i {
    color: var(--ui-danger) !important;
    opacity: 1;
}
#vipProfessionalFooter .footer-op-btn.is-attack.is-on {
    background: transparent !important;
    border: 0 !important;
    color: var(--ui-danger) !important;
}
#vipProfessionalFooter .footer-op-btn.is-attack.is-on .footer-op-ico {
    background: var(--ui-danger-soft) !important;
}
#vipProfessionalFooter .footer-op-btn.is-attack.is-on i {
    color: var(--ui-danger) !important;
}
#vipProfessionalFooter .footer-op-lobby {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    color: var(--ui-accent) !important;
}
#vipProfessionalFooter .footer-op-lobby i { color: var(--ui-accent) !important; opacity: 1; }
#vipProfessionalFooter .footer-op-lobby:hover {
    background: transparent !important;
    border: 0 !important;
    color: var(--ui-accent-hover) !important;
}
#vipProfessionalFooter .footer-op-lobby:hover i { color: var(--ui-accent-hover) !important; }
#vipProfessionalFooter .footer-op-badge {
    position: absolute !important;
    top: -7px !important;
    inset-inline-start: auto !important;
    inset-inline-end: -8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    background: var(--ui-danger) !important;
    background-image: none !important;
    border: 2px solid var(--ui-surface) !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-align: center !important;
    z-index: 2;
    box-sizing: border-box !important;
}
#vipProfessionalFooter .footer-op-badge.is-wide {
    width: auto !important;
    min-width: 20px !important;
    padding: 0 5px !important;
    border-radius: 999px !important;
}
#vipProfessionalFooter .footer-op-badge[hidden] {
    display: none !important;
}
#vipProfessionalFooter .footer-protection-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: 22px !important;
    padding: 0 var(--ui-2) !important;
    background: var(--ui-surface-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    color: var(--ui-ink-2) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
}
#vipProfessionalFooter .footer-reit-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: var(--ui-2) !important;
    min-height: 34px !important;
    padding: 0 var(--ui-3) !important;
    background: var(--ui-chrome) !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink-2) !important;
    font-size: var(--ui-fs-xs) !important;
}
#vipProfessionalFooter .footer-reit-logo { display: flex !important; align-items: center !important; gap: var(--ui-2) !important; min-width: 0; }
#vipProfessionalFooter .reit-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: var(--ui-chrome-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-chrome-line) !important;
    border-radius: var(--ui-r-xs) !important;
    box-shadow: none !important;
    color: var(--ui-gold) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}
#vipProfessionalFooter .footer-reit-text { color: var(--ui-chrome-ink-2) !important; font-size: var(--ui-fs-xs) !important; line-height: 1.4; }
#vipProfessionalFooter .footer-reit-text strong { display: inline; color: var(--ui-chrome-ink) !important; font-weight: 700 !important; }
#vipProfessionalFooter .footer-reit-text a { color: var(--ui-gold) !important; text-decoration: none !important; }
#vipProfessionalFooter .footer-time-widget {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    color: var(--ui-chrome-ink) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   12. النوافذ المنبثقة
   -------------------------------------------------------------------------- */
.vip-modal-overlay { background: rgba(26, 19, 16, .55) !important; backdrop-filter: blur(1px); }
.vip-modal-content {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-xl) !important;
    box-shadow: var(--ui-shadow-pop) !important;
    font-family: var(--ui-font) !important;
    overflow: hidden;
}
.vip-modal-header {
    padding: 0 var(--ui-4) !important;
    min-height: var(--ui-h-lg) !important;
    display: flex !important;
    align-items: center !important;
    background: var(--ui-surface-2) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-lg) !important;
    font-weight: 700 !important;
}
.vip-modal-body { padding: var(--ui-4) !important; color: var(--ui-ink) !important; font-size: var(--ui-fs-md) !important; }
.vip-modal-buttons { display: flex !important; gap: var(--ui-2) !important; margin-top: var(--ui-4) !important; }
.vip-btn-confirm, .vip-btn-cancel {
    flex: 1;
    height: var(--ui-h-md) !important;
    padding: 0 var(--ui-3) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line-2) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
    cursor: pointer;
}
.vip-btn-confirm { background: var(--ui-accent) !important; border-color: var(--ui-accent) !important; color: var(--ui-accent-ink) !important; }

/* -----------------------------------------------------------------------------
   13. الجوال — كثافة أعلى، كل شيء من لمحة
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1199px) {
    header#premiumHeader .premium-desktop-nav { display: flex !important; }
    header#premiumHeader .premium-actions { display: none !important; }
}

@media screen and (max-width: 760px) {
    :root { --ui-hdr-1: 46px; }

    header#premiumHeader .premium-header-row-main { padding: 0 var(--ui-2) !important; gap: 6px !important; }
    header#premiumHeader .premium-logo-text { display: none !important; }
    header#premiumHeader .premium-protection-badge { display: none !important; }
    header#premiumHeader .premium-meta-selectors { display: none !important; }
    header#premiumHeader .premium-news-ticker { display: none !important; }
    header#premiumHeader .premium-header-row-status { padding: 0 var(--ui-2) !important; }
    header#premiumHeader .premium-desktop-nav { padding: 0 var(--ui-2) !important; }
    header#premiumHeader .premium-resource-pill.clan-chat .value { display: none !important; }

    html body #header #mtop {
        --nav-s: 1;
        width: 350px !important;
        max-width: 350px !important;
        height: 67px !important;
        min-height: 67px !important;
        gap: 0 !important;
        padding: 0 !important;
        transform: scale(clamp(0.72, calc((100vw - 16px) / 350), 1)) !important;
        transform-origin: top center !important;
    }

    #enhancedResourcesBar.enhanced-resources-container { margin: 6px auto !important; }
    #enhancedResourcesBar .enhanced-resources-grid { gap: 4px !important; padding: 0 var(--ui-2) !important; }
    #enhancedResourcesBar .enhanced-resources-number { height: 32px !important; min-height: 32px !important; font-size: var(--ui-fs-sm) !important; padding: 0 6px !important; gap: 4px !important; overflow: visible !important; }
    #enhancedResourcesBar .enhanced-storage-number { height: 26px !important; min-height: 26px !important; font-size: var(--ui-fs-xs) !important; overflow: visible !important; }
    #enhancedResourcesBar .enhanced-resources-number > img.storage-icon {
        width: 20px !important;
        height: 16px !important;
        flex-basis: 20px !important;
    }
    #enhancedResourcesBar .enhanced-storage-number > img.warehouse {
        width: 18px !important;
        height: 21px !important;
    }
    #enhancedResourcesBar .enhanced-storage-number > img.granary {
        width: 20px !important;
        height: 24px !important;
    }

    div#content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: var(--ui-2) !important;
        box-sizing: border-box !important;
    }
    div#content h1 { font-size: var(--ui-fs-lg) !important; margin-bottom: var(--ui-2) !important; }

    .premium-rpg-card { margin-bottom: 6px !important; }
    .premium-rpg-card .premium-card-header { min-height: 28px !important; }

    div#content .rpt-tab,
    div#content .msg-tab,
    div#content .support-tab,
    div#content .farm-nav-btn,
    div#content .qtab,
    div#content #textmenu a,
    div#content .clan-sub-link,
    div#content .profile-nav-link,
    div#content .tw-tab {
        flex: 0 0 auto;
        padding: 0 var(--ui-2) !important;
        font-size: var(--ui-fs-sm) !important;
    }

    div#content .clan-sub,
    div#content .profile-nav { grid-template-columns: none !important; }

    #vipProfessionalFooter .footer-op-btn { min-height: 46px !important; font-size: 10px !important; }
    #vipProfessionalFooter .footer-op-btn i { font-size: 15px !important; }
    #vipProfessionalFooter .footer-reit-bar { flex-direction: column !important; align-items: flex-start !important; padding: 6px var(--ui-2) !important; gap: 2px !important; }
}

@media screen and (max-width: 400px) {
    #enhancedResourcesBar .enhanced-resources-number { font-size: var(--ui-fs-xs) !important; }
    header#premiumHeader .premium-resource-pill .value { font-size: var(--ui-fs-xs) !important; }
}

/* -----------------------------------------------------------------------------
   14. تنظيف الأثر «الاصطناعي» أينما بقي
   -------------------------------------------------------------------------- */
body.vip-enhanced-body :is(a, button, input, .premium-badge, .tw-chip, .stat-card, .qcard, .support-card, .clan-card, .rpt-hero, .msg-hero)[class] {
    text-shadow: none !important;
}
/* لا زوايا كبسولة إلا للعدّادات الدائرية الصغيرة */
div#content :is(a, button, input, select, .qtab, .support-tab, .rpt-tab, .msg-tab, .stat-card, .qcard)[class] {
    border-radius: var(--ui-r-md) !important;
}
div#content :is(.badge, .footer-op-badge, .header-notify-badge, .premium-notification-badge) {
    border-radius: 999px !important;
}
/* لا حركة متواصلة تشدّ العين */
body.vip-enhanced-body :is(.premium-move-pill, .premium-badge, .footer-op-btn, .tw-chip, .stat-card) {
    animation: none !important;
}

/* -----------------------------------------------------------------------------
   15. الجوال: إلغاء تصغير الصفحة القديم
   allan.css كان يضع body { zoom: 75% } تحت 900px ليحشر تخطيطاً بعرض ثابت،
   فيصير النص أصغر من المقروء. التخطيط صار متجاوباً، فالتصغير لم يعد مطلوباً.
   -------------------------------------------------------------------------- */
@media screen and (max-width: 900px) {
    html body,
    html body.vip-enhanced-body,
    html body.tatwar-kingdom-hud { zoom: 1 !important; }

    /* صف الروابط الثانوي كان يُقصّ ولا يمكن الوصول لنصفه؛ نفس الروابط موجودة في الهمبرغر */
    header#premiumHeader .premium-desktop-nav { display: none !important; }

    /* شريط الحالة يمرّر أفقياً بدل أن يُقصّ */
    header#premiumHeader .premium-status-panel {
        overflow-x: auto !important;
        scrollbar-width: none;
    }
    header#premiumHeader .premium-status-panel::-webkit-scrollbar { display: none; }

    /* min-height:80vh كان يترك فراغاً أبيض بطول ٢٠٠px+ قبل الفوتر على الجوال */
    .vip-desktop-layout { min-height: 0 !important; }

    /* شريط سفلي بصف واحد (٥ أيقونات)؛ الصف الثاني انتقل إلى درج المزيد */
    #vipProfessionalFooter .footer-ops-grid.footer-ops-secondary { display: none !important; }
    #vipProfessionalFooter .footer-operations-section { padding-bottom: 4px !important; }
    html body.vip-enhanced-body { padding-bottom: 74px !important; }

    /* شريط الحقوق: سطر واحد صغير بدل كتلة تتداخل مع الشريط السفلي */
    #vipProfessionalFooter .footer-reit-bar {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 6px 10px !important;
        min-height: 0 !important;
    }
    #vipProfessionalFooter .footer-reit-logo {
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
    }
    #vipProfessionalFooter .reit-icon { flex: 0 0 auto !important; }
    #vipProfessionalFooter .footer-reit-text {
        font-size: 10px !important;
        line-height: 1.35 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    #vipProfessionalFooter .footer-reit-text strong { display: block !important; }
    #vipProfessionalFooter .footer-reit-text a {
        display: inline !important;
        background: none !important;
        border: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        box-shadow: none !important;
        color: var(--ui-accent) !important;
        font-size: 10px !important;
    }
    #vipProfessionalFooter .footer-time-widget {
        flex: 0 0 auto !important;
        padding: 4px 8px !important;
        font-size: 10px !important;
    }
}

/* درج المزيد: صف اللوحات السريعة شبكة من عمودين */
.premium-more-drawer .premium-more-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}
.premium-more-drawer .premium-more-panels .premium-more-link { margin-bottom: 0; width: 100%; }

@media screen and (min-width: 901px) {
    .premium-more-drawer .premium-more-panels,
    .premium-more-drawer .premium-more-panels-label { display: none; }
}

/* -----------------------------------------------------------------------------
   10. حالة فارغة موحّدة: عنوان + شرح + إجراء واحد
   -------------------------------------------------------------------------- */
div#content .tw-empty-state {
    max-width: 520px;
    margin: var(--ui-5) auto;
    padding: var(--ui-5) var(--ui-4);
    border-radius: var(--ui-r-xl);
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    text-align: center;
}
div#content .tw-empty-state h1 {
    margin: 0 0 var(--ui-2) !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-xl) !important;
    font-weight: 700 !important;
    text-align: center !important;
}
div#content .tw-empty-state p {
    margin: 0 0 var(--ui-2);
    color: var(--ui-ink-2);
    font-size: var(--ui-fs-md);
    line-height: 1.7;
}
div#content .tw-empty-state .tw-empty-lead { color: var(--ui-ink); font-weight: 700; }
div#content .tw-empty-state .tw-empty-cta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: var(--ui-h-md) !important;
    min-height: var(--ui-h-md) !important;
    margin-top: var(--ui-2) !important;
    padding: 0 var(--ui-5) !important;
    border: 0 !important;
    border-radius: var(--ui-r-md) !important;
    background: var(--ui-accent) !important;
    background-image: none !important;
    color: var(--ui-accent-ink) !important;
    box-shadow: none !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
div#content .tw-empty-state .tw-empty-cta:hover { background: var(--ui-accent-hover) !important; }

/* -----------------------------------------------------------------------------
   11. الأوراق السفلية على الجوال — كانت داكنة وتخالف الخلفية البيضاء داخل اللعب
   -------------------------------------------------------------------------- */
html body .mob-panel,
html body .tatwar-chat-panel {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border-top: 1px solid var(--ui-line-2) !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: 0 -10px 32px rgba(26, 19, 16, .14) !important;
}
html body .mob-panel::before,
html body .tatwar-chat-panel::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    margin: 8px auto 0;
    background: var(--ui-line-2);
    border-radius: 2px;
}
html body .mob-panel .mob-panel-header {
    padding: 10px var(--ui-3) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-xl) var(--ui-r-xl) 0 0 !important;
}
html body .mob-panel .mob-panel-title {
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
}
html body .mob-panel .mob-panel-title i { color: var(--ui-ink-3) !important; font-size: var(--ui-fs-md) !important; }
html body .mob-panel .mob-panel-close {
    width: var(--ui-h-xs) !important;
    height: var(--ui-h-xs) !important;
    background: var(--ui-surface-3) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    color: var(--ui-ink-2) !important;
    box-shadow: none !important;
}
html body .mob-panel .mob-panel-close:hover { background: var(--ui-surface-2) !important; color: var(--ui-ink) !important; }
html body .mob-panel .mob-panel-body { padding: var(--ui-2) var(--ui-3) var(--ui-3) !important; }

html body .mob-panel .mob-vil-row,
html body .mob-panel .tatwar-sheet-card,
html body .mob-panel .tatwar-prod-row,
html body .mob-panel .tatwar-unit-row,
html body .mob-panel .tatwar-task-card,
html body .mob-panel .mob-mov-row {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 46px !important;
    padding: 10px 12px !important;
    margin: 0 0 6px !important;
    background: var(--ui-surface-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    text-decoration: none !important;
}
html body .mob-panel .mob-vil-main {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
}
html body .mob-panel .mob-vil-dot {
    font-size: 8px !important;
    color: var(--ui-ink-3) !important;
}
html body .mob-panel .mob-vil-dot.is-on { color: var(--ui-ok) !important; }
html body .mob-panel .mob-vil-dot.is-cap { color: var(--ui-accent) !important; }
html body .mob-panel .mob-vil-dot.is-attack { color: var(--ui-danger) !important; }
html body .mob-panel .mob-vil-cap {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    background: var(--ui-accent-soft) !important;
    border-radius: var(--ui-r-sm) !important;
    color: var(--ui-accent) !important;
    font-size: 9px !important;
}
html body .mob-panel .mob-vil-att {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    background: var(--ui-danger) !important;
    border-radius: 9px !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}
html body .mob-panel .mob-vil-row.active,
html body .mob-panel .tatwar-task-card.is-main,
html body .mob-panel .vip-wonder-row.is-lead {
    background: var(--ui-accent-soft) !important;
    background-image: none !important;
    border-color: var(--ui-accent-line) !important;
}
html body .mob-panel .mob-vil-row.is-attack {
    background: var(--ui-danger-soft) !important;
    background-image: none !important;
    border-color: var(--ui-danger-line) !important;
}
html body .mob-panel .mob-vil-row.is-attack .vname {
    color: var(--ui-danger) !important;
}
html body .mob-panel .mob-vil-row span.vname { color: var(--ui-ink) !important; font-size: var(--ui-fs-md) !important; }
html body .mob-panel .mob-vil-row span.vcoord { color: var(--ui-ink-3) !important; direction: ltr; unicode-bidi: isolate; }
html body .mob-panel .tatwar-prod-row { flex-direction: column !important; align-items: stretch !important; }
html body .mob-panel .tatwar-prod-name,
html body .mob-panel .tatwar-unit-name { color: var(--ui-ink-2) !important; }
html body .mob-panel .tatwar-prod-rate,
html body .mob-panel .tatwar-unit-row strong { color: var(--ui-ok) !important; font-size: var(--ui-fs-md) !important; }
html body .mob-panel .tatwar-prod-meta,
html body .mob-panel .tatwar-prod-meta span { color: var(--ui-ink-3) !important; }
html body .mob-panel .mob-empty { color: var(--ui-ink-3) !important; padding: var(--ui-4) !important; }
html body .mob-panel .mob-empty i { color: var(--ui-line-2) !important; }
html body .mob-panel .tatwar-task-card strong { color: var(--ui-ink) !important; }
html body .mob-panel .tatwar-task-card small { color: var(--ui-ink-3) !important; }
html body .mob-panel .tatwar-task-card {
    min-height: 58px !important;
    align-items: center !important;
}
html body .mob-panel .tatwar-task-ico { background: var(--ui-surface-3) !important; color: var(--ui-ink-2) !important; border-radius: var(--ui-r-md) !important; }
html body .mob-panel .tatwar-task-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    flex: 1 !important;
    min-width: 0 !important;
}
html body .mob-panel .tatwar-task-bar {
    display: block !important;
    width: 100% !important;
    height: 4px !important;
    overflow: hidden !important;
    background: var(--ui-surface-3) !important;
    border-radius: 99px !important;
}
html body .mob-panel .tatwar-task-bar > span {
    display: block !important;
    height: 100% !important;
    background: var(--ui-accent) !important;
    border-radius: 99px !important;
}
html body .mob-panel .tatwar-task-card.is-ready {
    background: var(--ui-warn-soft) !important;
    background-image: none !important;
    border-color: var(--ui-warn-line) !important;
}
html body .mob-panel .tatwar-task-card.is-ready .tatwar-task-bar > span {
    background: var(--ui-warn) !important;
}
html body .mob-panel form.tatwar-task-card {
    margin: 0 0 6px !important;
}
html body .mob-panel button.tatwar-task-go {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: auto !important;
    font-family: inherit !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    cursor: pointer !important;
}
html body .mob-panel .tatwar-sheet-cta,
html body .mob-panel .tatwar-task-go {
    background: var(--ui-accent-soft) !important;
    border: 1px solid var(--ui-accent-line) !important;
    color: var(--ui-accent) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
}
html body .mob-panel .tatwar-task-go {
    flex-shrink: 0 !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
}
html body .mob-panel .tatwar-task-go.is-claim {
    background: var(--ui-warn-soft) !important;
    border-color: var(--ui-warn-line) !important;
    color: var(--ui-warn) !important;
}

/* الدردشة: فقاعات فاتحة بدل البنّي الداكن */
html body .tatwar-chat-panel .tatwar-bubble {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
html body .tatwar-chat-panel .tatwar-bubble.is-mine {
    background: var(--ui-accent-soft) !important;
    border-color: var(--ui-accent-line) !important;
}
html body .tatwar-chat-panel .tatwar-bubble-name {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 0 3px !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--ui-accent) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
}
html body .tatwar-chat-panel .tatwar-bubble-text { color: var(--ui-ink) !important; }
html body .tatwar-chat-panel .tatwar-bubble-time { color: var(--ui-ink-3) !important; font-style: normal !important; }
html body .tatwar-chat-panel .tatwar-chat-compose {
    background: var(--ui-surface) !important;
    border-top: 1px solid var(--ui-line) !important;
}
html body #tatwarChatInput,
html body #tatwarClanChatInput {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line-2) !important;
    border-radius: var(--ui-r-md) !important;
    color: var(--ui-ink) !important;
}
html body #tatwarChatSend,
html body #tatwarClanChatSend {
    border-radius: var(--ui-r-md) !important;
    background: var(--ui-accent) !important;
    color: var(--ui-accent-ink) !important;
}

@media screen and (max-width: 900px) {
    /* الشريط السفلي صار صفاً واحداً؛ الأوراق ترتفع بمقداره فقط */
    html body .mob-panel,
    html body .tatwar-chat-panel,
    html body .mob-overlay { bottom: 70px !important; }
    html body .mob-panel,
    html body .tatwar-chat-panel { max-height: calc(100vh - 82px) !important; }
    html body #vipOperationModal .vip-modal-content,
    html body #latestNewsModal .vip-modal-content { bottom: 70px !important; }
}

/* =============================================================================
   14. الوضع الليلي — يُفعّل بـ data-theme="dark" على وسم html
   الافتراضي يبقى نهارياً؛ الليلي اختيار صريح من اللاعب أو من تفضيل نظامه.
   الصور المرسومة بخلفية بيضاء (المباني، خرائط القرية، الأعلام) توضع على
   «لوح» فاتح ثابت بدل قلب ألوانها، فتبقى واضحة كما هي.
   ========================================================================== */
html[data-theme="dark"] {
    /* أسطح داكنة دافئة تنسجم مع الهيدر والفوتر */
    --ui-bg: #14100d;
    --ui-surface: #1c1712;
    --ui-surface-2: #221c16;
    --ui-surface-3: #2b241c;
    --ui-line: #352d24;
    --ui-line-2: #493d31;

    --ui-ink: #ece3d5;
    --ui-ink-2: #b5a695;
    --ui-ink-3: #8a7c6d;

    --ui-chrome: #100d0a;
    --ui-chrome-2: #17130f;
    --ui-chrome-3: #221b15;
    --ui-chrome-line: rgba(255, 255, 255, .10);
    --ui-chrome-line-2: rgba(255, 255, 255, .20);
    --ui-chrome-ink: #efe6d8;
    --ui-chrome-ink-2: #a8998a;

    --ui-accent: #d98c3a;
    --ui-accent-hover: #e79f52;
    --ui-accent-ink: #1a1108;
    --ui-accent-soft: #2a1d10;
    --ui-accent-line: #56391d;

    --ui-gold: #e0a63c;
    --ui-gold-hover: #edb54e;
    --ui-gold-ink: #201408;

    --ui-ok: #5fc98c;
    --ui-ok-soft: #15271d;
    --ui-ok-line: #274d33;
    --ui-warn: #e5ad4a;
    --ui-warn-soft: #2a2011;
    --ui-warn-line: #4e3a17;
    --ui-danger: #f0776a;
    --ui-danger-soft: #2c1615;
    --ui-danger-line: #582a24;
    --ui-info: #83b2ee;
    --ui-info-soft: #151e2c;
    --ui-info-line: #283a52;

    --ui-plate: #f4efe6;
    --ui-plate-line: #3b3229;

    --ui-shadow-pop: 0 8px 24px rgba(0, 0, 0, .55);

    /* متغيرات الجداول الموروثة من style_global — قلبها هنا يغني عن ملاحقة كل قاعدة */
    --tatwar-table-bg: #1c1712;
    --tatwar-table-alt: #221c16;
    --tatwar-table-border: rgba(255, 255, 255, .10);
    --tatwar-table-head: #100d0a;
    --tatwar-table-text: #ece3d5;
    --tatwar-table-link: #d98c3a;

    color-scheme: dark;
}

/* عناصر النموذج الأصلية تتبع النظام بلا تنسيق إضافي */
html[data-theme="dark"] body input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] body select,
html[data-theme="dark"] body textarea {
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-line-2) !important;
    color: var(--ui-ink) !important;
}
html[data-theme="dark"] body option { background: var(--ui-surface-2); color: var(--ui-ink); }

/* أسطح قديمة كُتبت بأبيض صريح قبل نظام التوكنات */
html[data-theme="dark"] body div#content,
html[data-theme="dark"] body div#content[class],
html[data-theme="dark"] body .contentContainer,
html[data-theme="dark"] body .vip-desktop-layout,
html[data-theme="dark"] body .wrapper { background-color: transparent !important; }

/* قواعد قديمة في allan.css / compact تكتب رمادياً فاتحاً بلا متغير */
html[data-theme="dark"] body #build p,
html[data-theme="dark"] body div#content fieldset,
html[data-theme="dark"] body div#content legend,
html[data-theme="dark"] body div#content .none td,
html[data-theme="dark"] body div#content tr.dark td {
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
}

html[data-theme="dark"] body div#content [style*="background:#fff"],
html[data-theme="dark"] body div#content [style*="background: #fff"],
html[data-theme="dark"] body div#content [style*="background-color:#fff"],
html[data-theme="dark"] body div#content [style*="background-color: #fff"] {
    background-color: var(--ui-surface) !important;
    color: var(--ui-ink) !important;
}

/* بطاقات صفحة الباقات والتحديات كُتبت بألوان صريحة داخل قوالبها */
html[data-theme="dark"] body div#content.plus .tw-card,
html[data-theme="dark"] body div#content.plus .pkg-price,
html[data-theme="dark"] body div#content.plus .tw-prize-board,
html[data-theme="dark"] body .vid-page .vid-card {
    background: var(--ui-surface) !important;
    background-image: none !important;
    color: var(--ui-ink) !important;
}
html[data-theme="dark"] body div#content.plus .package-saving,
html[data-theme="dark"] body .qbadge {
    background: var(--ui-warn-soft) !important;
    color: var(--ui-warn) !important;
}
html[data-theme="dark"] body div#content.plus .package-saving.is-active,
html[data-theme="dark"] body .qcard.is-done .qbadge,
html[data-theme="dark"] body .vid-ok {
    background: var(--ui-ok-soft) !important;
    color: var(--ui-ok) !important;
}
html[data-theme="dark"] body .qcard.is-missed .qbadge {
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink-2) !important;
}
html[data-theme="dark"] body .qcard.is-wait .qbadge {
    background: var(--ui-info-soft) !important;
    color: var(--ui-info) !important;
}
html[data-theme="dark"] body .qstep {
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink) !important;
}
html[data-theme="dark"] body .qstep.locked { color: var(--ui-ink-3) !important; }

/* شات السيرفر — سطح المحادثة والمُدخل */
html[data-theme="dark"] body #chatbox,
html[data-theme="dark"] body #twChat .tw-rules,
html[data-theme="dark"] body #twChat form,
html[data-theme="dark"] body #twChat #usermsg {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
html[data-theme="dark"] body #twChat .y0 .x00 {
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
}

/* جداول وحقول موروثة من allan.css تكتب الأبيض مباشرة بلا متغيّر */
html[data-theme="dark"] body table tbody td,
html[data-theme="dark"] body table tbody th,
html[data-theme="dark"] body table.tbg tr,
html[data-theme="dark"] body .rbg {
    background-color: var(--ui-surface) !important;
    color: var(--ui-ink) !important;
}
html[data-theme="dark"] body table tr.hl td,
html[data-theme="dark"] body table tr.hl th { background-color: var(--ui-surface-3) !important; }

html[data-theme="dark"] body div#content input.text,
html[data-theme="dark"] body div#content input[type="text"],
html[data-theme="dark"] body div#content input[type="number"],
html[data-theme="dark"] body div#content input[type="password"],
html[data-theme="dark"] body div#content textarea,
html[data-theme="dark"] body div#content select,
html[data-theme="dark"] body div.map div#map div#map_coords input.text,
html[data-theme="dark"] body div#content.a2b table.v2v-troops input.text,
html[data-theme="dark"] body div#content.a2b table.v2v-troops input[type="number"] {
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-line-2) !important;
    color: var(--ui-ink) !important;
}

html[data-theme="dark"] body div.map div#map table#map_infobox,
html[data-theme="dark"] body div#map table.default,
html[data-theme="dark"] body div#map table.empty,
html[data-theme="dark"] body div#map table.oasis_empty {
    background: var(--ui-surface) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
}

html[data-theme="dark"] body div#content.a2b .target-section,
html[data-theme="dark"] body .clan-chat-log,
html[data-theme="dark"] body .checkmark {
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
html[data-theme="dark"] body .clan-meta div,
html[data-theme="dark"] body .v2v-stats div,
html[data-theme="dark"] body div#content.a2b #run {
    background: var(--ui-surface-2) !important;
    background-image: none !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
html[data-theme="dark"] body div#content.a2b table.v2v-troops tr:first-child td {
    background: var(--ui-surface-3) !important;
    color: var(--ui-accent) !important;
}
html[data-theme="dark"] body #content a.rp-link b,
html[data-theme="dark"] body a.rp-link b {
    background: var(--ui-accent-soft) !important;
    color: var(--ui-accent) !important;
}

/* دليل اللعبة يحمل لوحته الفاتحة الخاصة في learn.css */
html[data-theme="dark"] body .lg,
html[data-theme="dark"] body .lg-tabs { background: var(--ui-bg) !important; border-color: var(--ui-line) !important; color: var(--ui-ink) !important; box-shadow: none !important; }
html[data-theme="dark"] body .lg-lead,
html[data-theme="dark"] body .lg-card,
html[data-theme="dark"] body .lg-bcard,
html[data-theme="dark"] body .lg-ucard,
html[data-theme="dark"] body .lg-table,
html[data-theme="dark"] body .lg-tab,
html[data-theme="dark"] body .lg-search,
html[data-theme="dark"] body .lg-steps li {
    background: var(--ui-surface) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body .lg-sec h2,
html[data-theme="dark"] body .lg-table th,
html[data-theme="dark"] body .lg-chip,
html[data-theme="dark"] body .lg-res span,
html[data-theme="dark"] body .lg-stat div {
    background: var(--ui-surface-3) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-accent) !important;
}
html[data-theme="dark"] body .lg-tip {
    background: var(--ui-warn-soft) !important;
    border-color: var(--ui-warn-line) !important;
    color: var(--ui-warn) !important;
}

/* -----------------------------------------------------------------------------
   14.1 الرسوم ذات الخلفية البيضاء — لوح فاتح يحافظ على وضوحها
   -------------------------------------------------------------------------- */
html[data-theme="dark"] body div#content.village1 .premium-map-wrapper,
html[data-theme="dark"] body div#content.village2 .premium-map-wrapper,
html[data-theme="dark"] body div#content.map #tm,
html[data-theme="dark"] body div#content.map .map-container,
html[data-theme="dark"] body .tw-plate {
    background: var(--ui-plate) !important;
    border: 1px solid var(--ui-plate-line) !important;
    border-radius: var(--ui-r-lg) !important;
}

html[data-theme="dark"] body div#content.build td.bimg,
html[data-theme="dark"] body div#content.build .build_logo,
html[data-theme="dark"] body div#content .build_logo {
    background: var(--ui-plate) !important;
    border-color: var(--ui-plate-line) !important;
}

/* -----------------------------------------------------------------------------
   14.2 مبدّل الوضع — ثلاث حالات في مفتاح واحد
   -------------------------------------------------------------------------- */
.tw-theme-switch {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    padding: 2px !important;
    border: 1px solid var(--ui-chrome-line) !important;
    border-radius: var(--ui-r-md) !important;
    background: var(--ui-chrome-2) !important;
}
html body .tw-theme-switch button.tw-theme-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    width: 26px !important;
    min-width: 0 !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--ui-r-xs) !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--ui-chrome-ink-2) !important;
    font-size: 12px !important;
    line-height: 1 !important;
    cursor: pointer;
}
header#premiumHeader .tw-theme-switch .tw-theme-switch-text { display: none !important; }
html body .tw-theme-switch button.tw-theme-btn:hover { color: var(--ui-chrome-ink) !important; background: var(--ui-chrome-3) !important; }
html body .tw-theme-switch button.tw-theme-btn[aria-pressed="true"] {
    background: var(--ui-chrome-3) !important;
    color: var(--ui-gold) !important;
    box-shadow: inset 0 0 0 1px var(--ui-chrome-line-2) !important;
}

/* داخل الدرج المتنقّل السطح فاتح، فيتبع المفتاح ألوان المحتوى */
.premium-more-body .tw-theme-switch {
    width: 100% !important;
    border-color: var(--ui-line) !important;
    background: var(--ui-surface-2) !important;
}
html body .premium-more-body .tw-theme-switch button.tw-theme-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    height: 30px !important;
    min-height: 30px !important;
    gap: 6px !important;
    color: var(--ui-ink-2) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
}
html body .premium-more-body .tw-theme-switch button.tw-theme-btn:hover { background: var(--ui-surface-3) !important; color: var(--ui-ink) !important; }
html body .premium-more-body .tw-theme-switch button.tw-theme-btn[aria-pressed="true"] {
    background: var(--ui-surface) !important;
    color: var(--ui-accent) !important;
    box-shadow: inset 0 0 0 1px var(--ui-line-2) !important;
}

@media screen and (max-width: 900px) {
    header#premiumHeader .tw-theme-switch { display: none !important; }
}

/* =============================================================================
   15. صفحات المباني والجداول القديمة — نفس التوكنات في الوضعين
   ========================================================================== */
div#content.build table.build_details,
div#content.build table#contract,
div#content.build table,
html body div#content table.build_details {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-lg) !important;
    color: var(--ui-ink) !important;
}
div#content.build table thead td,
div#content.build table thead th,
div#content.build table.build_details thead td,
div#content.build table.build_details thead th {
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink) !important;
    border-color: var(--ui-line) !important;
    font-weight: 700 !important;
}
div#content.build table tbody td,
div#content.build table.build_details tbody td {
    background: var(--ui-surface) !important;
    color: var(--ui-ink) !important;
    border-color: var(--ui-line) !important;
}
div#content.build .none,
div#content.build span.none {
    background: transparent !important;
    color: var(--ui-danger) !important;
}
div#content.build h1,
div#content.build #build h1 {
    color: var(--ui-ink) !important;
    background: transparent !important;
    border: 0 !important;
}

html body header.topbar .tw-theme-switch-text,
html body .tw-header .tw-theme-switch-text,
html body .public-game-nav .tw-theme-switch-text {
    display: none !important;
}

/* =============================================================================
   16. توحيد كل الصفحات وكل التبويبات — يغلب allan.css وtatwar والستايل داخل الصفحات
   ========================================================================== */
html body #content:not(.reports):not(.messages):not(.map) table thead td,
html body #content:not(.reports):not(.messages):not(.map) table thead th,
html body #content:not(.reports):not(.messages):not(.map) table tfoot td,
html body #content:not(.reports):not(.messages):not(.map) table tfoot th,
html body #content:not(.reports):not(.messages):not(.map) table tbody > tr:first-child > th,
html body div#content table thead th,
html body div#content table thead td,
html body div#content table th,
html body div#content.statistics table th,
html body div#content.statistics table thead td,
html body div#content.statistics table#alliance thead th,
html body div#content.statistics table#alliance thead td,
html body div#content.statistics table#player thead th,
html body div#content.statistics table#villages thead th,
html body div#content.player table th,
html body div#content.player table thead th,
html body div#content.player table thead td,
html body div#content.plus table th,
html body div#content.plus table thead th,
html body div#content.plus table thead td,
html body div#content.plus .vault-table th,
html body div#content.plus .vault-table thead th,
html body div#content.alliance table th,
html body div#content.alliance table thead th,
html body div#content.alliance table thead td,
html body div#content.build table th,
html body div#content.build table thead th,
html body div#content.a2b table th,
html body div#content.a2b table thead th,
html body div#content.forum table thead th,
html body div#content.messages table thead th,
html body div#content.reports table thead th,
html body div#content .rbg,
html body table.tbg thead th,
html body table.tbg thead td {
    background: var(--ui-surface-3) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--ui-ink-2) !important;
    text-shadow: none !important;
    font-weight: 700 !important;
    border-color: var(--ui-line) !important;
}

html body.vip-enhanced-body div#content.player > h1,
html body.vip-enhanced-body div#content.plus > h1,
html body.vip-enhanced-body div#content.alliance > h1,
html body.vip-enhanced-body div#content.statistics > h1,
html body.vip-enhanced-body div#content.build > h1,
html body.vip-enhanced-body div#content.a2b > h1 {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    text-shadow: none !important;
}

html body.vip-enhanced-body div#content .rpt-tabs,
html body.vip-enhanced-body div#content .msg-tabs,
html body.vip-enhanced-body div#content .support-tabs,
html body.vip-enhanced-body div#content .train-tabs,
html body.vip-enhanced-body div#content .farm-navigation,
html body.vip-enhanced-body div#content .qtabs,
html body.vip-enhanced-body div#content .stats-nav,
html body.vip-enhanced-body div#content .stats-subnav,
html body.vip-enhanced-body div#content .manual-tabs,
html body.vip-enhanced-body div#content .lg-tabs,
html body.vip-enhanced-body div#content .plus-tabs,
html body.vip-enhanced-body div#content .unified-tabs,
html body.vip-enhanced-body div#content .md-tabs,
html body.vip-enhanced-body div#content #textmenu,
html body.vip-enhanced-body div#content.player #textmenu,
html body.vip-enhanced-body div#content.a2b #textmenu,
html body.vip-enhanced-body div#content.alliance #textmenu,
html body.vip-enhanced-body div#content .clan-sub,
html body.vip-enhanced-body div#content .profile-nav,
html body.vip-enhanced-body div#content .rp-nav,
html body.vip-enhanced-body div#content .rp-filters,
html body.vip-enhanced-body div#content .tw-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: var(--ui-1) !important;
    margin: 0 0 var(--ui-2) !important;
    padding: var(--ui-1) !important;
    background: var(--ui-surface-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-xl) !important;
    box-shadow: none !important;
}

html body.vip-enhanced-body div#content .rpt-tab,
html body.vip-enhanced-body div#content .msg-tab,
html body.vip-enhanced-body div#content .support-tab,
html body.vip-enhanced-body div#content .train-tabs a,
html body.vip-enhanced-body div#content .farm-nav-btn,
html body.vip-enhanced-body div#content .qtab,
html body.vip-enhanced-body div#content .lg-tab,
html body.vip-enhanced-body div#content .stats-nav a,
html body.vip-enhanced-body div#content .stats-subnav a,
html body.vip-enhanced-body div#content .manual-tabs a,
html body.vip-enhanced-body div#content .lg-tabs a,
html body.vip-enhanced-body div#content .plus-tabs a,
html body.vip-enhanced-body div#content a.plus-tab,
html body.vip-enhanced-body div#content .unified-tab,
html body.vip-enhanced-body div#content .md-tab-link,
html body.vip-enhanced-body div#content #textmenu a,
html body.vip-enhanced-body div#content.player #textmenu a,
html body.vip-enhanced-body div#content.a2b #textmenu a,
html body.vip-enhanced-body div#content.alliance #textmenu a,
html body.vip-enhanced-body div#content .clan-sub-link,
html body.vip-enhanced-body div#content .profile-nav-link,
html body.vip-enhanced-body div#content a.rp-link,
html body.vip-enhanced-body #content a.rp-link,
html body.vip-enhanced-body div#content .tw-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: var(--ui-h-md) !important;
    min-height: var(--ui-h-md) !important;
    padding: 0 var(--ui-3) !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    color: var(--ui-ink-2) !important;
    font-family: var(--ui-font) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    text-shadow: none !important;
}

html body.vip-enhanced-body div#content .rpt-tab:hover,
html body.vip-enhanced-body div#content .msg-tab:hover,
html body.vip-enhanced-body div#content .farm-nav-btn:hover,
html body.vip-enhanced-body div#content .stats-nav a:hover,
html body.vip-enhanced-body div#content .stats-subnav a:hover,
html body.vip-enhanced-body div#content .plus-tabs a:hover,
html body.vip-enhanced-body div#content a.plus-tab:hover,
html body.vip-enhanced-body div#content #textmenu a:hover,
html body.vip-enhanced-body div#content.player #textmenu a:hover,
html body.vip-enhanced-body div#content.a2b #textmenu a:hover,
html body.vip-enhanced-body div#content a.rp-link:hover,
html body.vip-enhanced-body #content a.rp-link:hover {
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink) !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

html body.vip-enhanced-body div#content .rpt-tab.selected,
html body.vip-enhanced-body div#content .msg-tab.selected,
html body.vip-enhanced-body div#content .support-tab.selected,
html body.vip-enhanced-body div#content .support-tab.is-on,
html body.vip-enhanced-body div#content .farm-nav-btn.active,
html body.vip-enhanced-body div#content .qtab.on,
html body.vip-enhanced-body div#content .lg-tab.on,
html body.vip-enhanced-body div#content .stats-nav a.selected,
html body.vip-enhanced-body div#content .stats-nav a.is-on,
html body.vip-enhanced-body div#content .stats-subnav a.is-on,
html body.vip-enhanced-body div#content .stats-subnav a.selected,
html body.vip-enhanced-body div#content .plus-tabs a.is-on,
html body.vip-enhanced-body div#content .plus-tabs a.selected,
html body.vip-enhanced-body div#content a.plus-tab.selected,
html body.vip-enhanced-body div#content #textmenu a.selected,
html body.vip-enhanced-body div#content.player #textmenu a.selected,
html body.vip-enhanced-body div#content.a2b #textmenu a.selected,
html body.vip-enhanced-body div#content.alliance #textmenu a.selected,
html body.vip-enhanced-body div#content .clan-sub-link.is-on,
html body.vip-enhanced-body div#content .profile-nav-link.is-on,
html body.vip-enhanced-body div#content a.rp-link.is-on,
html body.vip-enhanced-body #content a.rp-link.is-on,
html body.vip-enhanced-body div#content .tw-tab.is-on {
    background: var(--ui-surface) !important;
    color: var(--ui-accent) !important;
    font-weight: 700 !important;
    border: 0 !important;
    box-shadow: inset 0 -2px 0 var(--ui-accent) !important;
    transform: none !important;
}

html body.vip-enhanced-body div#content a.rp-link b,
html body.vip-enhanced-body #content a.rp-link b {
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink-2) !important;
    border-radius: var(--ui-r-xs) !important;
}
html body.vip-enhanced-body div#content a.rp-link.is-on b,
html body.vip-enhanced-body #content a.rp-link.is-on b {
    background: var(--ui-accent-soft) !important;
    color: var(--ui-accent) !important;
}

html body.vip-enhanced-body div#content #search_navi,
html body.vip-enhanced-body div#content table#search_navi {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content #search_navi td,
html body.vip-enhanced-body div#content table#search_navi td,
html body.vip-enhanced-body div#content table#search_navi th {
    background: transparent !important;
    background-image: none !important;
    color: var(--ui-ink-2) !important;
    border: 0 !important;
}

/* شريط n1–n5 قطعة واحدة: صندوق = سبرايت 70×67، بدون قص دائري */
html body.vip-enhanced-body #header #mtop,
html body.rtl-layout #header #mtop,
html body.ltr-layout #header #mtop,
html body.tatwar-compact-ui #header #mtop {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    column-gap: 0 !important;
    width: 350px !important;
    max-width: 350px !important;
    height: 67px !important;
    min-height: 67px !important;
    padding: 0 !important;
    margin: 4px auto !important;
}
html body.vip-enhanced-body #header #mtop > a.header-icon,
html body.vip-enhanced-body #header #mtop > a.header-icon img,
html body.vip-enhanced-body #header #mtop > div#n5,
html body.rtl-layout #header #mtop > a.header-icon,
html body.rtl-layout #header #mtop > a.header-icon img,
html body.rtl-layout #header #mtop > div#n5,
html body.tatwar-compact-ui #header #mtop > a.header-icon,
html body.tatwar-compact-ui #header #mtop > a.header-icon img,
html body.tatwar-compact-ui #header #mtop > div#n5,
html body.vip-enhanced-body #header #mtop #n5 {
    flex: 0 0 70px !important;
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    height: 67px !important;
    min-height: 67px !important;
    max-height: 67px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    clip-path: none !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body #header #mtop > a.header-icon,
html body.vip-enhanced-body #header #mtop > a.header-icon img {
    overflow: hidden !important;
}
html body.vip-enhanced-body #header #mtop > div#n5 {
    overflow: visible !important;
}

/* صفحة البناء — نفس توكنات الثيم، الذهب للزر الرئيسي فقط */
html body.vip-enhanced-body div#content.build,
html body.vip-enhanced-body div#content.build #build {
    background: var(--ui-surface) !important;
    background-image: none !important;
    color: var(--ui-ink) !important;
    border-color: var(--ui-line) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content.build #build.gid0 > h2 {
    margin: var(--ui-2) 0 0 !important;
    padding: 8px var(--ui-3) 0 !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    border-bottom: 0 !important;
    border-radius: var(--ui-r-lg) var(--ui-r-lg) 0 0 !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
}
html body.vip-enhanced-body div#content.build table.new_building {
    margin: 0 0 var(--ui-3) !important;
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    border-top: 0 !important;
    border-radius: 0 0 var(--ui-r-lg) var(--ui-r-lg) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content.build .build-ux-note,
html body.vip-enhanced-body div#content.build .build-empty-guidance {
    background: var(--ui-warn-soft) !important;
    border: 1px solid var(--ui-warn-line) !important;
    color: var(--ui-warn) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content.build a.build,
html body.vip-enhanced-body div#content.build table.new_building td.link a.build,
html body.vip-enhanced-body div#content.build p#contract a.build {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 110px !important;
    height: var(--ui-h-sm) !important;
    padding: 0 14px !important;
    border-radius: var(--ui-r-md) !important;
    background: var(--ui-gold) !important;
    border: 1px solid var(--ui-gold) !important;
    color: var(--ui-gold-ink) !important;
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
    font-weight: 700 !important;
}
html body.vip-enhanced-body div#content.build a.build:hover,
html body.vip-enhanced-body div#content.build table.new_building td.link a.build:hover,
html body.vip-enhanced-body div#content.build p#contract a.build:hover {
    background: var(--ui-gold-hover) !important;
    border-color: var(--ui-gold-hover) !important;
    color: var(--ui-gold-ink) !important;
    filter: none !important;
    transform: none !important;
}
html body.vip-enhanced-body div#content.build .build_logo,
html body.vip-enhanced-body div#content.build table.new_building td.bimg a {
    background: var(--ui-plate) !important;
    border: 1px solid var(--ui-plate-line) !important;
}
html body #vipMainContent #enhancedResourcesBar.enhanced-resources-container {
    max-width: none !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
}
html body #vipMainContent #enhancedResourcesBar .enhanced-resources-grid {
    gap: 4px !important;
    padding: 0 !important;
}

/* طابور البناء — الشارة لا تطغى على زر الإنهاء، والجدول لا ينسحب فوق خريطة القرية */
html body.vip-enhanced-body div#content.build table#building_contract thead th {
    height: auto !important;
    overflow: visible !important;
    padding: 8px 10px !important;
}
html body.vip-enhanced-body div#content.build .tw-queue-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
html body.vip-enhanced-body div#content.build .tw-queue-hint,
html body.vip-enhanced-body table#building_contract .tw-queue-hint {
    display: block !important;
    position: static !important;
    width: fit-content !important;
    max-width: 100% !important;
    margin: 6px 0 0 !important;
    padding: 3px 8px !important;
    background: var(--ui-warn-soft) !important;
    border: 1px solid var(--ui-warn-line) !important;
    border-radius: var(--ui-r-md) !important;
    color: var(--ui-warn) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}
html body div#content.village1 table#building_contract,
html body div#content.village2 table#building_contract {
    position: relative !important;
    z-index: 1 !important;
    margin: 12px 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* =============================================================================
   17. صفحات فاتت التحديث — غطاء واحد للجلد المتبقي
   ========================================================================== */
html body.vip-enhanced-body div#content.warsim > h1,
html body.vip-enhanced-body div#content.map > h1,
html body.vip-enhanced-body div#content.manual > h1,
html body.vip-enhanced-body div#content.payment > h1,
html body.vip-enhanced-body div#content.cropfinder > h1,
html body.vip-enhanced-body div#content.village1 > h1,
html body.vip-enhanced-body div#content.village2 > h1,
html body.vip-enhanced-body div#content.village3 > h1,
html body.vip-enhanced-body div#content.forum > h1,
html body.vip-enhanced-body div#content.login > h1,
html body.vip-enhanced-body div#content.logout > h1,
html body.vip-enhanced-body div#content.help > h1 {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    text-shadow: none !important;
}

html body div#content.warsim table th,
html body div#content.warsim table thead th,
html body div#content.warsim table thead td,
html body div#content.payment table th,
html body div#content.payment table thead th,
html body div#content.map table th,
html body div#content.map table thead th,
html body div#content.map table thead td,
html body div#content.manual table th,
html body div#content.cropfinder table th,
html body div#content.cropfinder table thead th,
html body div#content.village3 table th,
html body div#content.village3 table thead th,
html body div#content.village1 table th,
html body div#content.village2 table th,
html body div#content.forum table th,
html body div#content.login table th {
    background: var(--ui-surface-3) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--ui-ink-2) !important;
    text-shadow: none !important;
    font-weight: 700 !important;
    border-color: var(--ui-line) !important;
}

/* دليل اللعبة — كان داكناً بذهبي صريح */
html body.vip-enhanced-body div#content .manual-page,
html body.vip-enhanced-body div#content .manual-page .lead,
html body.vip-enhanced-body div#content .manual-page .manual-note,
html body.vip-enhanced-body div#content .manual-page .manual-card li,
html body.vip-enhanced-body div#content .manual-page .manual-art span {
    color: var(--ui-ink) !important;
}
html body.vip-enhanced-body div#content .manual-page h1,
html body.vip-enhanced-body div#content .manual-page .manual-card h2,
html body.vip-enhanced-body div#content .manual-page .manual-card b,
html body.vip-enhanced-body div#content .manual-page .manual-art b {
    color: var(--ui-ink) !important;
    background: transparent !important;
}
html body.vip-enhanced-body div#content .manual-card,
html body.vip-enhanced-body div#content .manual-art {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content .manual-tabs,
html body.vip-enhanced-body div#content .manual-links {
    background: transparent !important;
}
html body.vip-enhanced-body div#content .manual-tabs a,
html body.vip-enhanced-body div#content .manual-links a {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink-2) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content .manual-tabs a.is-on,
html body.vip-enhanced-body div#content .manual-tabs a:hover,
html body.vip-enhanced-body div#content .manual-links a:hover {
    background: var(--ui-surface) !important;
    color: var(--ui-accent) !important;
    border-color: var(--ui-line-2) !important;
}

/* أسئلة وأجوبة — كانت بنية داكنة */
html body.vip-enhanced-body div#content.plus .faq-hero,
html body.vip-enhanced-body div#content.plus .faq-group,
html body.vip-enhanced-body div#content.plus .faq-item {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content.plus .faq-hero h1,
html body.vip-enhanced-body div#content.plus .faq-group h2,
html body.vip-enhanced-body div#content.plus .faq-item summary,
html body.vip-enhanced-body div#content.plus .faq-a,
html body.vip-enhanced-body div#content.plus .faq-a b,
html body.vip-enhanced-body div#content.plus .faq-hero p {
    color: var(--ui-ink) !important;
    background: transparent !important;
}
html body.vip-enhanced-body div#content.plus .faq-group h2 {
    background: var(--ui-surface-2) !important;
    border-bottom: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
html body.vip-enhanced-body div#content.plus a.faq-jump-btn {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink-2) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content.plus a.faq-link {
    color: var(--ui-accent) !important;
}
html body.vip-enhanced-body div#content.plus .faq-item summary:after {
    color: var(--ui-ink-3) !important;
}

/* قوانين — حبر الثيم */
html body.vip-enhanced-body .terms-page,
html body.vip-enhanced-body .terms-page h1,
html body.vip-enhanced-body .terms-page h3,
html body.vip-enhanced-body .terms-page h4 {
    color: var(--ui-ink) !important;
}
html body.vip-enhanced-body .terms-nav a {
    color: var(--ui-accent) !important;
}

/* أكاديمية تاتوار — كانت كريم/ذهبي قديم */
html body.vip-enhanced-body div#content .lg {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content .lg-hero {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
html body.vip-enhanced-body div#content .lg-hero h1,
html body.vip-enhanced-body div#content .lg-hero p,
html body.vip-enhanced-body div#content .lg-hero b,
html body.vip-enhanced-body div#content .lg-kpi,
html body.vip-enhanced-body div#content .lg-kpi b,
html body.vip-enhanced-body div#content .lg-kpi span {
    color: var(--ui-ink) !important;
    background: transparent !important;
}
html body.vip-enhanced-body div#content .lg-kpi {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
}
html body.vip-enhanced-body div#content .lg-tabs {
    background: var(--ui-surface-2) !important;
}
html body.vip-enhanced-body div#content .lg-tab {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--ui-ink-2) !important;
    border-radius: var(--ui-r-md) !important;
}
html body.vip-enhanced-body div#content .lg-tab.on {
    background: var(--ui-surface) !important;
    color: var(--ui-accent) !important;
    border: 0 !important;
    box-shadow: inset 0 -2px 0 var(--ui-accent) !important;
}
html body.vip-enhanced-body div#content .lg-sec h2,
html body.vip-enhanced-body div#content .lg-h3 {
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink) !important;
    border-color: var(--ui-accent) !important;
}
html body.vip-enhanced-body div#content .lg-lead,
html body.vip-enhanced-body div#content .lg-card,
html body.vip-enhanced-body div#content .lg-bcard,
html body.vip-enhanced-body div#content .lg-ucard,
html body.vip-enhanced-body div#content .lg-steps li,
html body.vip-enhanced-body div#content .lg-table {
    background: var(--ui-surface) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content .lg-card h3,
html body.vip-enhanced-body div#content .lg-card h4,
html body.vip-enhanced-body div#content .lg-bcard h4,
html body.vip-enhanced-body div#content .lg-ucard h4,
html body.vip-enhanced-body div#content .lg-table th,
html body.vip-enhanced-body div#content .lg a {
    color: var(--ui-ink) !important;
}
html body.vip-enhanced-body div#content .lg a {
    color: var(--ui-accent) !important;
}
html body.vip-enhanced-body div#content .lg-chip,
html body.vip-enhanced-body div#content .lg-res span,
html body.vip-enhanced-body div#content .lg-stat div {
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink-2) !important;
}
html body.vip-enhanced-body div#content .lg-tip {
    background: var(--ui-warn-soft) !important;
    border: 1px solid var(--ui-warn-line) !important;
    color: var(--ui-warn) !important;
}
html body.vip-enhanced-body div#content .lg-bcard img.building,
html body.vip-enhanced-body div#content .lg-ucard .lg-big {
    background-color: var(--ui-plate) !important;
}

/* شات التحالف — كان أخضر ترافيان */
html body.vip-enhanced-body #content #chatbox,
html body.vip-enhanced-body #chatbox {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
    border-radius: var(--ui-r-lg) !important;
}
html body.vip-enhanced-body #content #usermsg,
html body.vip-enhanced-body #usermsg {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
}

/* نقطة التجمع */
html body.vip-enhanced-body #build.gid16 h4,
html body.vip-enhanced-body div#content.build #build.gid16 h4 {
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink) !important;
    border: 1px solid var(--ui-line) !important;
}
html body.vip-enhanced-body #build.gid16 table.troop_details,
html body.vip-enhanced-body #build.gid16 table.troop_details td,
html body.vip-enhanced-body #build.gid16 table.troop_details th {
    background: var(--ui-surface) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
html body.vip-enhanced-body #build.gid16 table.troop_details thead td,
html body.vip-enhanced-body #build.gid16 table.troop_details thead th {
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink-2) !important;
}

/* الخريطة */
html body.vip-enhanced-body div#content .map-ux-card {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content a.map-new-link {
    background: var(--ui-accent) !important;
    color: var(--ui-accent-ink) !important;
    border: 1px solid var(--ui-accent) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ختم المسيرة في الملف */
html body.vip-enhanced-body div#content .career-seal {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content .career-level {
    background: var(--ui-accent-soft) !important;
    color: var(--ui-accent) !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body div#content .career-who h3,
html body.vip-enhanced-body div#content .career-who p,
html body.vip-enhanced-body div#content .career-uid,
html body.vip-enhanced-body div#content .career-uid b,
html body.vip-enhanced-body div#content .career-uid em,
html body.vip-enhanced-body div#content .career-uid small {
    color: var(--ui-ink) !important;
}
html body.vip-enhanced-body div#content .career-uid {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
}
html body.vip-enhanced-body div#content .career-chip.flat {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink-2) !important;
}

/* إلغاء أزرار الروابط البنية المنسوخة على الصفحات المتبقية */
html body.vip-enhanced-body #content a:not(table a):not(#mtop a):not(.vip-logo a):not(.vipCustomSilver):not(.vipCustomGold):not(.vip-logout-btn):not(.vip-mobile-link):not(.header-icon):not(.build):not(.rpt-tab):not(.msg-tab):not(.plus-tab):not(.support-tab):not(.farm-nav-btn):not(.lg-tab):not(.clan-sub-link):not(.profile-nav-link):not(.rp-link):not(.map-new-link):not(.package-buy-btn):not(.tw-buy):not(.tw-btn):not(.stats-tab) {
    background-image: none !important;
}
html body.vip-enhanced-body #content a:not(table a):not(#mtop a):not(.vip-logo a):not(.vipCustomSilver):not(.vipCustomGold):not(.vip-logout-btn):not(.vip-mobile-link):not(.header-icon):not(.build):not(.rpt-tab):not(.msg-tab):not(.plus-tab):not(.support-tab):not(.farm-nav-btn):not(.lg-tab):not(.clan-sub-link):not(.profile-nav-link):not(.rp-link):not(.map-new-link):not(.package-buy-btn):not(.tw-buy):not(.tw-btn):not(.btn):not(.stats-tab):not([class]) {
    background: transparent !important;
    color: var(--ui-accent) !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 0 !important;
    display: inline !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* الهدية — كانت بلا جلد */
html body.vip-enhanced-body div#content.plus h1,
html body.vip-enhanced-body div#content .timeAgo {
    color: var(--ui-ink) !important;
}

/* =============================================================================
   قفل أخير: فوتر الجوال + رابط الحقوق + طابور البناء
   يُلغي التداخل بين شريط الحقوق / الحماية / الاختصارات المثبتة
   ========================================================================== */
html body.vip-enhanced-body .mobile-protection-bar,
html body.vip-enhanced-body #mobileProtBar {
    display: none !important;
}
html body.vip-enhanced-body #enhancedResourcesBar .resource-item .enhanced-resources-number {
    color: var(--ui-ink) !important;
    background: linear-gradient(var(--fill-dir, to left), var(--tank, #cbb48a) var(--fill), var(--ui-surface-3) var(--fill)) !important;
}
html body.vip-enhanced-body #enhancedResourcesBar .resource-item .enhanced-resources-number::before,
html body.vip-enhanced-body #enhancedResourcesBar .resource-item .enhanced-resources-number::after {
    content: none !important;
    display: none !important;
}
html body.vip-enhanced-body #vipProfessionalFooter {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--ui-surface) !important;
    border: 0 !important;
    box-shadow: none !important;
}
html body.vip-enhanced-body #vipProfessionalFooter .footer-reit-text a,
html body.vip-enhanced-body #vipProfessionalFooter .footer-reit-text a:hover {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--ui-gold) !important;
    font-size: inherit !important;
    line-height: inherit !important;
    text-decoration: none !important;
}
html body.vip-enhanced-body .tw-mobile-queue {
    margin: 8px 0 14px !important;
}
html body.vip-enhanced-body .tw-mobile-queue .premium-rpg-card {
    margin-bottom: 0 !important;
}

@media screen and (min-width: 1200px) {
    html body.vip-enhanced-body #vipProfessionalFooter .footer-operations-section {
        display: none !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-reit-bar {
        display: flex !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media screen and (max-width: 1199px) {
    html body.vip-enhanced-body,
    html body.tatwar-kingdom-hud,
    html body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter {
        padding-bottom: 0 !important;
        background: transparent !important;
        border: 0 !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-reit-bar,
    html body.vip-enhanced-body #vipProfessionalFooter .footer-prot-wrap,
    html body.vip-enhanced-body #vipProfessionalFooter .footer-protection-badge {
        display: none !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-ops-grid.footer-ops-secondary {
        display: none !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-operations-section {
        display: block !important;
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        z-index: 9990 !important;
        padding: 6px 8px 8px !important;
        background: var(--ui-surface) !important;
        background-image: none !important;
        border: 1px solid var(--ui-line) !important;
        border-radius: 18px !important;
        box-shadow: 0 8px 24px rgba(42, 22, 13, .14) !important;
        overflow: visible !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-ops-grid {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        width: 100% !important;
        margin: 0 !important;
        gap: 0 !important;
        overflow: visible !important;
        direction: rtl !important;
        justify-items: center !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn {
        width: 100% !important;
        min-height: 44px !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        color: var(--ui-ink-2) !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn i {
        color: var(--ui-ink-2) !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn.is-on {
        background: transparent !important;
        border: 0 !important;
        color: var(--ui-accent) !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn.is-on .footer-op-ico {
        background: var(--ui-accent-soft) !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn.is-on i {
        color: var(--ui-accent) !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn.is-attack,
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn.is-attack.is-on {
        background: transparent !important;
        border: 0 !important;
        color: var(--ui-danger) !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn.is-attack .footer-op-ico,
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn.is-attack.is-on .footer-op-ico {
        background: var(--ui-danger-soft) !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn.is-attack i,
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-btn.is-attack.is-on i {
        color: var(--ui-danger) !important;
        opacity: 1;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-ico {
        overflow: visible !important;
        width: 32px !important;
        height: 28px !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-badge {
        position: absolute !important;
        top: -7px !important;
        inset-inline-start: auto !important;
        inset-inline-end: -8px !important;
        width: 20px !important;
        min-width: 20px !important;
        height: 20px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        line-height: 1 !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-badge.is-wide {
        width: auto !important;
        padding: 0 5px !important;
        border-radius: 999px !important;
    }
    html body.vip-enhanced-body #vipProfessionalFooter .footer-op-badge[hidden] {
        display: none !important;
    }
    /* البناء والتحركات تحت الدائرة مكررة: الفوتر فيه تحركات، والمبنى يُفتح من الخريطة */
    html body.vip-enhanced-body #map_details.premium-mobile-only,
    html body.vip-enhanced-body #movements-card,
    html body.vip-enhanced-body #contracts-card,
    html body.vip-enhanced-body #troops-card,
    html body.vip-enhanced-body div#content.village1 .tw-mobile-queue,
    html body.vip-enhanced-body div#content.village2 .tw-mobile-queue {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* دائرة الحقول/القرية في منتصف الشاشة — بدون float يمين من allan.css */
    html body div#content.village1,
    html body div#content.village2 {
        overflow-x: hidden !important;
    }
    html body div#content.village1 .premium-map-wrapper,
    html body div#content.village2 .premium-map-wrapper {
        float: none !important;
        display: block !important;
        position: relative !important;
        right: auto !important;
        left: -22px !important;
        top: 16px !important;
        margin: 0 auto 20px !important;
        max-width: 100% !important;
        direction: ltr;
        text-align: center;
    }
    html body div#content.village1 div#village_map,
    html body div#content.village2 .village2-map-scale,
    html body div#content.village2 div#village_map {
        float: none !important;
        display: block !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    html body div#content.village2 .village2-map-scale {
        transform-origin: top center !important;
    }
}

html body.vip-enhanced-body header#premiumHeader .premium-logo-mark,
html body.vip-enhanced-body header#premiumHeader .premium-logo-mark img {
    border-radius: 50% !important;
}
html body.vip-enhanced-body header#premiumHeader .premium-logo-mark img {
    transform: none !important;
    object-fit: cover !important;
}

/* =============================================================================
   17. الإحصائيات — أزرار التبويب على الجوال أوضح ومنفصلة بالمجموعة
   قواعد التبويب العامة أعلاه تلغي الحدود؛ هنا نرجّع شكل الزر.
   ========================================================================== */
html body.vip-enhanced-body div#content.statistics .stats-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 6px !important;
    margin: 0 0 var(--ui-2) !important;
    padding: 8px !important;
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-xl) !important;
    overflow: visible !important;
}
html body.vip-enhanced-body div#content.statistics .stats-nav-row,
html body.vip-enhanced-body div#content.statistics .stats-nav-row.is-second {
    display: contents !important;
}
html body.vip-enhanced-body div#content.statistics .stats-nav a,
html body.vip-enhanced-body div#content.statistics .stats-nav a:hover,
html body.vip-enhanced-body div#content.statistics .stats-nav a.selected,
html body.vip-enhanced-body div#content.statistics .stats-nav a.is-on {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    flex: 1 1 auto !important;
    min-width: 96px !important;
    height: auto !important;
    min-height: 36px !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-md) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap;
}
html body.vip-enhanced-body div#content.statistics .stats-nav a:hover {
    background: var(--ui-surface-3) !important;
    border-color: var(--ui-line-2) !important;
    color: var(--ui-ink) !important;
}
html body.vip-enhanced-body div#content.statistics .stats-nav a.selected,
html body.vip-enhanced-body div#content.statistics .stats-nav a.is-on {
    background: var(--ui-accent-soft) !important;
    border-color: var(--ui-accent-line) !important;
    color: var(--ui-accent) !important;
    box-shadow: none !important;
}

html body.vip-enhanced-body div#content.statistics .stats-subnav {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin: 0 0 var(--ui-2) !important;
    padding: 10px 12px !important;
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-xl) !important;
    overflow: visible !important;
}
html body.vip-enhanced-body div#content.statistics .stats-subnav-label {
    display: block !important;
    width: 100% !important;
    margin: 2px 0 0 !important;
    color: var(--ui-ink-3) !important;
    font-size: var(--ui-fs-xs) !important;
    font-weight: 700 !important;
}
html body.vip-enhanced-body div#content.statistics .stats-subnav-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 6px !important;
}
html body.vip-enhanced-body div#content.statistics .stats-subnav a,
html body.vip-enhanced-body div#content.statistics .stats-subnav a:hover,
html body.vip-enhanced-body div#content.statistics .stats-subnav a.is-on,
html body.vip-enhanced-body div#content.statistics .stats-subnav a.selected {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 34px !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-sm) !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-size: var(--ui-fs-sm) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap;
}
html body.vip-enhanced-body div#content.statistics .stats-subnav a:hover {
    background: var(--ui-surface-3) !important;
    border-color: var(--ui-line-2) !important;
    color: var(--ui-ink) !important;
}
html body.vip-enhanced-body div#content.statistics .stats-subnav a.is-on,
html body.vip-enhanced-body div#content.statistics .stats-subnav a.selected {
    background: var(--ui-accent-soft) !important;
    border-color: var(--ui-accent-line) !important;
    color: var(--ui-accent) !important;
    box-shadow: none !important;
}

@media screen and (max-width: 900px) {
    html body.vip-enhanced-body div#content.statistics .stats-hero {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        padding: 6px 8px !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-hero-chip {
        height: auto !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        color: var(--ui-ink-3) !important;
        font-size: 11px !important;
        font-weight: 400 !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-nav,
    html body.vip-enhanced-body div#content.statistics .stats-subnav {
        direction: rtl !important;
        box-sizing: border-box !important;
        width: 100% !important;
        margin-inline: 0 !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-nav {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        justify-content: stretch !important;
        align-items: stretch !important;
        gap: 6px !important;
        padding: 6px !important;
        width: 100% !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-nav-row,
    html body.vip-enhanced-body div#content.statistics .stats-nav-row.is-second {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: stretch !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 6px !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-nav a,
    html body.vip-enhanced-body div#content.statistics .stats-nav a:hover,
    html body.vip-enhanced-body div#content.statistics .stats-nav a.selected,
    html body.vip-enhanced-body div#content.statistics .stats-nav a.is-on {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 32px !important;
        height: 32px !important;
        padding: 0 4px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        line-height: 1 !important;
        text-align: center !important;
        justify-content: center !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    html body.vip-enhanced-body div#content.statistics .stats-nav a i,
    html body.vip-enhanced-body div#content.statistics .stats-subnav a i {
        display: none !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav {
        padding: 8px !important;
        gap: 8px !important;
        align-items: stretch !important;
        width: 100% !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav-label {
        text-align: start !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: stretch !important;
        gap: 6px !important;
        width: 100% !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav-row.is-rank {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        flex-wrap: unset !important;
        width: 100% !important;
        gap: 6px !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav-row.is-rank a {
        flex: none !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav-label {
        display: none !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav-row:has(> :nth-child(5)),
    html body.vip-enhanced-body div#content.statistics .stats-subnav-row.is-tribes {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        flex-wrap: unset !important;
        width: 100% !important;
        gap: 6px !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav-row:has(> :nth-child(5)) a,
    html body.vip-enhanced-body div#content.statistics .stats-subnav-row.is-tribes a {
        flex: none !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav a,
    html body.vip-enhanced-body div#content.statistics .stats-subnav a:hover,
    html body.vip-enhanced-body div#content.statistics .stats-subnav a.is-on,
    html body.vip-enhanced-body div#content.statistics .stats-subnav a.selected {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 32px !important;
        height: 32px !important;
        padding: 0 6px !important;
        white-space: nowrap !important;
        line-height: 1 !important;
        text-align: center !important;
        justify-content: center !important;
        font-size: 12px !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    html body.vip-enhanced-body div#content.statistics .stats-subnav-row:has(> :nth-child(5)) a,
    html body.vip-enhanced-body div#content.statistics .stats-subnav-row.is-tribes a {
        flex: none !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }
}

html body.vip-enhanced-body div#content.statistics .stats-top10-pair table.top10 th,
html body.vip-enhanced-body div#content.statistics .stats-top10-pair table.top10 td {
    height: 18px !important;
    min-height: 0 !important;
    padding: 0 4px !important;
    line-height: 18px !important;
    font-size: 11px !important;
    vertical-align: middle !important;
}
html body.vip-enhanced-body div#content.statistics .stats-top10-pair table.top10 thead th {
    height: 20px !important;
    line-height: 20px !important;
    padding: 0 4px !important;
}
html body.vip-enhanced-body div#content.statistics .stats-top10-pair table.top10 a {
    display: inline !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: inherit !important;
}
