/* ==========================================================================
   RECKLESS STORE — PAGE STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: calc(100vh - var(--rt-nav-height));
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-block: var(--rt-space-16);
}

/* هيرو الرئيسية فول-بليد: الخلفية طالعة لحد فوق تحت النافبار الشفاف */
.page-home .hero {
    min-height: 100vh;
    padding-top: calc(var(--rt-nav-height) + var(--rt-space-12));
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 55% at 74% 38%, rgba(46, 125, 91, 0.26), transparent 70%),
        radial-gradient(ellipse 45% 40% at 18% 78%, rgba(46, 125, 91, 0.12), transparent 70%),
        linear-gradient(180deg, #07070C 0%, var(--rt-bg) 100%);
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 65% at 68% 45%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 65% at 68% 45%, black 30%, transparent 75%);
}

.hero-content {
    position: relative;
    text-align: start;
    max-width: 640px;
    margin-inline-start: 0;
    margin-inline-end: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--rt-space-6);
}

/* الهيرو بعرض الشاشة عشان المحتوى يلزق في اليمين */
.hero .container {
    max-width: none;
    padding-inline-start: clamp(var(--rt-space-6), 6vw, 96px);
    padding-inline-end: 5px;
}

/* لمسة جمالية: شريط مضيء على طرف المحتوى (يمين في العربي) */
.hero-content::before {
    content: "";
    position: absolute;
    inset-inline-start: -8px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--rt-primary), transparent);
    opacity: .8;
    pointer-events: none;
}

.hero-logo {
    width: 96px;
    height: 96px;
    border-radius: var(--rt-radius-xl);
    /* Now an <img>: no background plate and no glow, they showed as a blue
       square behind the artwork. object-fit keeps the whole logo visible. */
    object-fit: contain;
    display: block;
    animation: rt-scale-in var(--rt-duration-slower) var(--rt-ease-spring) 120ms both;
}

.hero-title {
    animation: rt-fade-up var(--rt-duration-slower) var(--rt-ease) 240ms both;
}

.hero-title .line {
    display: block;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.4vw, 1.5rem);
    font-weight: var(--rt-fw-semibold);
    color: var(--rt-text-soft);
    animation: rt-fade-up var(--rt-duration-slower) var(--rt-ease) 380ms both;
}

.hero-desc {
    font-size: var(--rt-fs-md);
    color: var(--rt-text-muted);
    max-width: 560px;
    line-height: var(--rt-lh-normal);
    animation: rt-fade-up var(--rt-duration-slower) var(--rt-ease) 480ms both;
}

.hero-actions {
    display: flex;
    gap: var(--rt-space-4);
    flex-wrap: wrap;
    justify-content: flex-start;
    animation: rt-fade-up var(--rt-duration-slower) var(--rt-ease) 580ms both;
}

.hero-scroll {
    position: absolute;
    bottom: var(--rt-space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rt-text-muted);
    animation: rt-scroll-hint 2.2s ease-in-out infinite;
}

.hero-scroll .icon {
    width: 22px;
    height: 22px;
}

@keyframes rt-scroll-hint {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: .45; }
    50% { transform: translateX(-50%) translateY(7px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-scroll { animation: none; }
}

/* --------------------------------------------------------------------------
   Section header
   -------------------------------------------------------------------------- */

.section-head {
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: var(--rt-space-12);
}

.section-head .h2 {
    margin-bottom: var(--rt-space-4);
}

.section-head p {
    color: var(--rt-text-muted);
    font-size: var(--rt-fs-md);
    line-height: var(--rt-lh-normal);
}

/* --------------------------------------------------------------------------
   Steps (Join our world)
   -------------------------------------------------------------------------- */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--rt-space-6);
    counter-reset: step;
}

.step-card {
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    padding: var(--rt-space-8) var(--rt-space-6);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition:
        transform var(--rt-duration-normal) var(--rt-ease),
        border-color var(--rt-duration-normal) var(--rt-ease),
        box-shadow var(--rt-duration-normal) var(--rt-ease);
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--rt-primary), transparent);
    opacity: 0;
    transition: opacity var(--rt-duration-normal) var(--rt-ease);
}

.step-card:hover {
    transform: translateY(-8px);
    border-color: var(--rt-border-primary);
    box-shadow: var(--rt-shadow-lg);
}

.step-card:hover::before {
    opacity: 1;
}

.step-num {
    font-size: var(--rt-fs-4xl);
    font-weight: var(--rt-fw-black);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(46, 125, 91, 0.55);
    margin-bottom: var(--rt-space-5);
    transition: -webkit-text-stroke-color var(--rt-duration-normal) var(--rt-ease);
}

.step-card:hover .step-num {
    -webkit-text-stroke-color: var(--rt-primary);
}

.step-icon {
    width: 64px;
    height: 64px;
    margin-inline: auto;
    margin-bottom: var(--rt-space-5);
    border-radius: var(--rt-radius-md);
    background: var(--rt-primary-soft);
    border: 1px solid rgba(46, 125, 91, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rt-primary);
    transition: transform var(--rt-duration-normal) var(--rt-ease-spring);
}

.step-card:hover .step-icon {
    transform: scale(1.1) rotate(-6deg);
}

.step-icon .icon {
    width: 28px;
    height: 28px;
    color: var(--rt-primary);
}

.step-title {
    font-size: var(--rt-fs-lg);
    font-weight: var(--rt-fw-bold);
    margin-bottom: var(--rt-space-3);
}

.step-desc {
    color: var(--rt-text-muted);
    font-size: var(--rt-fs-sm);
    line-height: var(--rt-lh-normal);
    margin-bottom: var(--rt-space-5);
}

/* --------------------------------------------------------------------------
   Discord server cards
   -------------------------------------------------------------------------- */

.discord-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--rt-space-6);
}

.discord-card {
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    padding: var(--rt-space-8) var(--rt-space-6);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition:
        transform var(--rt-duration-normal) var(--rt-ease),
        border-color var(--rt-duration-normal) var(--rt-ease),
        box-shadow var(--rt-duration-normal) var(--rt-ease);
}

.discord-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(46, 125, 91, 0.16), transparent 65%);
    opacity: 0;
    transition: opacity var(--rt-duration-normal) var(--rt-ease);
    pointer-events: none;
}

.discord-card:hover {
    transform: translateY(-8px);
    border-color: var(--rt-border-primary);
    box-shadow: var(--rt-shadow-lg);
}

.discord-card:hover::after {
    opacity: 1;
}

.discord-icon-wrap {
    width: 72px;
    height: 72px;
    margin-inline: auto;
    margin-bottom: var(--rt-space-5);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rt-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background var(--rt-duration-normal) var(--rt-ease),
        border-color var(--rt-duration-normal) var(--rt-ease),
        transform var(--rt-duration-normal) var(--rt-ease-spring);
}

.discord-card:hover .discord-icon-wrap {
    background: var(--rt-primary-soft);
    border-color: var(--rt-border-primary);
    transform: scale(1.08);
}

.discord-icon-wrap .icon {
    width: 32px;
    height: 32px;
    color: var(--rt-text-soft);
    transition: color var(--rt-duration-normal) var(--rt-ease);
}

.discord-card:hover .discord-icon-wrap .icon {
    color: var(--rt-primary);
}

.discord-name {
    font-size: var(--rt-fs-lg);
    font-weight: var(--rt-fw-bold);
    margin-bottom: var(--rt-space-2);
}

.discord-desc {
    color: var(--rt-text-muted);
    font-size: var(--rt-fs-sm);
    margin-bottom: var(--rt-space-5);
    line-height: var(--rt-lh-normal);
}

.discord-online {
    display: inline-flex;
    align-items: center;
    gap: var(--rt-space-2);
    font-size: var(--rt-fs-xs);
    color: var(--rt-text-muted);
    margin-bottom: var(--rt-space-5);
    padding: var(--rt-space-1) var(--rt-space-3);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-full);
}

/* --------------------------------------------------------------------------
   Rules page
   -------------------------------------------------------------------------- */

.rules-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-5);
    flex-wrap: wrap;
    margin-bottom: var(--rt-space-8);
}

.rules-category {
    margin-bottom: var(--rt-space-8);
}

.rules-category-title {
    display: flex;
    align-items: center;
    gap: var(--rt-space-3);
    font-size: var(--rt-fs-xl);
    font-weight: var(--rt-fw-bold);
    margin-bottom: var(--rt-space-5);
    padding-bottom: var(--rt-space-3);
    border-bottom: 1px solid var(--rt-border);
}

.rules-category-title .icon {
    color: var(--rt-primary);
    width: 24px;
    height: 24px;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: var(--rt-space-3);
}

.rule-item {
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    overflow: hidden;
    transition:
        border-color var(--rt-duration-normal) var(--rt-ease),
        background var(--rt-duration-normal) var(--rt-ease);
}

.rule-item:hover {
    border-color: var(--rt-border-strong);
}

.rule-item.is-open {
    border-color: var(--rt-border-primary);
    background: rgba(46, 125, 91, 0.05);
}

.rule-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--rt-space-4);
    padding: var(--rt-space-5);
    text-align: start;
    cursor: pointer;
    background: transparent;
    transition: background var(--rt-duration-fast) var(--rt-ease);
}

.rule-trigger:hover {
    background: rgba(255, 255, 255, 0.03);
}

.rule-index {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: var(--rt-radius-sm);
    background: var(--rt-primary-soft);
    color: var(--rt-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--rt-fs-xs);
    font-weight: var(--rt-fw-bold);
    transition:
        background var(--rt-duration-normal) var(--rt-ease),
        color var(--rt-duration-normal) var(--rt-ease);
}

.rule-item.is-open .rule-index {
    background: var(--rt-primary);
    color: #fff;
}

.rule-title {
    flex: 1;
    font-weight: var(--rt-fw-semibold);
    font-size: var(--rt-fs-md);
}

.rule-chevron {
    color: var(--rt-text-muted);
    transition: transform var(--rt-duration-normal) var(--rt-ease-spring);
}

.rule-item.is-open .rule-chevron {
    transform: rotate(180deg);
    color: var(--rt-primary);
}

.rule-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--rt-duration-slow) var(--rt-ease);
}

.rule-content-inner {
    padding: 0 var(--rt-space-5) var(--rt-space-5) calc(var(--rt-space-5) + 34px + var(--rt-space-4));
    color: var(--rt-text-muted);
    font-size: var(--rt-fs-sm);
    line-height: var(--rt-lh-normal);
}

/* --------------------------------------------------------------------------
   Store / Gallery catalog
   -------------------------------------------------------------------------- */

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-5);
    flex-wrap: wrap;
    margin-bottom: var(--rt-space-8);
}

.filter-pills {
    display: flex;
    gap: var(--rt-space-2);
    flex-wrap: wrap;
}

.pill {
    padding: var(--rt-space-2) var(--rt-space-5);
    font-size: var(--rt-fs-sm);
    font-weight: var(--rt-fw-medium);
    color: var(--rt-text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-full);
    cursor: pointer;
    transition:
        background var(--rt-duration-fast) var(--rt-ease),
        color var(--rt-duration-fast) var(--rt-ease),
        border-color var(--rt-duration-fast) var(--rt-ease),
        transform var(--rt-duration-fast) var(--rt-ease);
}

.pill:hover {
    color: var(--rt-text);
    border-color: var(--rt-border-strong);
    transform: translateY(-2px);
}

.pill.is-active {
    background: var(--rt-primary);
    border-color: var(--rt-primary);
    color: #fff;
    box-shadow: var(--rt-shadow-primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: var(--rt-space-6);
}

.product-card .card-body {
    gap: var(--rt-space-2);
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-2);
    margin-bottom: var(--rt-space-1);
}

.product-actions {
    display: flex;
    gap: var(--rt-space-2);
    margin-top: var(--rt-space-2);
}

.product-actions .btn {
    flex: 1;
}

.badge-featured {
    position: absolute;
    top: var(--rt-space-4);
    inset-inline-start: var(--rt-space-4);
    z-index: 2;
    background: var(--rt-warning);
    color: #1a1200;
    font-weight: var(--rt-fw-bold);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.badge-discount-abs {
    position: absolute;
    top: var(--rt-space-4);
    inset-inline-end: var(--rt-space-4);
    z-index: 2;
}

/* --------------------------------------------------------------------------
   Sectors
   -------------------------------------------------------------------------- */

.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--rt-space-6);
}

.sector-card .card-media {
    aspect-ratio: 21 / 9;
}

.sector-type {
    position: absolute;
    bottom: var(--rt-space-3);
    inset-inline-start: var(--rt-space-3);
    z-index: 2;
}

.sector-stats {
    display: flex;
    gap: var(--rt-space-4);
    padding-top: var(--rt-space-3);
    border-top: 1px solid var(--rt-border);
    margin-top: var(--rt-space-2);
}

.sector-stat {
    display: flex;
    align-items: center;
    gap: var(--rt-space-2);
    font-size: var(--rt-fs-xs);
    color: var(--rt-text-muted);
}

.sector-stat .icon {
    width: 15px;
    height: 15px;
    color: var(--rt-primary);
}

/* --------------------------------------------------------------------------
   Applications
   -------------------------------------------------------------------------- */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--rt-space-6);
}

.app-card {
    text-align: start;
    padding: var(--rt-space-8) var(--rt-space-6);
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    display: flex;
    flex-direction: column;
    gap: var(--rt-space-4);
    cursor: pointer;
    transition:
        transform var(--rt-duration-normal) var(--rt-ease),
        border-color var(--rt-duration-normal) var(--rt-ease),
        box-shadow var(--rt-duration-normal) var(--rt-ease);
}

.app-card:hover {
    transform: translateY(-6px);
    border-color: var(--rt-border-primary);
    box-shadow: var(--rt-shadow-lg);
}

.app-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--rt-radius-md);
    background: var(--rt-primary-soft);
    border: 1px solid rgba(46, 125, 91, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rt-primary);
    transition: transform var(--rt-duration-normal) var(--rt-ease-spring);
}

.app-card:hover .app-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.app-card-icon .icon {
    width: 26px;
    height: 26px;
    color: var(--rt-primary);
}

/* ── عدّاد مدة السؤال في نموذج التقديم ── */
.app-timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-inline-start: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--rt-fs-xs);
    font-weight: var(--rt-fw-bold);
    font-variant-numeric: tabular-nums;
    color: #FACC15;
    background: rgba(250, 204, 21, .1);
    border: 1px solid rgba(250, 204, 21, .4);
    vertical-align: middle;
}
.app-timer .icon { width: 13px; height: 13px; }
.app-timer.is-low {
    color: #F59E0B;
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .5);
}
.app-timer.is-expired {
    color: #fff;
    background: #EF4444;
    border-color: #EF4444;
}
.app-timer.is-error {
    color: var(--rt-text-muted);
    background: rgba(255, 255, 255, .05);
    border-color: var(--rt-border);
}
.form-group.is-expired .form-input,
.form-group.is-expired .form-textarea,
.form-group.is-expired .form-select {
    opacity: .55;
    border-color: rgba(239, 68, 68, .5);
}

/* --------------------------------------------------------------------------
   Auth / Login page
   -------------------------------------------------------------------------- */

.auth-page {
    min-height: calc(100vh - var(--rt-nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--rt-space-12) var(--rt-space-6);
    position: relative;
    overflow: hidden;
}

.auth-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 50% at 50% 40%, rgba(46, 125, 91, 0.2), transparent 70%),
        var(--rt-bg);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border-strong);
    border-radius: var(--rt-radius-lg);
    padding: var(--rt-space-10);
    text-align: center;
    box-shadow: var(--rt-shadow-lg);
    display: flex;
    flex-direction: column;
    gap: var(--rt-space-6);
}

.auth-logo {
    width: 76px;
    height: 76px;
    margin-inline: auto;
    border-radius: var(--rt-radius-lg);
    /* Holds the real logo file, so no background plate or glow — they showed
       as a blue square behind the artwork. */
    object-fit: contain;
    display: block;
}

.btn-discord {
    background: #5865F2;
    color: #fff;
    width: 100%;
    padding: 0.95rem;
    font-size: var(--rt-fs-md);
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(88, 101, 242, 0.4);
}

/* --------------------------------------------------------------------------
   Profile
   -------------------------------------------------------------------------- */

.profile-head {
    display: flex;
    align-items: center;
    gap: var(--rt-space-6);
    padding: var(--rt-space-8);
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    margin-bottom: var(--rt-space-8);
    position: relative;
    overflow: hidden;
}

.profile-head::before {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 90px;
    background: linear-gradient(135deg, rgba(46, 125, 91, 0.35), transparent);
    pointer-events: none;
}

.profile-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--rt-primary);
    box-shadow: var(--rt-shadow-primary);
    position: relative;
    z-index: 1;
    background: var(--rt-bg-raised);
}

.profile-avatar-fallback {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rt-primary), #101a7a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--rt-fs-2xl);
    font-weight: var(--rt-fw-black);
    color: #fff;
    border: 3px solid var(--rt-primary);
    position: relative;
    z-index: 1;
}

.profile-info {
    position: relative;
    z-index: 1;
}

.profile-name {
    font-size: var(--rt-fs-xl);
    font-weight: var(--rt-fw-bold);
}

.profile-badges {
    display: flex;
    gap: var(--rt-space-2);
    flex-wrap: wrap;
    margin-top: var(--rt-space-2);
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--rt-space-5);
    margin-bottom: var(--rt-space-8);
}

.stat-card {
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-md);
    padding: var(--rt-space-6);
    display: flex;
    align-items: center;
    gap: var(--rt-space-4);
    transition:
        border-color var(--rt-duration-normal) var(--rt-ease),
        transform var(--rt-duration-normal) var(--rt-ease);
}

.stat-card:hover {
    border-color: var(--rt-border-primary);
    transform: translateY(-3px);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--rt-radius);
    background: var(--rt-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rt-primary);
    flex-shrink: 0;
}

.stat-card-icon .icon {
    color: var(--rt-primary);
}

.stat-card-value {
    font-size: var(--rt-fs-xl);
    font-weight: var(--rt-fw-black);
    line-height: 1.1;
}

.stat-card-label {
    font-size: var(--rt-fs-xs);
    color: var(--rt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Page hero (inner pages)
   -------------------------------------------------------------------------- */

.page-hero {
    padding-block: var(--rt-space-16) var(--rt-space-12);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--rt-border);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 80% at 50% 0%, rgba(46, 125, 91, 0.18), transparent 70%),
        linear-gradient(180deg, #08080D, var(--rt-bg));
}

.page-hero .h1 {
    margin-bottom: var(--rt-space-4);
}

.page-hero p {
    color: var(--rt-text-muted);
    max-width: 560px;
    margin-inline: auto;
    font-size: var(--rt-fs-md);
    line-height: var(--rt-lh-normal);
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: var(--rt-space-2);
    font-size: var(--rt-fs-sm);
    color: var(--rt-text-muted);
    margin-bottom: var(--rt-space-5);
}

.breadcrumb a:hover {
    color: var(--rt-primary);
}

.breadcrumb .icon {
    width: 14px;
    height: 14px;
}

/* --------------------------------------------------------------------------
   Admin panel
   -------------------------------------------------------------------------- */

.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - var(--rt-nav-height));
}

.admin-sidebar {
    background: var(--rt-bg-soft);
    border-inline-end: 1px solid var(--rt-border);
    padding: var(--rt-space-6) var(--rt-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--rt-space-1);
    position: sticky;
    top: var(--rt-nav-height);
    height: calc(100vh - var(--rt-nav-height));
    overflow-y: auto;
}

.admin-sidebar-label {
    font-size: var(--rt-fs-xs);
    font-weight: var(--rt-fw-bold);
    color: var(--rt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--rt-space-4) var(--rt-space-3) var(--rt-space-2);
}

.admin-link {
    display: flex;
    align-items: center;
    gap: var(--rt-space-3);
    padding: var(--rt-space-3) var(--rt-space-4);
    border-radius: var(--rt-radius);
    font-size: var(--rt-fs-sm);
    font-weight: var(--rt-fw-medium);
    color: var(--rt-text-muted);
    transition:
        background var(--rt-duration-fast) var(--rt-ease),
        color var(--rt-duration-fast) var(--rt-ease);
}

.admin-link .icon {
    width: 18px;
    height: 18px;
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--rt-text);
}

.admin-link:hover .icon {
    color: var(--rt-icon-hover);
}

.admin-link.is-active {
    background: var(--rt-primary-soft);
    color: var(--rt-primary);
    font-weight: var(--rt-fw-semibold);
}

.admin-link.is-active .icon {
    color: var(--rt-icon-hover);
}

.admin-content {
    padding: var(--rt-space-8);
    min-width: 0;
}

.admin-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-4);
    margin-bottom: var(--rt-space-8);
    flex-wrap: wrap;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--rt-space-5);
    margin-bottom: var(--rt-space-8);
}

.admin-stat {
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-md);
    padding: var(--rt-space-6);
    position: relative;
    overflow: hidden;
    transition:
        border-color var(--rt-duration-normal) var(--rt-ease),
        transform var(--rt-duration-normal) var(--rt-ease);
}

.admin-stat:hover {
    border-color: var(--rt-border-primary);
    transform: translateY(-3px);
}

.admin-stat::after {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: 64px;
    height: 64px;
    background: radial-gradient(circle, rgba(46, 125, 91, 0.3), transparent 70%);
    pointer-events: none;
}

.admin-stat-value {
    font-size: var(--rt-fs-2xl);
    font-weight: var(--rt-fw-black);
    line-height: 1.1;
    margin-bottom: var(--rt-space-1);
}

.admin-stat-label {
    font-size: var(--rt-fs-xs);
    color: var(--rt-text-muted);
    display: flex;
    align-items: center;
    gap: var(--rt-space-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-stat-label .icon {
    width: 14px;
    height: 14px;
    color: var(--rt-primary);
}

.admin-panel {
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-md);
    overflow: hidden;
    margin-bottom: var(--rt-space-6);
}

.admin-panel-head {
    padding: var(--rt-space-5) var(--rt-space-6);
    border-bottom: 1px solid var(--rt-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-4);
    flex-wrap: wrap;
}

.admin-panel-title {
    font-size: var(--rt-fs-md);
    font-weight: var(--rt-fw-bold);
    display: flex;
    align-items: center;
    gap: var(--rt-space-2);
}

.admin-panel-title .icon {
    color: var(--rt-primary);
    width: 19px;
    height: 19px;
}

.admin-panel-body {
    padding: var(--rt-space-6);
}

/* --------------------------------------------------------------------------
   404 page
   -------------------------------------------------------------------------- */

.notfound {
    min-height: calc(100vh - var(--rt-nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--rt-space-12);
}

.notfound-code {
    font-size: clamp(5rem, 18vw, 11rem);
    font-weight: var(--rt-fw-black);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px rgba(46, 125, 91, 0.5);
    animation: rt-fade-up var(--rt-duration-slower) var(--rt-ease) both;
}

/* ==========================================================================
   HOME REDESIGN - hero slider, live cards, community cards
   ========================================================================== */

.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.06);
    filter: blur(6px);
    transition: opacity 700ms ease, transform 1400ms ease, filter 900ms ease;
}

.hero-slide.is-active {
    opacity: 0.55;
    transform: scale(1);
    filter: blur(0);
}

/* Digital community section (§1-9) */
.digital-grid {
    display: grid;
    gap: var(--rt-space-6);
    grid-template-columns: 1.25fr 1fr;
    grid-template-areas:
        "discord kick"
        "youtube youtube"
        "server server";
}

.community-discord { grid-area: discord; }
.community-kick { grid-area: kick; }
.community-youtube { grid-area: youtube; }
.community-server { grid-area: server; }

@media (max-width: 820px) {
    .digital-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "youtube" "discord" "kick" "server";
    }
}

.live-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--rt-space-2);
    font-size: var(--rt-fs-sm);
    color: var(--rt-text);
    margin-bottom: var(--rt-space-4);
}

/* The corner "N مشترك" badge was removed from the YouTube card: with no
   subscriber count configured it rendered as "— مشترك" and broke the layout. */

.server-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: contain;
    background: rgba(46, 125, 91, .12);
    padding: 10px;
    margin-bottom: var(--rt-space-3);
}

/* Compact server card: single tidy row + collapsible player list */
.server-row {
    display: flex;
    align-items: center;
    gap: var(--rt-space-4);
    width: 100%;
    position: relative;
    z-index: 1;
}

.server-logo-sm {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(46, 125, 91, .12);
    padding: 7px;
    flex: none;
}

.server-info { flex: 1; min-width: 0; text-align: start; }

.server-status {
    display: flex;
    align-items: center;
    gap: var(--rt-space-2);
    font-size: var(--rt-fs-sm);
    font-weight: var(--rt-fw-semibold);
    white-space: nowrap;
}

.server-count {
    display: flex;
    align-items: baseline;
    gap: var(--rt-space-2);
    white-space: nowrap;
}

.mta-count-sm { font-size: var(--rt-fs-xl); }

.players-details { width: 100%; position: relative; z-index: 1; }

.players-details summary {
    cursor: pointer;
    color: var(--rt-text-muted);
    font-size: var(--rt-fs-xs);
    padding: var(--rt-space-2) 0 0;
    list-style-position: inside;
}

.players-details summary:hover { color: var(--rt-text); }

.players-details .live-member-list { margin-top: var(--rt-space-2); }

@media (max-width: 640px) {
    .server-row { flex-wrap: wrap; justify-content: center; text-align: center; }
    .server-info { flex-basis: 100%; text-align: center; }
}

/* Kick: compact CTA instead of full-width button */
.community-kick > .btn:last-child { width: auto; padding-inline: var(--rt-space-8); }

.community-server .live-member-list { width: 100%; }
.community-server .mta-count-row { justify-content: center; }

.live-member-list {
    min-height: 120px;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-md, 10px);
    background: rgba(0, 0, 0, .25);
    padding: var(--rt-space-2);
}

.live-member {
    display: flex;
    align-items: center;
    gap: var(--rt-space-3);
    padding: var(--rt-space-2) var(--rt-space-3);
    border-radius: var(--rt-radius-sm, 8px);
}

.live-member:hover { background: rgba(255, 255, 255, .04); }

.live-member-name { flex: 1; font-size: var(--rt-fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.live-empty {
    color: var(--rt-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--rt-space-3);
    padding: var(--rt-space-6);
    text-align: center;
}

.mta-status-row { display: flex; align-items: center; gap: var(--rt-space-3); }

.mta-count-row { display: flex; align-items: baseline; gap: var(--rt-space-2); }

.mta-count { font-size: var(--rt-fs-3xl); font-weight: var(--rt-fw-black); color: #fff; }

.status-dot.is-maintenance { background: #F59E0B; box-shadow: 0 0 12px rgba(245, 158, 11, .8); }

/* Community digital cards (§5-9) */
.community-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--rt-radius-lg);
    padding: var(--rt-space-8) var(--rt-space-6);
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

/* pin the last row (tags or join button) to the card bottom so all
   cards align even when their text lengths differ */
.community-card > .community-tags:last-child,
.community-card > .btn:last-child,
.community-card > .live-member-list:last-child {
    margin-top: auto;
}

.community-card > .btn:last-child {
    width: 100%;
}

.community-card:hover { transform: translateY(-4px); }

/* Icon tiles lift and glow slightly on hover. */
.community-card:hover .community-icon { transform: scale(1.08); }
.community-discord:hover .community-icon { background: rgba(88, 101, 242, .22); box-shadow: 0 0 0 6px rgba(88, 101, 242, .10); }
.community-kick:hover .community-icon { background: rgba(83, 252, 24, .18); box-shadow: 0 0 0 6px rgba(83, 252, 24, .08); }
.community-youtube:hover .community-icon { background: rgba(255, 0, 0, .22); box-shadow: 0 0 0 6px rgba(255, 0, 0, .10); }

.community-youtube:hover { border-color: #FF0000; box-shadow: 0 10px 28px rgba(255, 0, 0, .12); }
.community-discord:hover { border-color: #5865F2; box-shadow: 0 10px 28px rgba(88, 101, 242, .12); }
.community-kick:hover { border-color: #53FC18; box-shadow: 0 10px 28px rgba(83, 252, 24, .10); }
.community-server:hover { border-color: rgba(255, 255, 255, .2); box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }

.community-youtube:hover .community-icon { color: #FF0000; }
.community-discord:hover .community-icon { color: #5865F2; }
.community-kick:hover .community-icon { color: #53FC18; }

/* The giant background words (.community-word) were removed — they sat behind
   the icons and titles and made the section look broken. */

/* Icon tile: square (not circular) so the brand logos keep their own shape. */
.community-icon {
    width: 64px;
    height: 64px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: var(--rt-radius-md);
    margin-bottom: var(--rt-space-4);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    transition: transform .25s ease, background .25s ease,
                border-color .25s ease, box-shadow .25s ease;
}

/* Real brand artwork sits inside the tile, padded so it breathes. */
.community-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

/* Fallback for any tile still using an inline SVG glyph. */
.community-icon .icon { width: 32px; height: 32px; }

/* Per-platform brand colours so the cards are instantly distinguishable. */
.community-discord .community-icon { background: rgba(88, 101, 242, .12); border-color: rgba(88, 101, 242, .35); }
.community-kick .community-icon { background: rgba(83, 252, 24, .10); border-color: rgba(83, 252, 24, .30); }
.community-youtube .community-icon { background: rgba(255, 0, 0, .12); border-color: rgba(255, 0, 0, .35); }

.community-card > *:not(.community-word) { position: relative; z-index: 1; }

.community-title { font-size: var(--rt-fs-lg); font-weight: var(--rt-fw-bold); margin-bottom: var(--rt-space-2); }
.community-desc { color: var(--rt-text-muted); font-size: var(--rt-fs-sm); margin-bottom: var(--rt-space-4); }
.community-subs { font-weight: var(--rt-fw-bold); color: #fff; margin-bottom: var(--rt-space-3); }
.community-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: var(--rt-space-4); }

.step-media { height: 120px; margin-bottom: var(--rt-space-4); display: grid; place-items: center; border-radius: var(--rt-radius-md, 10px); overflow: hidden; }

/* Step-card artwork: one fixed square for every card, whole logo visible.
   Without this the images were stretched to 120px tall and cropped. */
.step-media-img,
.step-media > img {
    width: 64px;
    height: 64px;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--rt-radius-md);
    display: block;
}

.community-art {
    height: 140px;
    margin: calc(var(--rt-space-6) * -1) calc(var(--rt-space-6) * -1) var(--rt-space-4);
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.03);
    color: var(--rt-text-muted);
    overflow: hidden;
}

.community-art img { width: 100%; height: 100%; object-fit: cover; }

.kick-channels { display: flex; flex-direction: column; gap: var(--rt-space-4); }

.kick-channel { display: flex; align-items: center; gap: var(--rt-space-4); padding: var(--rt-space-3); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-md, 10px); }

.kick-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(83,252,24,.15); color: #53FC18; display: grid; place-items: center; font-weight: 900; }

.kick-avatar-img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }

.kick-avatar-fb {
    width: 52px; height: 52px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    background: rgba(83, 252, 24, .14); color: #53FC18;
    font-size: 22px; font-weight: 900;
}

img.nav-brand-mark { background: none; box-shadow: none; object-fit: contain; padding: 0; }

/* Page transitions (§51) — opacity only so fixed elements never jump */
.js body { animation: rt-page-in .28s ease both; }
@keyframes rt-page-in { from { opacity: 0; } to { opacity: 1; } }
body.page-leave { opacity: 0; transition: opacity .16s ease; }

/* Player join/leave (§16) */
.live-member.player-enter { animation: rt-player-in .35s ease both; }
@keyframes rt-player-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.live-member.player-exit { animation: rt-player-out .4s ease both; }
@keyframes rt-player-out { to { opacity: 0; transform: translateX(-12px); } }

/* Hero slide overlay (per-slide dim, admin-configurable 0–0.9) */
.hero-slide-overlay { position: absolute; inset: 0; background: #000; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    .js body { animation: none; }
    body.page-leave { transition: none; opacity: 1; }
    .live-member.player-enter, .live-member.player-exit { animation: none; }
}

/* Compact floating navbar on scroll */
@media (min-width: 821px) {
    .navbar.is-scrolled {
        top: 10px;
        height: 56px;
        inset-inline: 16px;
        max-width: calc(100% - 32px);
        margin-inline: auto;
        border-radius: 18px;
        border: 1px solid var(--rt-border);
        transition: top .3s ease, height .3s ease, border-radius .3s ease, background .3s ease, box-shadow .3s ease;
    }

    .navbar.is-scrolled .navbar-inner { padding-inline: var(--rt-space-4); }
}

/* Sector hero artwork on the detail page (banner or square logo). */
.sector-hero-media {
    display: grid;
    place-items: center;
    margin: var(--rt-space-6) 0;
    padding: var(--rt-space-6);
    border-radius: var(--rt-radius-lg);
    border: 1px solid var(--rt-border);
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(46, 125, 91, .18), transparent 70%),
        var(--rt-bg-raised, rgba(255, 255, 255, .03));
    overflow: hidden;
}
.sector-hero-media img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    border-radius: var(--rt-radius-md, 10px);
    display: block;
}

/* ==========================================================================
   FACTION FORM BUILDER — question rows with a per-question timer
   ========================================================================== */
.fb-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    grid-template-areas:
        "label label"
        "type options"
        "timer actions";
    gap: 10px;
    align-items: center;
    padding: 14px;
    margin-bottom: 10px;
    border-radius: var(--rt-radius-md);
    border: 1px solid var(--rt-border);
    background: var(--rt-bg-raised, rgba(255, 255, 255, .02));
}
.fb-label { grid-area: label; font-weight: var(--rt-fw-semibold); }
.fb-type { grid-area: type; }
.fb-options { grid-area: options; }
.fb-timer {
    grid-area: timer;
    display: flex;
    gap: 8px;
    align-items: center;
}
.fb-timer .form-input { flex: 1 1 0; min-width: 0; width: auto; }
.fb-timer .form-select { flex: 1 1 0; min-width: 0; width: auto; }
.fb-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.fb-row .form-check { margin: 0; white-space: nowrap; }

@media (max-width: 900px) {
    .fb-row {
        grid-template-columns: 1fr;
        grid-template-areas: "label" "type" "options" "timer" "actions";
    }
    .fb-actions { justify-content: flex-start; }
}

/* ==========================================================================
   RULES PAGE — hero stats, reading progress, sticky nav
   ========================================================================== */

.rules-hero { position: relative; }

.rules-hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--rt-space-6);
    flex-wrap: wrap;
    margin-top: var(--rt-space-6);
}

.rules-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 92px;
    padding: var(--rt-space-3) var(--rt-space-4);
    border-radius: var(--rt-radius-lg);
    border: 1px solid var(--rt-border);
    background: rgba(255, 255, 255, 0.03);
}

.rules-hero-stat-value {
    font-size: var(--rt-fs-2xl);
    font-weight: var(--rt-fw-black, 900);
    line-height: 1.1;
    color: var(--rt-primary);
    font-variant-numeric: tabular-nums;
}

.rules-hero-stat-label {
    font-size: var(--rt-fs-xs);
    color: var(--rt-text-secondary);
}

/* Reading progress bar pinned to the bottom of the hero */
.rules-progress {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
}

.rules-progress > span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--rt-primary), rgba(212, 175, 55, 0.45));
    transition: width 0.12s linear;
}

.rules-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-3);
    margin-bottom: var(--rt-space-5);
    font-size: var(--rt-fs-sm);
    color: var(--rt-text-secondary);
}

.pill-count {
    display: inline-block;
    min-width: 20px;
    padding: 0 5px;
    margin-inline-start: 6px;
    border-radius: 999px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    background: rgba(255, 255, 255, 0.08);
    color: var(--rt-text-secondary);
}

.pill.is-active .pill-count {
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
}

/* Floating back-to-top */
.rules-top-btn {
    position: fixed;
    inset-inline-end: var(--rt-space-6);
    bottom: var(--rt-space-6);
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: var(--rt-space-2);
    padding: var(--rt-space-3) var(--rt-space-5);
    border-radius: 999px;
    font-size: var(--rt-fs-sm);
    font-weight: var(--rt-fw-semibold);
    color: #FFFFFF;
    cursor: pointer;
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: rgba(20, 20, 24, 0.92);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--rt-duration-normal, 0.2s) ease,
                transform var(--rt-duration-normal, 0.2s) ease,
                visibility var(--rt-duration-normal, 0.2s) ease;
}

.rules-top-btn.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.rules-top-btn:hover { border-color: var(--rt-primary); }

/* Sticky sidebar on wide screens */
@media (min-width: 1025px) {
    .rules-sidebar {
        position: sticky;
        top: calc(var(--rt-nav-height, 72px) + var(--rt-space-4));
        max-height: calc(100vh - var(--rt-nav-height, 72px) - var(--rt-space-8));
        overflow-y: auto;
    }
}

@media (max-width: 640px) {
    .rules-hero-stats { gap: var(--rt-space-3); }
    .rules-top-btn { inset-inline-end: var(--rt-space-4); bottom: var(--rt-space-4); }
}

/* ==========================================================================
   PHOTO GALLERY — unified template + lightbox viewer
   ========================================================================== */

/* ---------------- Cinematic hero counter ---------------- */
.gallery-hero {
    position: relative;
    overflow: hidden;
}

.gallery-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 120%, rgba(212, 175, 55, 0.18), transparent 62%);
}

.gallery-counter {
    display: inline-flex;
    align-items: baseline;
    gap: var(--rt-space-3);
    margin-top: var(--rt-space-6);
    padding: var(--rt-space-3) var(--rt-space-6);
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.04));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.gallery-counter-value {
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    font-weight: var(--rt-fw-black, 900);
    line-height: 1;
    color: var(--rt-primary);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
}

.gallery-counter-label {
    display: inline-flex;
    align-items: center;
    gap: var(--rt-space-2);
    font-size: var(--rt-fs-sm);
    font-weight: var(--rt-fw-semibold);
    color: var(--rt-text-secondary);
}

/* ---------------- Published-count bar ---------------- */
.gallery-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-4);
    flex-wrap: wrap;
    padding: var(--rt-space-3) var(--rt-space-5);
    margin-bottom: var(--rt-space-6);
    border-radius: var(--rt-radius-lg);
    border: 1px solid var(--rt-border);
    background: var(--rt-surface, rgba(255, 255, 255, 0.03));
}

.gallery-bar-count {
    display: inline-flex;
    align-items: center;
    gap: var(--rt-space-2);
    font-weight: var(--rt-fw-bold);
    color: var(--rt-primary);
}

.gallery-bar-hint {
    margin: 0;
    font-size: var(--rt-fs-xs);
}

@media (max-width: 640px) {
    .gallery-bar { justify-content: center; text-align: center; }
    .gallery-counter { padding: var(--rt-space-2) var(--rt-space-4); }
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--rt-space-6);
}

@media (max-width: 1024px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .photo-grid { grid-template-columns: 1fr; }
}

.photo-card {
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}

.photo-card:hover { transform: translateY(-4px); }

.photo-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.photo-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--rt-space-3);
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity var(--rt-duration-normal) var(--rt-ease);
}

.photo-card:hover .photo-overlay,
.photo-card:focus-visible .photo-overlay {
    opacity: 1;
}

.photo-view-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    transform: scale(0.85);
    transition: transform var(--rt-duration-normal) var(--rt-ease), background var(--rt-duration-normal) var(--rt-ease);
}

.photo-card:hover .photo-view-btn {
    transform: scale(1);
    background: var(--rt-primary);
    border-color: var(--rt-primary);
}

.photo-view-btn .icon { width: 24px; height: 24px; }

.photo-view-label {
    color: #FFFFFF;
    font-size: var(--rt-fs-sm);
    font-weight: var(--rt-fw-semibold);
}

.photo-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-3);
    padding: var(--rt-space-4) var(--rt-space-5);
    font-weight: var(--rt-fw-semibold);
    font-size: var(--rt-fs-sm);
}

.photo-caption-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-caption-index {
    flex: none;
    min-width: 26px;
    height: 26px;
    padding: 0 var(--rt-space-2);
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: var(--rt-fs-xs);
    font-variant-numeric: tabular-nums;
    color: var(--rt-primary);
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.1);
}

/* ---------------- Lightbox thumbnail strip ---------------- */
.viewer-strip {
    display: flex;
    gap: var(--rt-space-2);
    margin-top: var(--rt-space-4);
    padding: var(--rt-space-2);
    max-height: 84px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: var(--rt-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    scrollbar-width: thin;
}

.viewer-strip[hidden] { display: none; }

.viewer-thumb {
    flex: none;
    width: 72px;
    height: 56px;
    padding: 0;
    border-radius: var(--rt-radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid transparent;
    opacity: 0.55;
    transition: opacity var(--rt-duration-fast, 0.15s) ease,
                border-color var(--rt-duration-fast, 0.15s) ease,
                transform var(--rt-duration-fast, 0.15s) ease;
}

.viewer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.viewer-thumb:hover { opacity: 0.85; transform: translateY(-2px); }

.viewer-thumb.is-active {
    opacity: 1;
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

/* ---------------- Lightbox viewer ---------------- */
.viewer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--rt-space-4);
    padding: var(--rt-space-6);
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.viewer-overlay.is-open { opacity: 1; }

.viewer-overlay[hidden] { display: none; }

.viewer-figure {
    margin: 0;
    max-width: min(880px, 100%);
    text-align: center;
    transform: scale(0.96);
    transition: transform 0.22s ease;
}

.viewer-overlay.is-open .viewer-figure { transform: scale(1); }

.viewer-figure img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--rt-radius-lg);
    object-fit: contain;
    background: #000;
}

.viewer-figure img.viewer-swap { animation: viewer-fade 0.25s ease; }

@keyframes viewer-fade {
    from { opacity: 0.25; }
    to { opacity: 1; }
}

.viewer-title {
    margin-top: var(--rt-space-4);
    font-weight: var(--rt-fw-bold);
    font-size: var(--rt-fs-lg);
}

.viewer-desc { margin-top: var(--rt-space-2); font-size: var(--rt-fs-sm); }

.viewer-count { margin-top: var(--rt-space-2); font-size: var(--rt-fs-sm); }

.viewer-arrow,
.viewer-close {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex: none;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
    cursor: pointer;
    transition: background var(--rt-duration-fast) var(--rt-ease), transform var(--rt-duration-fast) var(--rt-ease);
}

.viewer-arrow:hover,
.viewer-close:hover {
    background: var(--rt-primary);
    border-color: var(--rt-primary);
    transform: scale(1.06);
}

.viewer-arrow .icon,
.viewer-close .icon { width: 22px; height: 22px; }

.viewer-close {
    position: absolute;
    top: var(--rt-space-5);
    inset-inline-end: var(--rt-space-5);
}

@media (max-width: 640px) {
    .viewer-overlay { gap: var(--rt-space-2); padding: var(--rt-space-3); }
    .viewer-arrow { width: 40px; height: 40px; }
    .viewer-close { width: 40px; height: 40px; top: var(--rt-space-3); inset-inline-end: var(--rt-space-3); }
    .viewer-figure img { max-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
    .viewer-overlay,
    .viewer-figure,
    .viewer-figure img.viewer-swap,
    .photo-overlay,
    .photo-view-btn {
        transition: none;
        animation: none;
    }
    .viewer-overlay { opacity: 1; }
    .viewer-overlay[hidden] { display: none; }
    .viewer-figure { transform: none; }
}

/* -- Rules: sidebar layout + golden banner + cards -- */
.rules-layout { display: grid; grid-template-columns: 300px 1fr; grid-template-areas: "sidebar main"; gap: var(--rt-space-8); align-items: start; }
.rules-main { min-width: 0; grid-area: main; }
.rules-sidebar { grid-area: sidebar; }
.rules-sidebar { position: sticky; top: 90px; }
@media (max-width: 900px) {
    .rules-layout { grid-template-columns: 1fr; grid-template-areas: "main" "sidebar"; }
    .rules-sidebar { position: static; }
}
.filter-pills-col { display: flex; flex-direction: column; gap: 6px; }
.filter-pills-col .pill { text-align: start; justify-content: flex-start; }
.golden-rule {
    display: flex; gap: var(--rt-space-5); align-items: flex-start;
    background: var(--rt-bg-soft); border: 1px solid #8a6d1c;
    border-radius: var(--rt-radius-lg); padding: var(--rt-space-6);
    margin-bottom: var(--rt-space-8);
}
.golden-icon { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(250,204,21,.1); color: #FACC15; }
.golden-icon .icon { width: 26px; height: 26px; }
.golden-title { color: #FACC15; font-size: var(--rt-fs-xl); font-weight: var(--rt-fw-black); margin-bottom: 6px; }
.golden-desc { color: var(--rt-text); line-height: 1.9; }
.golden-example { color: var(--rt-text-muted); font-size: var(--rt-fs-sm); margin-top: 6px; }
.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--rt-space-5); }
@media (max-width: 640px) { .rules-grid { grid-template-columns: 1fr; } }
.rule-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.rule-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.rule-card-head { display: flex; align-items: flex-start; gap: 10px; }
.rule-card-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.05); }
.rule-card-icon .icon { width: 20px; height: 20px; }
.notice-card {
    display: flex; gap: 12px; align-items: flex-start;
    background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.4);
    border-radius: var(--rt-radius-lg); padding: var(--rt-space-5);
    color: var(--rt-text);
}
.notice-card .icon { width: 22px; height: 22px; color: #EF4444; flex: none; }

/* ── Showcase rule cards (code + EN name + penalty + fine) ── */
.rule-showcase { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.rule-showcase:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.rule-showcase-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap;
}
.rule-showcase-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rule-showcase-icon {
    width: 40px; height: 40px; flex: none;
    display: grid; place-items: center;
    border-radius: 12px; background: rgba(255,255,255,.05);
    border: 1px solid var(--rt-border);
}
.rule-showcase-icon .icon { width: 22px; height: 22px; }
.rule-showcase-code { font-weight: var(--rt-fw-black); font-size: var(--rt-fs-lg); color: #fff; }
.rule-showcase-en { color: var(--rt-text-muted); font-size: var(--rt-fs-sm); }
.rule-showcase-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rule-showcase-penalty {
    background: rgba(255,255,255,.08);
    border: 1px solid var(--rt-border-strong);
    color: var(--rt-text);
    font-weight: var(--rt-fw-semibold);
}
.rule-showcase-fine {
    display: inline-flex; align-items: center; gap: 4px;
    background: #F59E0B; border: 1px solid #F59E0B;
    color: #1a1200; font-weight: var(--rt-fw-bold);
}
.rule-showcase-fine .icon { width: 13px; height: 13px; }
.rule-showcase-ar { margin: 10px 0 0; font-size: var(--rt-fs-md); }
.rule-showcase-desc { margin-top: 6px; line-height: 1.9; }
.rule-showcase-example {
    font-size: 12px; border-top: 1px solid var(--rt-border);
    padding-top: 8px; margin-top: 8px;
}
.rule-showcase-example > span { font-weight: var(--rt-fw-semibold); }
.rule-showcase-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ── Penalty ladder ── */
.ladder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--rt-space-5); }
@media (max-width: 820px) { .ladder-grid { grid-template-columns: 1fr; } }
.ladder-card { position: relative; overflow: hidden; text-align: center; align-items: center; }
.ladder-step {
    position: absolute; top: 2px; inset-inline-end: 12px;
    font-size: 3rem; font-weight: var(--rt-fw-black);
    color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.12);
    line-height: 1; pointer-events: none;
}
.ladder-card .rule-showcase-icon { margin-inline: auto; }

/* ── Admin notice (red) + footer cards ── */
.admin-notice {
    display: flex; gap: 12px; align-items: flex-start;
    background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.45);
    border-radius: var(--rt-radius-lg); padding: var(--rt-space-6);
    margin-bottom: var(--rt-space-6);
}
.admin-notice .icon { width: 24px; height: 24px; color: #EF4444; flex: none; }
.admin-notice-title { color: #EF4444; font-weight: var(--rt-fw-black); margin-bottom: 6px; }
.admin-notice-desc { color: var(--rt-text); line-height: 1.9; }
.rules-foot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--rt-space-5); }
@media (max-width: 640px) { .rules-foot-grid { grid-template-columns: 1fr; } }
.rules-foot-card { display: flex; flex-direction: column; gap: 8px; }
.rules-category { margin-bottom: var(--rt-space-8); }
.rules-category-title { display: flex; align-items: center; gap: 10px; margin-bottom: var(--rt-space-4); font-size: var(--rt-fs-lg); }
