/* =============================================================================
   Tatwar public pages — نفس توكنات اللعب على الرئيسية والدخول والتسجيل واللوبي
   ========================================================================== */

:root {
    --bg: var(--ui-bg);
    --bg2: var(--ui-surface-2);
    --card: var(--ui-surface);
    --panel: var(--ui-surface);
    --text: var(--ui-ink);
    --muted: var(--ui-ink-2);
    --line: var(--ui-line);
    --gold: var(--ui-gold);
    --gold-2: var(--ui-accent);
    --gold2: var(--ui-accent);
    --chip: var(--ui-surface-3);
    --live: var(--ui-ok);
    --alert: var(--ui-danger);
    --primary-color: var(--ui-accent);
    --secondary-color: var(--ui-gold);
    --gold-color: var(--ui-gold);
    --dark-color: var(--ui-ink);
    --white-color: var(--ui-surface);
    --gray-color: var(--ui-ink-2);
    --error-color: var(--ui-danger);
    --success-color: var(--ui-ok);
    --warning-color: var(--ui-warn);
    --radius: var(--ui-r-xl);
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body,
body.tw-body,
body.tatwar-body,
body.v35 {
    font-family: var(--ui-font) !important;
    background: var(--ui-bg) !important;
    background-image: none !important;
    color: var(--ui-ink) !important;
}

/* شريط الصفحات العامة */
.public-game-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: var(--ui-2) !important;
    min-height: 56px !important;
    padding: 8px 16px !important;
    background: var(--ui-chrome) !important;
    border-bottom: 1px solid var(--ui-chrome-line) !important;
    color: var(--ui-chrome-ink) !important;
}
.public-game-start {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: var(--ui-2) !important;
}
.public-game-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: var(--ui-chrome-ink) !important;
    text-decoration: none !important;
    font: 700 15px/1 var(--ui-font) !important;
}
.public-game-brand img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1px solid var(--ui-chrome-line-2) !important;
}
.public-game-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}
.public-game-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: var(--ui-h-sm) !important;
    padding: 0 12px !important;
    border: 1px solid var(--ui-chrome-line) !important;
    border-radius: var(--ui-r-md) !important;
    background: var(--ui-chrome-2) !important;
    color: var(--ui-chrome-ink) !important;
    text-decoration: none !important;
    font: 700 12px/1 var(--ui-font) !important;
}
.public-game-links a:hover,
.public-game-links a.active {
    border-color: var(--ui-chrome-line-2) !important;
    background: var(--ui-chrome-3) !important;
    color: var(--ui-gold) !important;
}
.public-game-nav .tw-theme-switch {
    border-color: var(--ui-chrome-line) !important;
    background: var(--ui-chrome-2) !important;
}
.public-game-nav .tw-theme-switch-text { display: none !important; }

/* كروم الحساب / اللوبي */
.tatwar-chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tatwar-chrome-brand-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.tatwar-chrome-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ui-ink) !important;
    font: 700 1.1rem/1 var(--ui-font);
    text-decoration: none !important;
}
.tatwar-chrome-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--ui-line-2);
    object-fit: cover;
}
.tatwar-chrome-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tatwar-chrome-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tatwar-chrome-nav a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: var(--ui-h-sm) !important;
    padding: 0 12px !important;
    border-radius: var(--ui-r-md) !important;
    font: 700 12px/1 var(--ui-font) !important;
    border: 1px solid var(--ui-line) !important;
    background: var(--ui-surface) !important;
    color: var(--ui-ink) !important;
    text-decoration: none !important;
}
.tatwar-chrome-nav a:hover,
.tatwar-chrome-nav a.is-on {
    border-color: var(--ui-accent-line) !important;
    background: var(--ui-accent-soft) !important;
    color: var(--ui-accent) !important;
}

/* مبدّل اللغة على الصفحات العامة — يتبع التوكنات لا الحبوب الذهبية */
.tatwar-lang-btn {
    min-height: var(--ui-h-sm) !important;
    padding: 0 10px !important;
    border-radius: var(--ui-r-md) !important;
    border: 1px solid var(--ui-chrome-line) !important;
    background: var(--ui-chrome-2) !important;
    color: var(--ui-chrome-ink) !important;
    font: 700 12px/1 var(--ui-font) !important;
}
.public-game-nav .tatwar-lang-btn,
header.topbar .tatwar-lang-btn {
    border-color: var(--ui-chrome-line) !important;
    background: var(--ui-chrome-2) !important;
    color: var(--ui-chrome-ink) !important;
}
.tatwar-chrome .tatwar-lang-btn {
    border-color: var(--ui-line) !important;
    background: var(--ui-surface) !important;
    color: var(--ui-ink) !important;
}
.tatwar-lang-list {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-lg) !important;
    box-shadow: var(--ui-shadow-pop) !important;
}
.tatwar-lang-list a { color: var(--ui-ink) !important; }
.tatwar-lang-list a:hover,
.tatwar-lang-list a.is-on {
    background: var(--ui-accent-soft) !important;
    color: var(--ui-accent) !important;
}

/* نماذج الدخول والتسجيل */
.login-container,
.register-container {
    background: transparent !important;
    color: var(--ui-ink) !important;
}
.login-form-section,
.register-form-section {
    color: var(--ui-ink) !important;
}
.login-info-section,
.register-info-section {
    background: var(--ui-chrome) !important;
    color: var(--ui-chrome-ink) !important;
    border: 1px solid var(--ui-chrome-line) !important;
}
.logo-title { color: var(--ui-ink) !important; }
.logo-subtitle { color: var(--ui-ink-2) !important; }
.form-label { color: var(--ui-ink) !important; }
.form-input,
.login-form-section input,
.register-form-section input,
.register-form-section select {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line-2) !important;
    color: var(--ui-ink) !important;
    border-radius: var(--ui-r-md) !important;
}
.login-battle-item {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
}

/* الرئيسية: الشريط العلوي يبقى كروماً داكناً في الوضعين مثل اللعب */
header.topbar {
    background: var(--ui-chrome) !important;
    border-bottom: 1px solid var(--ui-chrome-line) !important;
    color: var(--ui-chrome-ink) !important;
}
header.topbar .brand,
header.topbar .menu a,
header.topbar .btn,
header.topbar .icon-btn {
    color: var(--ui-chrome-ink) !important;
    background: var(--ui-chrome-2) !important;
    border-color: var(--ui-chrome-line) !important;
}
header.topbar .btn-gold,
header.topbar .menu a.btn-gold {
    background: var(--ui-gold) !important;
    color: var(--ui-gold-ink) !important;
    border-color: transparent !important;
}
.ticker { background: var(--ui-chrome-2) !important; border-color: var(--ui-chrome-line) !important; }
body .lead-story,
body .side,
body .world,
body .card,
body .faq,
body .guide,
body .final,
body article,
body .hero,
body .note,
body .flash,
body .profile-container {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
    box-shadow: none !important;
}
body .chip {
    background: var(--ui-surface-3) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink-2) !important;
}

/* اللوبي وملف الجولات والحساب — كانت داكنة صريحة */
body .vital,
body .stat {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
body .btn {
    border-radius: var(--ui-r-md) !important;
}
body .btn:hover {
    background: var(--ui-surface-3) !important;
    color: var(--ui-ink) !important;
}
body .btn-gold,
body a.btn-gold {
    background: var(--ui-gold) !important;
    color: var(--ui-gold-ink) !important;
    border-color: transparent !important;
}
body .btn-gold:hover,
body a.btn-gold:hover {
    background: var(--ui-gold-hover) !important;
    color: var(--ui-gold-ink) !important;
}

/* الدليل والشروط عبر layout/form */
#content.manual,
#content.terms,
#content.faq,
#content.privacy,
#content.contact,
#content.articles {
    background: var(--ui-surface) !important;
    color: var(--ui-ink) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-xl) !important;
    padding: 16px !important;
}
#content.manual h1,
#content.manual h2,
#content.manual h3,
#content.terms h1,
#content.faq h1 {
    color: var(--ui-ink) !important;
}

/* هيدر الدليل/الشروط القديم */
.tw-header {
    background: var(--ui-chrome) !important;
    border-bottom: 1px solid var(--ui-chrome-line) !important;
    color: var(--ui-chrome-ink) !important;
}
.tw-header .logo-text,
.tw-header .tw-nav-link,
.tw-header a { color: var(--ui-chrome-ink) !important; }
.tw-header .tw-nav-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: var(--ui-h-sm) !important;
    padding: 0 10px !important;
    border-radius: var(--ui-r-md) !important;
    text-decoration: none !important;
}
.tw-header .tw-theme-switch-text { display: none !important; }

@media screen and (max-width: 760px) {
    .public-game-nav {
        align-items: flex-start !important;
        flex-direction: column !important;
    }
    .public-game-links { width: 100% !important; }
    .public-game-links a { flex: 1 1 calc(50% - 6px) !important; justify-content: center !important; }
}

/* يغلب طبقة «البولش الذهبي» القديمة في الدخول والتسجيل */
html body {
    background: var(--ui-bg) !important;
    background-image: none !important;
    color: var(--ui-ink) !important;
}
html body::before { display: none !important; content: none !important; }
html body .login-wrapper,
html body .register-wrapper {
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line) !important;
    box-shadow: none !important;
    border-radius: var(--ui-r-xl) !important;
}
html body .login-form-section,
html body .register-form-section {
    background: var(--ui-surface) !important;
    color: var(--ui-ink) !important;
}
html body .login-form-section::before,
html body .register-form-section::before { display: none !important; content: none !important; }
html body .login-info-section,
html body .register-info-section {
    background: var(--ui-chrome) !important;
    background-image: none !important;
    color: var(--ui-chrome-ink) !important;
    border-color: var(--ui-chrome-line) !important;
}
html body .logo-title,
html body .server-info h3,
html body .modal-title { color: var(--ui-ink) !important; }
html body .logo-subtitle { color: var(--ui-ink-2) !important; }
html body .form-input,
html body .form-group input,
html body .form-group select {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line-2) !important;
    color: var(--ui-ink) !important;
    border-radius: var(--ui-r-md) !important;
    box-shadow: none !important;
}
html body .login-form-section .btn,
html body .register-form-section .btn,
html body .btn-primary,
html body .btn.btn-primary {
    background: var(--ui-gold) !important;
    background-image: none !important;
    color: var(--ui-gold-ink) !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: var(--ui-r-md) !important;
    font-weight: 700 !important;
}
html body .btn-outline,
html body .btn.btn-outline {
    background: var(--ui-surface) !important;
    background-image: none !important;
    color: var(--ui-ink) !important;
    border: 1px solid var(--ui-line-2) !important;
    box-shadow: none !important;
}
html body .login-info-section .btn-outline {
    background: var(--ui-chrome-2) !important;
    color: var(--ui-chrome-ink) !important;
    border-color: var(--ui-chrome-line-2) !important;
}
html body .login-battle-item {
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-line) !important;
    color: var(--ui-ink) !important;
}
html body .login-battle-item i { color: var(--ui-accent) !important; }
html body .public-game-nav {
    background: var(--ui-chrome) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--ui-chrome-line) !important;
    box-shadow: none !important;
}
html body .public-game-links a {
    background: var(--ui-chrome-2) !important;
    background-image: none !important;
    border: 1px solid var(--ui-chrome-line) !important;
    color: var(--ui-chrome-ink) !important;
    box-shadow: none !important;
    border-radius: var(--ui-r-md) !important;
}
html body .public-game-links a.active,
html body .public-game-links a:hover {
    background: var(--ui-chrome-3) !important;
    background-image: none !important;
    color: var(--ui-gold) !important;
    box-shadow: none !important;
}
html body .public-game-brand { color: var(--ui-chrome-ink) !important; }
html body.tw-auth .auth-side-hero,
html body.tw-auth .register-info-section .auth-side-hero,
html body.tw-auth .login-info-section .auth-side-hero,
html body .auth-side-hero {
    background-image:
        radial-gradient(circle at 28% 16%, rgba(224, 166, 60, .22), transparent 48%),
        linear-gradient(180deg, #faf6ee, #ecd7a6) !important;
}
html body .auth-side-hero strong { color: var(--ui-gold) !important; }
html body .auth-side-hero span { color: var(--ui-chrome-ink) !important; }
html body .server-info {
    background: var(--ui-chrome-2) !important;
    border-color: var(--ui-chrome-line) !important;
    box-shadow: none !important;
}

/* =============================================================================
   صفحة الهبوط — الرئيسية
   ========================================================================== */
body.tw-land {
    background: var(--ui-bg);
    color: var(--ui-ink);
}
body.tw-land .wrap {
    width: min(1120px, 100%);
    margin-inline: auto;
    padding-inline: 16px;
    box-sizing: border-box;
}
body.tw-land header.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
}
body.tw-land .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    flex-wrap: wrap;
}
body.tw-land header.topbar .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ui-chrome-ink) !important;
    font: 700 1.05rem/1 var(--ui-font);
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
}
body.tw-land .brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--ui-chrome-line-2);
    background: #fff;
}
body.tw-land .menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}
body.tw-land .tools { display: flex; align-items: center; gap: 7px; }
body.tw-land .mob { display: none; }
body.tw-land .ticker {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
body.tw-land .ticker b {
    background: var(--ui-danger);
    color: #fff;
    font-size: .72rem;
    padding: 7px 10px;
    letter-spacing: .04em;
}
body.tw-land .ticker-mask { overflow: hidden; }
body.tw-land .ticker-track {
    display: flex;
    gap: 42px;
    width: max-content;
    animation: tw-land-tick 42s linear infinite;
    white-space: nowrap;
    padding: 8px 0;
    color: var(--ui-chrome-ink);
    font-weight: 700;
    font-size: .88rem;
}
@keyframes tw-land-tick {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
[dir="rtl"] body.tw-land .ticker-track {
    animation-name: tw-land-tick-rtl;
}
@keyframes tw-land-tick-rtl {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

body.tw-land .tw-land-hero {
    position: relative;
    padding: 42px 0 36px;
    background:
        radial-gradient(900px 320px at 12% -20%, rgba(224, 166, 60, .16), transparent 58%),
        var(--ui-chrome);
    color: var(--ui-chrome-ink);
    overflow: hidden;
}
body.tw-land .tw-land-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: var(--ui-chrome-line);
}
body.tw-land .kicker {
    color: var(--ui-accent);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
}
body.tw-land .tw-land-hero .kicker {
    color: var(--ui-gold);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
}
body.tw-land .tw-land-hero h1 {
    font-size: clamp(1.85rem, 4.4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 10px 0 12px;
    color: var(--ui-chrome-ink);
    max-width: 18ch;
}
body.tw-land .tw-land-hero .lead {
    color: var(--ui-chrome-ink-2);
    max-width: 40rem;
    font-size: 1.02rem;
}
body.tw-land .tw-land-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 22px;
}
body.tw-land .tw-land-cta .btn {
    min-height: 42px;
    padding: 0 18px;
    font-weight: 700;
}
body.tw-land .tw-land-pulse {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}
body.tw-land .tw-land-pulse div {
    padding: 12px 10px;
    background: var(--ui-chrome-2);
    border: 1px solid var(--ui-chrome-line);
    border-radius: var(--ui-r-lg);
}
body.tw-land .tw-land-pulse b {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ui-chrome-ink);
    font-variant-numeric: tabular-nums;
}
body.tw-land .tw-land-pulse span {
    color: var(--ui-chrome-ink-2);
    font-size: .72rem;
    font-weight: 700;
}

body.tw-land .tw-land-sec { padding: 36px 0; }
body.tw-land .sec-h { margin-bottom: 16px; }
body.tw-land .sec-h h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ui-ink);
    margin: 0 0 6px;
}
body.tw-land .sec-h p { color: var(--ui-ink-2); margin: 0; }

body.tw-land .tw-land-xtra {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
body.tw-land .tw-land-xtra article {
    padding: 16px 14px;
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-r-lg);
    transition: border-color .18s ease, transform .18s ease;
}
body.tw-land .tw-land-xtra article:hover {
    border-color: var(--ui-accent-line) !important;
    transform: translateY(-2px);
}
body.tw-land .tw-land-xtra i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    border-radius: var(--ui-r-md);
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
    font-size: 14px;
}
body.tw-land .tw-land-xtra h3 {
    font-size: .98rem;
    margin: 0 0 6px;
    color: var(--ui-ink);
}
body.tw-land .tw-land-xtra p {
    margin: 0;
    color: var(--ui-ink-2);
    font-size: .86rem;
    line-height: 1.55;
}

body.tw-land .tw-land-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 10px;
}
body.tw-land .tw-land-langs a,
body.tw-land .tw-land-langs span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-r-md);
    background: var(--ui-surface);
    color: var(--ui-ink);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}
body.tw-land .tw-land-langs a.is-on {
    border-color: var(--ui-accent-line);
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
}
body.tw-land .tw-land-names {
    color: var(--ui-ink-2);
    font-size: .88rem;
    line-height: 1.7;
    max-width: 52rem;
}

body.tw-land .hows {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
body.tw-land .hows article {
    padding: 16px 14px;
    border-radius: var(--ui-r-lg);
}
body.tw-land .hows b {
    display: block;
    color: var(--ui-accent);
    font-size: .75rem;
    margin-bottom: 6px;
}
body.tw-land .hows h3 { font-size: .98rem; margin: 0 0 6px; }
body.tw-land .hows p { margin: 0; color: var(--ui-ink-2); font-size: .86rem; }

body.tw-land .desk { display: grid; grid-template-columns: 1.4fr .8fr; gap: 14px; }
body.tw-land .lead-story,
body.tw-land .side,
body.tw-land .world,
body.tw-land .guide,
body.tw-land .faq,
body.tw-land .final {
    padding: 18px 16px;
    border-radius: var(--ui-r-lg);
}
body.tw-land .lead-story h3 { font-size: 1.28rem; margin: 6px 0 8px; }
body.tw-land .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
body.tw-land .chip {
    padding: 3px 8px;
    border-radius: var(--ui-r-sm);
    font-size: .74rem;
    font-weight: 700;
}
body.tw-land .stats,
body.tw-land .grid4 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0 16px;
}
body.tw-land .grid4 { grid-template-columns: repeat(4, 1fr); }
body.tw-land .stats b,
body.tw-land .grid4 b { display: block; font-size: 1.05rem; }
body.tw-land .stats span,
body.tw-land .grid4 span { color: var(--ui-ink-2); font-size: .72rem; font-weight: 700; }
body.tw-land .war { display: grid; gap: 8px; margin: 0; padding: 0; }
body.tw-land .war li {
    list-style: none;
    padding: 8px 0;
    border-top: 1px dashed var(--ui-line);
    font-size: .9rem;
}
body.tw-land .war li:first-child { border-top: 0; }
body.tw-land .war em { color: var(--ui-ink-2); font-style: normal; font-size: .75rem; }
body.tw-land .worlds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
body.tw-land .phase { font-weight: 700; font-size: .82rem; color: var(--ui-ok); }
body.tw-land .phase.prep,
body.tw-land .phase.locked { color: var(--ui-warn); }
body.tw-land .phase.over { color: var(--ui-ink-3); }
body.tw-land .split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
body.tw-land table { width: 100%; border-collapse: collapse; font-size: .9rem; }
body.tw-land th,
body.tw-land td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--ui-line); }
body.tw-land th { color: var(--ui-ink-2); font-size: .72rem; }
body.tw-land .rank { color: var(--ui-accent); font-weight: 700; width: 28px; }
body.tw-land .guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
body.tw-land .faqs { display: grid; gap: 8px; }
body.tw-land footer {
    border-top: 1px solid var(--ui-line);
    padding: 28px 0 calc(36px + env(safe-area-inset-bottom, 0px));
    color: var(--ui-ink-2);
    background: var(--ui-surface-2);
}
body.tw-land .foot { display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; }
body.tw-land footer .brand {
    color: var(--ui-ink) !important;
    background: transparent !important;
}
body.tw-land footer nav { display: flex; flex-wrap: wrap; gap: 6px; }
body.tw-land .copy {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--ui-line);
    font-size: .84rem;
}

@media (max-width: 980px) {
    body.tw-land .tw-land-pulse,
    body.tw-land .tw-land-xtra,
    body.tw-land .hows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.tw-land .desk,
    body.tw-land .worlds,
    body.tw-land .split,
    body.tw-land .guides,
    body.tw-land .foot { grid-template-columns: 1fr; }
    body.tw-land .stats,
    body.tw-land .grid4 { grid-template-columns: 1fr 1fr; }
    body.tw-land .tw-land-hero h1 { max-width: none; }
}
@media (max-width: 760px) {
    body.tw-land .menu { display: none; }
    body.tw-land .mob { display: inline-flex; }
}

/* أزرار الهبوط — صندوق واضح مثل التطبيق، مو رابط أزرق */
html body.tw-land a.btn,
html body.tw-land .btn,
html body.tw-land span.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 46px !important;
    height: auto !important;
    box-sizing: border-box !important;
    max-width: 100%;
    min-width: 0;
    padding: 0 16px !important;
    margin: 0 !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-line-2) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    color: var(--ui-ink) !important;
    font-family: var(--ui-font) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-align: center !important;
    white-space: nowrap;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
html body.tw-land a.btn:hover,
html body.tw-land .btn:hover {
    background: var(--ui-surface-3) !important;
    border-color: var(--ui-ink-3) !important;
    color: var(--ui-ink) !important;
}
html body.tw-land a.btn-gold,
html body.tw-land .btn-gold,
html body.tw-land a.btn.btn-gold {
    background: var(--ui-gold) !important;
    border-color: var(--ui-gold) !important;
    color: var(--ui-gold-ink) !important;
}
html body.tw-land a.btn-gold:hover,
html body.tw-land .btn-gold:hover {
    background: var(--ui-gold-hover) !important;
    border-color: var(--ui-gold-hover) !important;
    color: var(--ui-gold-ink) !important;
}
html body.tw-land .guide .btn,
html body.tw-land .world .btn,
html body.tw-land .lead-story > .btn,
html body.tw-land .final .btn,
html body.tw-land .tw-land-file {
    width: 100% !important;
    margin-top: 14px !important;
    justify-content: center !important;
    white-space: normal;
}
html body.tw-land .final .tw-land-cta .btn {
    margin-top: 0 !important;
}
html body.tw-land span.btn {
    white-space: normal;
}
html body.tw-land .world .tw-land-lock {
    opacity: 1 !important;
    pointer-events: none;
    background: var(--ui-surface-3) !important;
    border-color: var(--ui-line-2) !important;
    color: var(--ui-ink-2) !important;
}
html body.tw-land a.tw-land-file {
    justify-content: space-between !important;
    background: var(--ui-ink) !important;
    border-color: var(--ui-ink) !important;
    color: var(--ui-surface) !important;
}
html body.tw-land a.tw-land-file:hover {
    background: var(--ui-chrome) !important;
    border-color: var(--ui-chrome) !important;
    color: var(--ui-chrome-ink) !important;
}
html body.tw-land a.tw-land-file i {
    font-size: 12px;
    color: inherit;
    opacity: .85;
}
html[dir="ltr"] body.tw-land a.tw-land-file i {
    transform: scaleX(-1);
}
html body.tw-land header.topbar a.btn,
html body.tw-land #twMobileMenu a.btn {
    background: var(--ui-chrome-2) !important;
    border-color: var(--ui-chrome-line) !important;
    color: var(--ui-chrome-ink) !important;
    white-space: normal;
}
html body.tw-land header.topbar a.btn:hover,
html body.tw-land #twMobileMenu a.btn:hover {
    background: var(--ui-chrome-3) !important;
    color: var(--ui-gold) !important;
}

html body.tw-land,
html body.tw-land *,
html body.tw-land *::before,
html body.tw-land *::after {
    box-sizing: border-box;
}
html:has(body.tw-land) {
    overflow-x: hidden;
    max-width: 100%;
}
html body.tw-land {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    background: #efe8dc !important;
}
html[data-theme="dark"] body.tw-land {
    background: var(--ui-bg) !important;
}
html body.tw-land .guide,
html body.tw-land .faq,
html body.tw-land .world,
html body.tw-land .side,
html body.tw-land .lead-story,
html body.tw-land .final,
html body.tw-land .hows article,
html body.tw-land .tw-land-xtra article {
    display: flex;
    flex-direction: column;
    padding: 18px 16px 16px !important;
    border-radius: 16px !important;
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-line) !important;
}
html body.tw-land .guide p,
html body.tw-land .hows p {
    flex: 1;
}
html body.tw-land header.topbar {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(26, 19, 16, .92) !important;
    width: 100%;
}
html body.tw-land header.topbar .icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    border: 1px solid var(--ui-chrome-line) !important;
    background: var(--ui-chrome-2) !important;
    color: var(--ui-chrome-ink) !important;
}
html body.tw-land header.topbar .tatwar-lang-btn {
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    border: 1px solid var(--ui-chrome-line) !important;
    background: var(--ui-chrome-2) !important;
    color: var(--ui-chrome-ink) !important;
}
html body.tw-land header.topbar .tw-theme-switch {
    height: 40px;
    padding: 3px !important;
    border-radius: 12px !important;
    gap: 2px;
}
html body.tw-land header.topbar .tw-theme-switch button.tw-theme-btn {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    color: var(--ui-chrome-ink-2) !important;
}
html body.tw-land header.topbar .tw-theme-switch-text { display: none !important; }
html body.tw-land header.topbar .menu a {
    min-height: 40px !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
}
html body.tw-land .tw-land-hero {
    padding: 28px 0 32px !important;
}
html body.tw-land .tw-land-hero h1 {
    font-size: clamp(1.7rem, 7vw, 2.6rem) !important;
    max-width: 14ch;
}
html body.tw-land .tw-land-cta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 20px 0 22px;
}
html body.tw-land .tw-land-cta .btn {
    width: 100% !important;
    min-height: 50px !important;
    font-size: 16px !important;
    justify-content: center !important;
}
html body.tw-land .tw-land-pulse {
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--ui-chrome-line);
    border-radius: 16px;
    padding: 6px;
    gap: 6px;
}
html body.tw-land .tw-land-pulse div {
    background: var(--ui-chrome-2) !important;
    border: 0 !important;
    border-radius: 12px !important;
    padding: 12px 8px !important;
}
html body.tw-land .tw-land-xtra i {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
}
html body.tw-land .sec-h h2 {
    font-size: 1.45rem !important;
}
html body.tw-land #twMobileMenu {
    padding: 8px 0 14px;
}
html body.tw-land #twMobileMenu .btn {
    width: 100% !important;
    margin: 4px 0 !important;
    justify-content: flex-start !important;
}

html body.tw-land .tw-land-dock { display: none; }
html body.tw-land #twMobileMenu .tw-land-menu-theme { display: none; }

@media (min-width: 761px) {
    html body.tw-land .tw-land-cta {
        display: flex;
        grid-template-columns: none;
    }
    html body.tw-land .tw-land-cta .btn {
        width: auto !important;
        min-width: 168px;
        max-width: none;
    }
}
@media (max-width: 980px) {
    html body.tw-land .guides {
        display: flex;
        flex-direction: column;
        gap: 0;
        overflow: hidden;
        background: var(--ui-surface);
        border: 1px solid var(--ui-line);
        border-radius: 16px;
    }
    html body.tw-land .guides .guide {
        border: 0 !important;
        border-radius: 0 !important;
        border-bottom: 1px solid var(--ui-line) !important;
    }
    html body.tw-land .guides .guide:last-child { border-bottom: 0 !important; }
    html body.tw-land .stats,
    html body.tw-land .grid4 {
        width: 100%;
        min-width: 0;
    }
    html body.tw-land .stats > div,
    html body.tw-land .grid4 > div {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}
@media (max-width: 760px) {
    html body.tw-land .nav {
        flex-wrap: nowrap !important;
        gap: 8px;
        min-height: 56px;
        width: 100%;
    }
    html body.tw-land header.topbar .brand {
        min-width: 0;
        flex: 1 1 auto;
    }
    html body.tw-land header.topbar .brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    html body.tw-land header.topbar .tools {
        flex: 0 0 auto;
        gap: 6px;
        min-width: 0;
    }
    html body.tw-land header.topbar .nav > .tools > .tw-theme-switch {
        display: none !important;
    }
    html body.tw-land header.topbar .tatwar-lang-btn {
        max-width: 140px;
        overflow: hidden;
    }
    html body.tw-land header.topbar .tatwar-lang-btn span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    html body.tw-land #twMobileMenu .tw-land-menu-theme {
        display: block;
        margin: 0 0 10px;
    }
    html body.tw-land #twMobileMenu .tw-theme-switch {
        width: 100%;
        height: 44px;
        justify-content: space-between;
    }
    html body.tw-land #twMobileMenu .tw-theme-switch button.tw-theme-btn {
        flex: 1 1 0;
        width: auto !important;
        min-width: 0 !important;
        height: 38px !important;
        min-height: 38px !important;
        color: var(--ui-chrome-ink-2) !important;
    }
    html body.tw-land .tw-land-pulse {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    html body.tw-land .tw-land-hero h1 { max-width: none !important; }
    html body.tw-land .tw-land-langs a {
        min-height: 44px;
        padding: 0 14px;
    }
    html body.tw-land footer.tw-site-foot nav {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 4px;
    }
    html body.tw-land footer.tw-site-foot nav .btn {
        width: 100% !important;
        white-space: normal;
    }
    html body.tw-land .tw-land-dock {
        display: flex;
        align-items: stretch;
        gap: 8px;
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 60;
        width: 100%;
        margin: 0;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: color-mix(in srgb, var(--ui-surface) 94%, transparent);
        border-top: 1px solid var(--ui-line);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
    html body.tw-land .tw-land-dock .btn {
        flex: 1 1 0;
        width: auto !important;
        min-width: 0 !important;
        max-width: none;
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        margin: 0 !important;
        justify-content: center !important;
        border-radius: 12px !important;
        overflow: hidden;
        white-space: nowrap;
    }
    html body.tw-land .tw-land-dock .btn-gold {
        flex: 1.35 1 0;
    }
    html body.tw-land footer {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

