/* Coin Master Pro — engagement layer (reading progress, sticky CTA, next-read) */

/* Tailwind-compatible screen-reader-only helper (compiled tailwind-site.css omits .sr-only on some hubs). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reserve space when sticky quick-nav is visible so content isn’t hidden behind the bar */
body.cmp-sticky-cta-visible {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}

/* Village calculator / lookup: easier taps, no double-tap zoom on iOS when font is small elsewhere */
.cmp-village-level-input {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(37, 99, 235, 0.15);
}

/* Build-readiness line on village-cost (Tailwind-matching; pages without Tailwind) */
p[data-cmp-balance-status].cmp-balance-status-need,
.cmp-balance-status-need {
    color: #fb923c; /* orange-400 */
    font-size: 0.75rem;
    line-height: 1.3;
    min-height: 1.1rem;
    font-weight: 500;
}
p[data-cmp-balance-status].cmp-balance-status-ok,
.cmp-balance-status-ok {
    color: #4ade80; /* green-400 */
    font-size: 0.75rem;
    min-height: 1.1rem;
    line-height: 1.3;
    font-weight: 600;
}

#cmp-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9998;
    pointer-events: none;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, #2563eb, #1e3a8a, #eab308);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.45);
}

html.dark #cmp-reading-progress {
    background: linear-gradient(90deg, #2563eb, #4338ca, #fde047);
    box-shadow: 0 0 14px rgba(37, 99, 235, 0.45);
}

#cmp-sticky-session-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 0.5rem 0.65rem calc(0.5rem + env(safe-area-inset-bottom, 0));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    column-gap: 0.75rem;
    row-gap: 0.55rem;
    background: rgba(15, 23, 42, 0.92);
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    backdrop-filter: blur(10px);
    transform: translateY(110%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0s linear 0.28s;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.2);
}

#cmp-sticky-session-cta.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0s linear 0s;
}

#cmp-sticky-session-cta a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid rgba(96, 165, 250, 0.45);
    color: #e0f2fe;
    background: rgba(37, 99, 235, 0.35);
    transition: background 0.15s ease, border-color 0.15s ease;
}

#cmp-sticky-session-cta a:hover {
    background: rgba(37, 99, 235, 0.55);
    border-color: #93c5fd;
}

.cmp-next-read {
    margin: 2rem 0 1.5rem;
    padding: 1.15rem 1.2rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid var(--border, #dbe4ff);
    background: linear-gradient(165deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
}

html.dark .cmp-next-read {
    border-color: #334155;
    background: linear-gradient(165deg, rgba(96, 165, 250, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
}

.cmp-next-read h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text, #172554);
}

html.dark .cmp-next-read h2 {
    color: var(--text, #f1f5f9);
}

.cmp-next-read-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

@media (min-width: 640px) {
    .cmp-next-read-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cmp-next-read-grid li {
    margin: 0;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    background: var(--surface, rgba(255, 255, 255, 0.9));
    border: 1px solid var(--border, #e2e8f0);
}

html.dark .cmp-next-read-grid li {
    background: rgba(30, 41, 59, 0.85);
    border-color: #334155;
}

.cmp-next-read-grid a {
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none;
    color: var(--primary, #2563eb);
}

.cmp-next-read-grid a:hover {
    text-decoration: underline;
}

.cmp-next-read-grid p {
    margin: 0.35rem 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--muted, #5b6685);
}

.cmp-toc {
    margin: 1rem 0 1.5rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid var(--border, #dbe4ff);
    background: var(--surface-soft, rgba(243, 244, 246, 0.95));
    color: var(--text, #0f172a);
}

html.dark .cmp-toc {
    border-color: #334155;
    background: rgba(30, 41, 59, 0.92);
    color: var(--text, #f1f5f9);
}

.cmp-toc strong {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted, #475569);
    margin-bottom: 0.5rem;
}

html.dark .cmp-toc strong {
    color: var(--muted, #94a3b8);
}

.cmp-toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
}

.cmp-toc a {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--primary, #1d4ed8);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cmp-toc a:hover {
    color: var(--primary-dark, #1e3a8a);
}

html.dark .cmp-toc a {
    color: var(--primary, #60a5fa);
}

html.dark .cmp-toc a:hover {
    color: var(--text, #f8fafc);
}

.cmp-calc-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cmp-calc-actions button {
    font: inherit;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.cmp-calc-actions button:hover {
    border-color: #2563eb;
    color: #1d4ed8;
    background: #eff6ff;
}

html.dark .cmp-calc-actions button {
    border-color: #475569;
    background: #1e293b;
    color: #e2e8f0;
}

html.dark .cmp-calc-actions button:hover {
    border-color: #60a5fa;
    color: #93c5fd;
}

.cmp-calc-actions button.cmp-copied {
    border-color: #059669;
    color: #047857;
    background: #ecfdf5;
}

html.dark .cmp-calc-actions button.cmp-copied {
    border-color: #34d399;
    color: #6ee7b7;
    background: rgba(6, 78, 59, 0.35);
}

/* =============================================================================
   Future display ads (e.g. AdSense) — slots stay hidden until you integrate.
   Min width/height match common IAB sizes to limit CLS when display is enabled.
   To activate: remove display:none, set display:flex (or block) on the slot.
   ============================================================================= */
.ad-slot-leaderboard,
.ad-slot-rectangle,
.ad-slot-in-article {
    display: none !important;
    box-sizing: border-box;
    margin: 1.25rem auto;
    text-align: center;
    overflow: hidden;
}

.ad-slot-leaderboard {
    min-height: 90px;
    min-width: 320px;
    max-width: 728px;
    width: 100%;
}

.ad-slot-rectangle {
    min-height: 250px;
    min-width: 300px;
    max-width: 336px;
    width: 100%;
}

.ad-slot-in-article {
    min-height: 250px;
    min-width: 300px;
    max-width: min(100%, 336px);
    width: 100%;
}

/* Minimal site footer (legal links) — works on guide pages and next to hub styling */
.cmp-site-footer {
    margin-top: 1.75rem;
    padding: 1rem 0 0;
    border-top: 1px solid var(--border, #e2e8f0);
    text-align: center;
}

html.dark .cmp-site-footer {
    border-color: #334155;
}

.cmp-site-footer p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.55;
    color: var(--muted, #64748b);
}

.cmp-site-footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.cmp-site-footer a:hover {
    color: var(--primary, #2563eb);
}

html.dark .cmp-site-footer a:hover {
    color: #93c5fd;
}

/* Global top alert — Moon Active / fan-site notice (BG / EN / PT) */
#cmp-top-alert-banner {
    background-color: #dc2626;
    color: #ffffff;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
    padding: 0.5rem 0.75rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

#cmp-top-alert-banner p {
    margin: 0 auto;
    max-width: 72rem;
    padding: 0 0.25rem;
    color: #ffffff;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

html.dark #cmp-top-alert-banner {
    background-color: #dc2626;
    color: #ffffff;
}

html.dark #cmp-top-alert-banner p {
    color: #ffffff;
}

/* Ko-fi support — in-page card + floating widget (BG / EN / PT) */
.cmp-kofi-support {
    max-width: 40rem;
    margin: 2rem auto 2.25rem;
    padding: 1.35rem 1.5rem 1.5rem;
    text-align: center;
    border-radius: 1rem;
    border: 1px solid rgba(114, 164, 242, 0.45);
    background: linear-gradient(
        145deg,
        rgba(114, 164, 242, 0.14) 0%,
        rgba(255, 255, 255, 0.95) 55%,
        rgba(99, 102, 241, 0.08) 100%
    );
    box-shadow:
        0 4px 18px rgba(114, 164, 242, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    box-sizing: border-box;
}

html.dark .cmp-kofi-support {
    border-color: rgba(114, 164, 242, 0.5);
    background: linear-gradient(
        145deg,
        rgba(114, 164, 242, 0.22) 0%,
        rgba(15, 23, 42, 0.92) 50%,
        rgba(30, 41, 59, 0.95) 100%
    );
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cmp-kofi-support__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.65rem;
    border-radius: 9999px;
    background: rgba(114, 164, 242, 0.2);
    color: #4f7fd4;
    font-size: 1.35rem;
}

html.dark .cmp-kofi-support__icon {
    background: rgba(114, 164, 242, 0.28);
    color: #93c5fd;
}

.cmp-kofi-support__title {
    margin: 0 0 0.45rem;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    color: #1e293b;
    letter-spacing: -0.01em;
}

html.dark .cmp-kofi-support__title {
    color: #f1f5f9;
}

.cmp-kofi-support__text {
    margin: 0 auto 1.1rem;
    max-width: 34rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #475569;
}

html.dark .cmp-kofi-support__text {
    color: #cbd5e1;
}

.cmp-kofi-support__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.35rem;
    border-radius: 9999px;
    background: #72a4f2;
    color: #ffffff !important;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(114, 164, 242, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cmp-kofi-support__btn:hover {
    background: #5b8ee0;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(114, 164, 242, 0.55);
}

.cmp-kofi-support__btn:focus-visible {
    outline: 2px solid #72a4f2;
    outline-offset: 3px;
}

.cmp-kofi-support__note {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

html.dark .cmp-kofi-support__note {
    color: #94a3b8;
}

main > .cmp-kofi-support,
.wrap .cmp-kofi-support {
    width: calc(100% - 2rem);
}

@media (min-width: 640px) {
    .cmp-kofi-support {
        padding: 1.5rem 2rem 1.65rem;
    }

    .cmp-kofi-support__title {
        font-size: 1.35rem;
    }
}

/* Moon Active / Coin Master fan-site disclaimer (BG / EN / PT) */
.cmp-footer-disclaimer {
    margin: 0 auto 0.65rem;
    max-width: 42rem;
    font-size: 0.6875rem;
    line-height: 1.55;
    opacity: 1;
}

/* Light theme — solid dark gray (readable on white / light surfaces) */
html:not(.dark) .cmp-footer-disclaimer,
html:not(.dark) .cmp-site-footer p.cmp-footer-disclaimer,
html:not(.dark) footer.w-full .cmp-footer-disclaimer {
    color: #374151;
}

/* Dark theme — bright soft gray (readable on slate / dark surfaces) */
html.dark .cmp-footer-disclaimer,
html.dark .cmp-site-footer p.cmp-footer-disclaimer,
html.dark footer.w-full .cmp-footer-disclaimer {
    color: #d1d5db;
}

.cmp-site-footer .cmp-footer-disclaimer {
    margin-bottom: 0.75rem;
}

footer.w-full .cmp-footer-disclaimer {
    font-size: 0.75rem;
}

/* 404 and other always-dark footers (no html.dark required) */
footer.bg-gray-900 .cmp-footer-disclaimer {
    color: rgba(255, 255, 255, 0.82);
}

/* Hub home footers: gap-x-* may be absent from tailwind-site.css — use · separators + wrap */
.cmp-hub-footer-links {
    margin: 0;
    line-height: 1.65;
    word-spacing: 0.02em;
}

.cmp-hub-footer-links a {
    white-space: nowrap;
}

/* Cookie consent CMP — layered bar above sticky CTA */
#cmp-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10050;
    padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
}

#cmp-cookie-banner .cmp-cookie-banner__inner {
    max-width: 52rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.97);
    color: #e2e8f0;
    box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
}

#cmp-cookie-banner .cmp-cookie-banner__col {
    flex: 1 1 17rem;
    min-width: 0;
}

#cmp-cookie-banner .cmp-cookie-banner__text {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.47;
    color: #cbd5e1;
}

#cmp-cookie-banner .cmp-cookie-banner__links {
    margin-top: 0.42rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    row-gap: 0.25rem;
    font-size: 0.76rem;
}

#cmp-cookie-banner .cmp-cookie-banner__link {
    color: #93c5fd;
    text-decoration: underline;
    font-weight: 700;
}

#cmp-cookie-banner .cmp-cookie-banner__link:hover {
    color: #bfdbfe;
}

#cmp-cookie-banner .cmp-cookie-banner__dot {
    color: rgba(148, 163, 184, 0.7);
}

#cmp-cookie-banner .cmp-cookie-banner__linklike {
    font: inherit;
    font-weight: 700;
    font-size: 0.76rem;
    color: #fcd34d;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#cmp-cookie-banner .cmp-cookie-banner__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.42rem;
    flex: 0 0 auto;
}

#cmp-cookie-banner .cmp-cookie-banner__accept,
#cmp-cookie-banner .cmp-cookie-banner__reject {
    font: inherit;
    font-weight: 800;
    font-size: 0.76rem;
    padding: 0.42rem 0.92rem;
    border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

#cmp-cookie-banner .cmp-cookie-banner__accept {
    border: 1px solid rgba(96, 165, 250, 0.65);
    background: rgba(37, 99, 235, 0.6);
    color: #f8fafc;
}

#cmp-cookie-banner .cmp-cookie-banner__accept:hover {
    background: rgba(37, 99, 235, 0.78);
    border-color: #93c5fd;
}

#cmp-cookie-banner .cmp-cookie-banner__reject {
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: transparent;
    color: #e2e8f0;
}

#cmp-cookie-banner .cmp-cookie-banner__reject:hover {
    border-color: #cbd5e1;
    background: rgba(51, 65, 85, 0.5);
}

/* Cookie banner — mobile stack: text → buttons → links (desktop unchanged) */
@media (max-width: 768px) {
    #cmp-cookie-banner {
        padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
        max-height: none;
    }

    #cmp-cookie-banner .cmp-cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        padding: 1rem 0.85rem;
    }

    #cmp-cookie-banner .cmp-cookie-banner__col {
        display: contents;
    }

    #cmp-cookie-banner .cmp-cookie-banner__text {
        order: 1;
        text-align: center;
        font-size: 0.9375rem;
        line-height: 1.5;
    }

    #cmp-cookie-banner .cmp-cookie-banner__buttons {
        order: 2;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.55rem;
    }

    #cmp-cookie-banner .cmp-cookie-banner__accept {
        order: 1;
        width: 100%;
        max-width: 22rem;
        min-height: 3rem;
        font-size: 1rem;
        padding: 0.7rem 1.25rem;
    }

    #cmp-cookie-banner .cmp-cookie-banner__reject {
        order: 2;
        width: 100%;
        max-width: 22rem;
        min-height: 3rem;
        font-size: 1rem;
        padding: 0.7rem 1.25rem;
    }

    #cmp-cookie-banner .cmp-cookie-banner__links {
        order: 3;
        margin-top: 0;
        justify-content: center;
        text-align: center;
        gap: 0.45rem;
        row-gap: 0.35rem;
        font-size: 0.8125rem;
    }

    body:has(#authority-hub) #cmp-cookie-banner {
        max-height: none;
    }
}

#cmp-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

@media (min-width: 640px) {
    #cmp-consent-overlay {
        align-items: center;
    }
}

#cmp-consent-overlay .cmp-consent-overlay__backdrop {
    pointer-events: auto;
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

#cmp-consent-overlay .cmp-consent-overlay__sheet {
    pointer-events: auto;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
    margin: env(safe-area-inset-bottom, 0px) 0.6rem calc(1rem + env(safe-area-inset-bottom, 0px));
    padding: 1.1rem 1.05rem 1.15rem;
    border-radius: 1rem 1rem 0 0;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.96);
    color: #e2e8f0;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5);
}

@media (min-width: 640px) {
    #cmp-consent-overlay .cmp-consent-overlay__sheet {
        margin: 0 1rem;
        border-radius: 1rem;
    }
}

#cmp-consent-overlay .cmp-consent-overlay__title {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    font-weight: 800;
    color: #f8fafc;
}

#cmp-consent-overlay .cmp-consent-row {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    margin: 0 0 0.55rem;
    font-size: 0.86rem;
    line-height: 1.42;
    color: #cbd5e1;
    cursor: pointer;
}

#cmp-consent-overlay .cmp-consent-row input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

#cmp-consent-overlay .cmp-consent-overlay__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

#cmp-consent-overlay .cmp-consent-overlay__ghost,
#cmp-consent-overlay .cmp-consent-overlay__primary {
    font: inherit;
    font-weight: 800;
    font-size: 0.76rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
}

#cmp-consent-overlay .cmp-consent-overlay__ghost {
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: transparent;
    color: #e2e8f0;
}

#cmp-consent-overlay .cmp-consent-overlay__primary {
    border: 1px solid rgba(96, 165, 250, 0.6);
    background: rgba(37, 99, 235, 0.6);
    color: #f8fafc;
}

#cmp-consent-overlay .cmp-consent-overlay__fineprint {
    margin: 0.75rem 0 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: rgba(148, 163, 184, 0.95);
}

#cmp-consent-overlay .cmp-consent-overlay__fineprint a {
    color: #93c5fd;
}

body.cmp-cookie-banner-visible {
    padding-bottom: calc(8.75rem + env(safe-area-inset-bottom, 0px));
}

body.cmp-sticky-cta-visible.cmp-cookie-banner-visible {
    padding-bottom: calc(5rem + 8.75rem + env(safe-area-inset-bottom, 0px));
}

/* --- Sticky primary header (glass) + back-to-top (vanilla JS toggles .visible / --scrolled) --- */
.cmp-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow 0.22s ease, background 0.2s ease;
}

html.dark .cmp-sticky-header {
    background: rgba(15, 23, 42, 0.9) !important;
}

.cmp-sticky-header:not(.cmp-sticky-header--scrolled) {
    box-shadow: none !important;
}

.cmp-sticky-header.cmp-sticky-header--scrolled {
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12) !important;
}

html.dark .cmp-sticky-header.cmp-sticky-header--scrolled {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.42) !important;
}

/* Hub main nav (index / 404): logo + horizontal menu — prevent overlap on desktop */
@media (min-width: 1024px) {
    nav.cmp-sticky-header .max-w-7xl.mx-auto.px-4 > .flex.justify-between.items-center {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 2rem;
    }

    nav.cmp-sticky-header .max-w-7xl.mx-auto.px-4 > .flex.justify-between.items-center > div:first-child {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        margin-bottom: 0 !important;
    }

    nav.cmp-sticky-header .max-w-7xl.mx-auto.px-4 > .flex.justify-between.items-center > div:first-child a {
        white-space: nowrap;
    }

    nav.cmp-sticky-header .max-w-7xl.mx-auto.px-4 > .flex.justify-between.items-center > div:last-child {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 640px) {
    nav.cmp-sticky-header .px-4 {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
    }
    nav.cmp-sticky-header .py-3 {
        padding-top: 0.55rem !important;
        padding-bottom: 0.55rem !important;
    }
    nav.cmp-sticky-header .py-1\.5 {
        padding-top: 0.3rem !important;
        padding-bottom: 0.3rem !important;
    }
    header.cmp-sticky-header.site {
        padding-top: 0.55rem !important;
        padding-bottom: 0.65rem !important;
        gap: 0.65rem !important;
    }
    header.cmp-sticky-header.topbar .topbar-inner {
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }
}

/* Fixed size: no layout shift; off-screen until .visible */
#cmp-back-to-top.cmp-back-to-top {
    position: fixed;
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 10040;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease, background 0.15s ease,
        box-shadow 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
}

#cmp-back-to-top.cmp-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#cmp-back-to-top.cmp-back-to-top:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.55);
}

#cmp-back-to-top.cmp-back-to-top:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 3px;
}

#cmp-back-to-top.cmp-back-to-top i {
    font-size: 1.05rem;
    line-height: 1;
}

html.dark #cmp-back-to-top.cmp-back-to-top {
    background: #1d4ed8;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.cmp-sticky-cta-visible #cmp-back-to-top.cmp-back-to-top {
    bottom: calc(6.1rem + env(safe-area-inset-bottom, 0px));
}

body.cmp-cookie-banner-visible #cmp-back-to-top.cmp-back-to-top {
    bottom: calc(9rem + env(safe-area-inset-bottom, 0px));
}

body.cmp-sticky-cta-visible.cmp-cookie-banner-visible #cmp-back-to-top.cmp-back-to-top {
    bottom: calc(13.85rem + env(safe-area-inset-bottom, 0px));
}

@media (prefers-reduced-motion: reduce) {
    #cmp-back-to-top.cmp-back-to-top {
        transition: none;
    }
}

/* --- Language: БГ | EN (active = bold, not a link) --- */
.cmp-lang-pair {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 600;
    font-family: inherit;
}

.cmp-lang-pair__sep {
    margin: 0 0.35em;
    color: #94a3b8;
    font-weight: 500;
    user-select: none;
}

html.dark .cmp-lang-pair__sep {
    color: #64748b;
}

.cmp-lang-pair__active {
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}

html.dark .cmp-lang-pair__active {
    color: #f1f5f9;
}

.cmp-lang-pair__link {
    font-weight: 600;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.cmp-lang-pair__link:hover {
    color: #1d4ed8;
}

html.dark .cmp-lang-pair__link {
    color: #60a5fa;
}

html.dark .cmp-lang-pair__link:hover {
    color: #93c5fd;
}

/* Hub nav (light gray bar) */
.cmp-lang-pair--hub {
    font-size: 0.75rem;
}

nav .cmp-lang-pair--hub .cmp-lang-pair__active {
    color: #1e293b;
}

nav .cmp-lang-pair--hub .cmp-lang-pair__link--current {
    color: #1e293b;
    font-weight: 800;
    text-decoration: none;
}

nav .cmp-lang-pair--hub .cmp-lang-pair__link {
    color: #2563eb;
}

html.dark nav .cmp-lang-pair--hub .cmp-lang-pair__active {
    color: #e2e8f0;
}

html.dark nav .cmp-lang-pair--hub .cmp-lang-pair__link--current {
    color: #e2e8f0;
}

.cmp-lang-pair--lg {
    font-size: 0.95rem;
}

.cmp-lang-pair--topbar {
    font-size: 0.82rem;
}

/* Full-bleed top navigation shell (inner pages match homepage edge-to-edge header) */
.cmp-site-shell-nav {
    width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.08);
    transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

html.dark .cmp-site-shell-nav {
    background: #1e293b;
    box-shadow: 0 4px 6px -2px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.28);
}

.cmp-site-shell-nav__inner {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .cmp-site-shell-nav__inner {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Brand row aligns with centered track; avoids double horizontal padding vs .wrap */
.cmp-site-shell-nav header.site {
    padding-left: 0;
    padding-right: 0;
}

.cmp-site-shell-nav .cmp-site-hub-nav {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

/* Free-spins / feed pages: hub strip uses full inner track */
.cmp-site-shell-nav .cmp-site-hub-nav--topbar {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Prevent nested sticky on free-spins .topbar (shell owns stickiness) */
.cmp-site-shell-nav .topbar {
    position: relative;
    z-index: auto;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
}

html.dark .cmp-site-shell-nav .topbar {
    background: transparent;
    border-bottom: none;
}

.cmp-site-shell-nav .topbar-inner {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* Hub section links on inner pages — same targets as homepage main nav (#slots, guides, calculator) */
.cmp-site-hub-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    padding: 0.5rem 0 0.85rem;
    margin: 0 0 0.25rem;
    border-bottom: 1px solid var(--border, #d6e7f2);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.35;
}

.cmp-site-hub-nav a {
    color: var(--primary, #2563eb);
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.cmp-site-hub-nav a:hover {
    color: var(--primary-dark, #1d4ed8);
}

html.dark .cmp-site-hub-nav {
    border-bottom-color: var(--border, #334155);
}

.cmp-site-hub-nav--topbar {
    width: min(100%, 760px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .cmp-site-hub-nav {
        font-size: 0.9375rem;
        line-height: 1.38;
        gap: 0.4rem 0.58rem;
    }
}

@media (min-width: 1280px) {
    .cmp-site-hub-nav {
        font-size: 1rem;
        line-height: 1.38;
        gap: 0.42rem 0.62rem;
        padding-top: 0.55rem;
        padding-bottom: 0.9rem;
    }

    .cmp-site-hub-nav--topbar {
        width: min(100%, min(940px, 92vw));
    }
}

@media (min-width: 1536px) {
    .cmp-site-hub-nav {
        font-size: 1.0625rem;
        gap: 0.42rem 0.68rem;
    }

    .cmp-site-hub-nav--topbar {
        width: min(100%, min(1020px, 94vw));
    }
}

@media (max-width: 420px) {
    .cmp-site-hub-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.45rem;
        padding-bottom: 0.65rem;
        scrollbar-width: thin;
    }
}

/* Home FAQ accordion (#gameplay-faq): smooth open/close; prebuilt Tailwind omits group-open + grid rows */
#gameplay-faq .cmp-faq-anim {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
}
#gameplay-faq details[open] .cmp-faq-anim {
    grid-template-rows: 1fr;
}
#gameplay-faq .cmp-faq-anim > .cmp-faq-anim-inner {
    overflow: hidden;
}
#gameplay-faq .cmp-faq-chevron {
    transition: transform 0.3s ease-out;
}
#gameplay-faq details[open] .cmp-faq-chevron {
    transform: rotate(180deg);
}

/* Free spins: deep-link / app install notice */
.app-warning {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #713f12;
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 0.65rem;
}

.app-warning a {
    color: #a16207;
    font-weight: 700;
}

.app-warning a:hover {
    color: #854d0e;
}

html.dark .app-warning {
    color: #fef08a;
    background: rgba(113, 63, 18, 0.35);
    border-color: rgba(253, 224, 71, 0.45);
}

html.dark .app-warning a {
    color: #fde047;
}

html.dark .app-warning a:hover {
    color: #fef9c3;
}

/* Премахване на автоматичното затъмняване само в Dark Mode */
html.dark img {
    filter: none !important;
    -webkit-filter: none !important;
}

/* Оставаме opacity така, както е зададено чрез класовете,
   за да не счупим ефекта на прозрачност при любимците */

@media (max-width: 1023.98px) {
    p[data-cmp-balance-status].cmp-balance-status-need,
    .cmp-balance-status-need,
    p[data-cmp-balance-status].cmp-balance-status-ok,
    .cmp-balance-status-ok {
        font-size: 0.875rem;
    }

    .cmp-site-footer p {
        font-size: 0.875rem;
    }

    #cmp-cookie-banner .cmp-cookie-banner__text {
        font-size: 0.9375rem;
    }

    #cmp-cookie-banner .cmp-cookie-banner__links,
    #cmp-cookie-banner .cmp-cookie-banner__linklike {
        font-size: 0.875rem;
    }

    #cmp-cookie-banner .cmp-cookie-banner__accept,
    #cmp-cookie-banner .cmp-cookie-banner__reject {
        font-size: 0.9375rem;
        min-height: 2.75rem;
        padding: 0.5rem 1rem;
    }

    #cmp-sticky-session-cta a,
    #cmp-sticky-session-cta button {
        font-size: 0.9375rem;
        min-height: 2.5rem;
    }

    .cmp-site-hub-nav {
        font-size: 0.9375rem;
        line-height: 1.4;
    }

    .app-warning {
        font-size: 1rem;
    }
}
