/* ==========================================================================
   MWRO — Cinematic Scene & Layout System
   ==========================================================================
   Loaded after mwro-cartoon.css. Where mwro-cartoon.css re-skins components,
   this file supplies the Eigis-style page architecture:

     · a continuous cloud WORLD that the page scrolls through (dawn -> open
       sky -> deep blue -> sunset -> dusk), built entirely from CSS/SVG
     · the thin overlay top bar, hero, flourish dividers, news row, why-us
       block, feature carousel, media gallery and dotted footer

   Chrome stays cartoon: rounded Baloo type, white outlines, glossy pills.
   ========================================================================== */

/* ==========================================================================
   1. The world — painted key art on a scroll-driven camera
   ==========================================================================
   The scene is built from the game's own painted backgrounds (lifted from
   MWRONewClient/.../StreamingAssets and re-encoded for the web), not from
   gradients — that density is what gives the reference layout its character.

   --mw-progress (0 -> 1) is written by mwro-cartoon.js on every scroll frame.
   The bright realm holds the top of the page and cross-fades into the dusk
   plate as you descend, with cartoon clouds drifting over both.
   ========================================================================== */

:root { --mw-progress: 0; }

.mw-world {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, #bfeaff 0%, #7fd0fa 45%, #2f93de 100%);
}

/* ── Painted plates ── */
.mw-plate {
    position: absolute;
    inset: -4% 0 0;
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    transform: translate3d(0, calc(var(--mw-progress) * -22vh), 0);
    will-change: transform, opacity;
}

.mw-plate-realm {
    background-image: url('../img/scene/world-realm.jpg');
    /* Fully lit until the page is half down, gone by three quarters. */
    opacity: calc((0.52 - var(--mw-progress)) * 7);
}

.mw-plate-dusk {
    background-image: url('../img/scene/world-dusk.jpg');
    background-position: center center;
    opacity: calc((var(--mw-progress) - 0.40) * 7);
}

/* ── Readability scrims ──
   The art is busy, so text needs a floor. A vertical wash plus a vignette
   keeps every band legible without flattening the painting. */
.mw-world-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(8, 38, 72, .40) 0%,
            rgba(8, 38, 72, .14) 16%,
            rgba(7, 32, 62, .44) 46%,
            rgba(6, 26, 52, .62) 78%,
            rgba(5, 18, 38, .82) 100%),
        radial-gradient(120% 80% at 50% 40%, rgba(0, 0, 0, 0) 40%, rgba(4, 20, 44, .55) 100%);
}

/* A warm bloom that rides above the horizon of whatever band is showing. */
.mw-world-sun {
    position: absolute;
    top: 6%;
    right: 14%;
    width: 40vw;
    height: 40vw;
    max-width: 620px;
    max-height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 252, 232, .70) 0%,
        rgba(255, 242, 190, .34) 26%,
        rgba(255, 226, 150, .14) 48%,
        rgba(255, 214, 140, 0) 70%);
    transform: translate3d(0, calc(var(--mw-progress) * 40vh), 0);
    animation: mw-sun-breathe 9s ease-in-out infinite;
    will-change: transform;
    mix-blend-mode: screen;
}

/* ── Birds crossing the sky ── */
.mw-bird {
    position: absolute;
    top: var(--y, 30%);
    left: -6%;
    width: var(--sz, 16px);
    height: var(--sz, 16px);
    opacity: .5;
    animation: mw-bird-cross var(--d, 40s) linear infinite;
    animation-delay: var(--delay, 0s);
    will-change: transform;
}

.mw-bird::before,
.mw-bird::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 52%;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .85);
    transform-origin: 100% 50%;
    animation: mw-bird-flap 1.1s ease-in-out infinite;
}
.mw-bird::before { left: 0; }
.mw-bird::after  { right: 0; transform-origin: 0 50%; }

@keyframes mw-bird-cross {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(115vw, -12vh, 0); }
}

@keyframes mw-bird-flap {
    0%, 100% { transform: rotate(18deg); }
    50%      { transform: rotate(-14deg); }
}

/* ── Petals drifting across the frame, as in the launcher art ── */
.mw-petal {
    position: absolute;
    top: -6%;
    left: var(--x, 50%);
    width: var(--sz, 12px);
    height: calc(var(--sz, 12px) * .62);
    border-radius: 60% 20% 60% 20%;
    background: linear-gradient(120deg, #fff3c4, var(--mw-sun));
    opacity: .8;
    animation: mw-petal-fall var(--d, 16s) linear infinite;
    animation-delay: var(--delay, 0s);
    will-change: transform;
}

@keyframes mw-petal-fall {
    from { transform: translate3d(0, -10vh, 0) rotate(0deg); }
    to   { transform: translate3d(14vw, 112vh, 0) rotate(520deg); }
}

/* Over painted art the clouds stay atmospheric rather than graphic. The shape
   itself already carries a 7px blur, so only the far layer needs extra haze —
   distance reads as softness, not as a second blur on everything. */
.mw-world .mw-layer-far  { opacity: .50; filter: blur(4px); }
.mw-world .mw-layer-mid  { opacity: .68; }
.mw-world .mw-layer-near { opacity: .82; }

/* Cloud layers get an extra scroll offset on top of their horizontal drift. */
.mw-world .mw-cloud-layer {
    transform: translate3d(0, calc(var(--mw-progress) * var(--depth, -30vh)), 0);
    will-change: transform;
}

/* ==========================================================================
   1b. Script fallbacks
   ==========================================================================
   Baloo 2 carries no Cyrillic or CJK glyphs. Cyrillic already lands on Nunito
   (which does), but CJK would fall through to whatever the OS picks — so name
   the faces explicitly and let the display weight carry the cartoon feel.
   ========================================================================== */

html[lang="zh"] body,
html[lang="zh"] h1, html[lang="zh"] h2, html[lang="zh"] h3,
html[lang="zh"] h4, html[lang="zh"] h5, html[lang="zh"] h6,
html[lang="zh"] .btn, html[lang="zh"] .mw-head h2,
html[lang="zh"] .mw-hero-title, html[lang="zh"] .mw-topnav > li > a {
    font-family: 'Baloo 2', 'Nunito', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Noto Sans SC', 'Source Han Sans SC', sans-serif !important;
}

/* CJK has no ascenders/descenders to spare — the stacked text shadow that
   suits Latin caps turns mushy, so lighten it. */
html[lang="zh"] .mw-head h2,
html[lang="zh"] .mw-hero-title {
    text-shadow: 0 2px 0 var(--mw-blue-700), 0 6px 18px rgba(3, 16, 34, .8) !important;
    letter-spacing: .04em !important;
}

/* ==========================================================================
   2. Page scaffolding
   ========================================================================== */

/* The bar is fixed, so every page clears it — except pages whose hero is
   meant to run under the bar (the homepage). */
body { padding-top: 72px; }
body.mw-scene-hero { padding-top: 0; }

.mw-section {
    position: relative;
    padding: clamp(46px, 5vw, 78px) 0;
}

.mw-section-tight { padding: clamp(30px, 3.4vw, 52px) 0; }

.mw-shell {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

/* Section heading + cloud-puff flourish (Eigis's gold diamond, cartoon dress) */
.mw-head { text-align: center; margin-bottom: clamp(28px, 4vw, 54px); }
.mw-head-left { text-align: left; }

.mw-head h2 {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    text-shadow: 0 3px 0 var(--mw-blue-700), 0 6px 0 rgba(6, 30, 60, .7),
                 0 10px 24px rgba(3, 16, 34, .75), 0 2px 30px rgba(3, 16, 34, .6);
}

.mw-head p {
    max-width: 640px;
    margin: 14px auto 0;
    color: #eaf7ff;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(3, 16, 34, .85);
}
.mw-head-left p { margin-inline: 0; }

/* The flourish: a hairline with three cloud puffs riding the middle. */
.mw-flourish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 16px auto 0;
    width: 240px;
}
.mw-head-left .mw-flourish { margin-inline: 0; justify-content: flex-start; }

.mw-flourish::before,
.mw-flourish::after {
    content: '';
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .85));
}
.mw-flourish::after { background: linear-gradient(90deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0)); }

.mw-flourish i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, .9);
    flex: 0 0 auto;
}
.mw-flourish i:nth-child(2) { width: 18px; height: 18px; }

/* ==========================================================================
   2b. Alternating anchored sections
   ==========================================================================
   The hero's copy sits on a soft dark bed anchored to the left. Every section
   below inherits that same bed and alternates which edge it anchors to:
   reverse (right), normal (left), reverse, and so on down the page.

   Counting is nth-of-type over <section>, and the hero is section 1 — so the
   even sections reverse and the odd ones keep the hero's orientation. Sections
   that PHP may omit simply shift the run; the alternation still holds.
   ========================================================================== */

.mw-section .mw-head {
    position: relative;
    max-width: 780px;
    padding: 24px 36px 28px;
    text-align: left;
    margin-inline: 0 auto;
}

.mw-section .mw-head::before {
    content: '';
    position: absolute;
    inset: -10px -24px -14px -44px;
    z-index: -1;
    border-radius: 44px;
    background: radial-gradient(120% 100% at 22% 50%,
        rgba(4, 20, 44, .82) 0%,
        rgba(4, 20, 44, .62) 45%,
        rgba(4, 20, 44, 0) 78%);
}

.mw-section .mw-head p { margin-inline: 0; }
.mw-section .mw-head .mw-flourish { margin-inline: 0; justify-content: flex-start; }

/* ── Reverse sections — the whole block mirrors to the right edge ── */
.mw-section:nth-of-type(even) .mw-head {
    text-align: right;
    margin-inline: auto 0;
}

.mw-section:nth-of-type(even) .mw-head::before {
    inset: -10px -44px -14px -24px;
    background: radial-gradient(120% 100% at 78% 50%,
        rgba(4, 20, 44, .82) 0%,
        rgba(4, 20, 44, .62) 45%,
        rgba(4, 20, 44, 0) 78%);
}

.mw-section:nth-of-type(even) .mw-head p { margin-inline: auto 0; }
.mw-section:nth-of-type(even) .mw-head .mw-flourish { margin-inline: auto 0; justify-content: flex-end; }

/* Two-column blocks swap their columns so art and copy trade sides. */
.mw-section:nth-of-type(even) .mw-why > *:first-child,
.mw-section:nth-of-type(even) .mw-feature > *:first-child { order: 2; }

/* Rows of controls follow the same anchor. */
.mw-section:nth-of-type(even) .mw-news-foot,
.mw-section:nth-of-type(even) .mw-feature-actions,
.mw-section:nth-of-type(even) .mw-perks { flex-direction: row-reverse; }

.mw-section:nth-of-type(even) .mw-rail-track,
.mw-section:nth-of-type(even) .mw-gallery { direction: rtl; }
.mw-section:nth-of-type(even) .mw-rail-track > *,
.mw-section:nth-of-type(even) .mw-gallery > * { direction: ltr; }

/* Standalone CTA rows follow the section's anchor. Scoped to direct children
   of the shell so centred content inside cards and tiles is left alone. */
.mw-section:nth-of-type(even) > .mw-shell > .d-flex.justify-content-center { justify-content: flex-end !important; }
.mw-section:nth-of-type(odd)  > .mw-shell > .d-flex.justify-content-center { justify-content: flex-start !important; }
.mw-section:nth-of-type(even) > .mw-shell > .text-center { text-align: right !important; }
.mw-section:nth-of-type(odd)  > .mw-shell > .text-center { text-align: left !important; }

/* Corner brackets — the ornament Eigis puts on its news cards. */
.mw-bracket { position: relative; }
.mw-bracket::before,
.mw-bracket::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border: 3px solid rgba(255, 255, 255, .9);
    pointer-events: none;
    z-index: 3;
}
.mw-bracket::before { top: -8px; left: -8px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.mw-bracket::after  { bottom: -8px; right: -8px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }

/* ==========================================================================
   3. Top bar — thin transparent overlay
   ========================================================================== */

.mw-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding: 10px clamp(16px, 3vw, 40px);
    background: linear-gradient(180deg, rgba(11, 58, 104, .42) 0%, rgba(11, 58, 104, 0) 100%);
    transition: background .25s ease, backdrop-filter .25s ease, box-shadow .25s ease;
}

.mw-topbar.is-stuck {
    background: linear-gradient(180deg, rgba(90, 186, 240, .92) 0%, rgba(29, 111, 196, .92) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 0 rgba(14, 63, 118, .2), 0 14px 28px rgba(11, 58, 104, .28);
}

/* Centred on the bar itself, not on the space left over beside the tools —
   absolute placement keeps it dead centre whatever the tool cluster weighs. */
.mw-topnav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: clamp(6px, 1.4vw, 22px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.mw-topnav > li { position: relative; }

.mw-topnav > li > a {
    display: inline-block;
    padding: 10px 4px;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 0 rgba(14, 63, 118, .55);
    white-space: nowrap;
    transition: color .18s ease;
}

.mw-topnav > li > a::after {
    content: '';
    display: block;
    height: 4px;
    margin-top: 6px;
    border-radius: 4px;
    background: var(--mw-sun);
    box-shadow: 0 0 10px rgba(255, 215, 94, .8);
    transform: scaleX(0);
    transform-origin: 50% 50%;
    transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
}

.mw-topnav > li > a:hover,
.mw-topnav > li.is-active > a { color: var(--mw-sun); }
.mw-topnav > li > a:hover::after,
.mw-topnav > li.is-active > a::after { transform: scaleX(1); }

/* Hover-revealed submenu, styled as a small cloud card. */
.mw-submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    translate: -50% 0;
    min-width: 210px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: linear-gradient(180deg, #ffffff 0%, #e8f6ff 100%);
    border: 3px solid #fff;
    border-radius: 18px;
    box-shadow: 0 10px 0 rgba(14, 63, 118, .18), 0 22px 40px rgba(11, 58, 104, .32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.mw-topnav > li:hover > .mw-submenu,
.mw-topnav > li:focus-within > .mw-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mw-submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .88rem;
    color: var(--mw-blue-700);
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.mw-submenu a:hover {
    background: linear-gradient(180deg, var(--mw-blue-300), var(--mw-blue-500));
    color: #fff;
    transform: translateX(4px);
}
.mw-submenu a i, .mw-submenu a svg { width: 16px; height: 16px; flex: 0 0 auto; }

.mw-topbar-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }

/* Language picker */
.mw-lang { position: relative; }
.mw-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, .18);
    border: 2px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .08em;
    cursor: pointer;
}
.mw-lang-btn:hover { background: rgba(255, 255, 255, .3); }
.mw-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    padding: 8px;
    margin: 0;
    list-style: none;
    background: linear-gradient(180deg, #ffffff, #e8f6ff);
    border: 3px solid #fff;
    border-radius: 16px;
    box-shadow: 0 10px 0 rgba(14, 63, 118, .18), 0 20px 34px rgba(11, 58, 104, .3);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.mw-lang:hover .mw-lang-menu,
.mw-lang:focus-within .mw-lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mw-lang-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--mw-blue-700);
    font-weight: 700;
    font-size: .85rem;
}
.mw-lang-menu a:hover { background: linear-gradient(180deg, var(--mw-blue-300), var(--mw-blue-500)); color: #fff; }

/* The language already in use is marked rather than offered as a change. */
.mw-lang-menu a.is-current {
    background: linear-gradient(180deg, var(--mw-sun), var(--mw-sun-deep));
    color: #6b3b00;
}
.mw-lang-menu a.is-current::after { content: ' ✓'; }

/* Discord pill */
.mw-discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 3px solid #fff;
    background: linear-gradient(180deg, #7fd0fa 0%, var(--mw-blue-400) 45%, var(--mw-blue-600) 100%);
    box-shadow: 0 4px 0 var(--mw-blue-700), 0 10px 20px rgba(11, 58, 104, .3);
    color: #fff;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(14, 63, 118, .45);
    white-space: nowrap;
    transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), box-shadow .16s ease;
}
.mw-discord-btn:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--mw-blue-700), 0 16px 26px rgba(11, 58, 104, .34); color: #fff; }
.mw-discord-btn i, .mw-discord-btn svg { width: 16px; height: 16px; }

.mw-burger {
    display: none;
    padding: 8px 10px;
    border: 3px solid #fff;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--mw-blue-400), var(--mw-blue-600));
    box-shadow: 0 4px 0 rgba(14, 63, 118, .4);
    cursor: pointer;
}
.mw-burger span { display: block; width: 20px; height: 3px; border-radius: 3px; background: #fff; }
.mw-burger span + span { margin-top: 4px; }

/* ==========================================================================
   4. Hero
   ========================================================================== */

.mw-hero {
    position: relative;
    min-height: min(100vh, 900px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 96px 0 56px;
}

.mw-hero-emblem {
    display: block;
    margin: 0 auto clamp(10px, 2vw, 26px);
    width: min(660px, 74vw);
    filter: drop-shadow(0 14px 0 rgba(14, 63, 118, .3)) drop-shadow(0 26px 40px rgba(11, 58, 104, .45));
    animation: mw-float 6s ease-in-out infinite;
}

.mw-hero-copy {
    position: relative;
    max-width: 640px;
    padding: 26px 34px 30px;
    margin-left: -34px;
}

/* A soft dark bed so the headline and lead read over any painting beneath. */
.mw-hero-copy::before {
    content: '';
    position: absolute;
    inset: -10px -20px -14px -40px;
    z-index: -1;
    border-radius: 40px;
    background: radial-gradient(120% 100% at 22% 50%,
        rgba(4, 20, 44, .82) 0%,
        rgba(4, 20, 44, .62) 45%,
        rgba(4, 20, 44, 0) 78%);
}

.mw-hero-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2.1rem, 5vw, 3.9rem);
    line-height: 1.05;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 6px;
    text-shadow: 0 3px 0 var(--mw-blue-600), 0 6px 0 var(--mw-blue-800), 0 14px 28px rgba(11, 58, 104, .45);
}

.mw-hero-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.mw-hero-lead {
    max-width: 520px;
    margin: 14px 0 22px;
    color: #f2fbff;
    font-weight: 600;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(3, 16, 34, .95), 0 1px 3px rgba(3, 16, 34, .9);
}

.mw-hero-status { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.mw-status-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, .8);
    background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .12));
    backdrop-filter: blur(8px);
    box-shadow: 0 5px 0 rgba(14, 63, 118, .22);
    font-weight: 800;
    font-size: .85rem;
}

.mw-status-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    flex: 0 0 auto;
}
.mw-status-dot.is-online  { background: var(--mw-mint); box-shadow: 0 0 12px var(--mw-mint); }
.mw-status-dot.is-offline { background: var(--mw-red);  box-shadow: 0 0 12px var(--mw-red); }

.mw-status-events { display: flex; gap: 6px; flex-wrap: wrap; }
.mw-status-events span {
    padding: 2px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--mw-sun), var(--mw-sun-deep));
    color: #6b3b00;
    font-size: .72rem;
    font-weight: 800;
    border: 2px solid #fff;
}

/* ==========================================================================
   5. News row — one featured card, two stacked, arrow controls
   ========================================================================== */

.mw-rail { position: relative; }

.mw-rail-track {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 12px 4px 18px;
    scrollbar-width: none;
}
.mw-rail-track::-webkit-scrollbar { display: none; }

.mw-arrow {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 3px solid #fff;
    background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .12));
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 0 rgba(14, 63, 118, .3);
    color: #fff;
    cursor: pointer;
    transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), background .16s ease;
}
.mw-arrow:hover { background: linear-gradient(180deg, #fff, #d8f0ff); color: var(--mw-blue-700); transform: translateY(-2px) scale(1.05); }
.mw-arrow[disabled] { opacity: .35; cursor: default; transform: none; }
.mw-arrow-prev { left: -22px; }
.mw-arrow-next { right: -22px; }

/* A rail whose cards all fit needs no arrows at all. */
.mw-rail.is-static > .mw-arrow { display: none; }
.mw-arrow svg, .mw-arrow i { width: 20px; height: 20px; }

.mw-news-card {
    position: relative;
    flex: 0 0 300px;
    scroll-snap-align: start;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .8);
    box-shadow: 0 8px 0 rgba(14, 63, 118, .2), 0 18px 34px rgba(11, 58, 104, .3);
    background: linear-gradient(180deg, var(--mw-blue-400), var(--mw-blue-600));
    transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease;
}
.mw-news-card:hover { transform: translateY(-6px); box-shadow: 0 14px 0 rgba(14, 63, 118, .2), 0 26px 44px rgba(11, 58, 104, .36); }

/* The first card is the feature: larger, and it carries the corner brackets. */
.mw-news-card.is-feature { flex-basis: 430px; }
.mw-news-card:nth-child(2) { margin-top: 34px; }
.mw-news-card:nth-child(3) { margin-top: 18px; }

.mw-news-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.mw-news-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.mw-news-card:hover .mw-news-media img { transform: scale(1.06); }

.mw-news-tag {
    position: absolute;
    top: 10px; left: 10px;
    z-index: 2;
    padding: 3px 12px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: linear-gradient(180deg, var(--mw-mint), var(--mw-mint-deep));
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
.mw-news-tag.is-important { background: linear-gradient(180deg, #ff9d9d, var(--mw-red-deep)); }
.mw-news-tag.is-video     { background: linear-gradient(180deg, var(--mw-grape), var(--mw-grape-deep)); }

.mw-news-body {
    position: relative;
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, rgba(14, 63, 118, .0), rgba(14, 63, 118, .55));
    margin-top: -58px;
}
.mw-news-card.is-feature .mw-news-body { margin-top: -70px; }

.mw-news-body h3 {
    margin: 0 0 4px;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 2px 6px rgba(11, 58, 104, .8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mw-news-card.is-feature .mw-news-body h3 { font-size: 1.2rem; }

.mw-news-meta { font-size: .78rem; color: #dceeff; font-weight: 700; }
.mw-news-meta b { color: var(--mw-sun); font-weight: 800; }

.mw-news-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 26px;
}
/* Flex items refuse to shrink past their content width without min-width:0,
   which pushed this paragraph outside the shell on narrow screens. */
.mw-news-foot p { max-width: 640px; margin: 0; flex: 1 1 320px; min-width: 0; }

/* ==========================================================================
   6. Why-us block
   ========================================================================== */

.mw-why { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 60px); align-items: center; }

.mw-why-art { position: relative; text-align: center; }
.mw-why-art img {
    width: min(360px, 80%);
    filter: drop-shadow(0 18px 0 rgba(14, 63, 118, .25)) drop-shadow(0 30px 44px rgba(11, 58, 104, .45));
    animation: mw-float 7s ease-in-out infinite;
}

.mw-why-copy p,
.mw-feature-copy p,
.mw-news-foot p {
    color: #eaf7ff;
    font-weight: 600;
    line-height: 1.7;
    text-shadow: 0 2px 10px rgba(3, 16, 34, .9), 0 1px 3px rgba(3, 16, 34, .85);
}

.mw-perks { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }

.mw-perk {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px 12px 12px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, .8);
    background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .12));
    backdrop-filter: blur(8px);
    box-shadow: 0 5px 0 rgba(14, 63, 118, .22);
    color: #fff;
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.mw-perk:hover { transform: translateY(-3px); color: #fff; }

.mw-perk-icon {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 3px solid #fff;
    background: linear-gradient(180deg, var(--mw-sun), var(--mw-sun-deep));
    color: #6b3b00;
    flex: 0 0 auto;
}
.mw-perk-icon svg, .mw-perk-icon i { width: 20px; height: 20px; }

.mw-perk b {
    display: block;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .9rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ==========================================================================
   7. Feature block — media card + tab carousel
   ========================================================================== */

.mw-feature { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: center; }

.mw-media-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .85);
    box-shadow: 0 10px 0 rgba(14, 63, 118, .22), 0 24px 44px rgba(11, 58, 104, .34);
    background: linear-gradient(180deg, #5ab6ef, var(--mw-blue-600));
}

.mw-media-stage {
    position: relative;
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.mw-media-stage > img { max-height: 92%; width: auto; filter: drop-shadow(0 14px 22px rgba(11, 58, 104, .5)); }
.mw-media-stage > video { width: 100%; height: 100%; object-fit: cover; }

.mw-media-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(11, 58, 104, .18);
    border: 0;
    cursor: pointer;
    transition: background .2s ease;
}
.mw-media-play:hover { background: rgba(11, 58, 104, .3); }
.mw-media-play span {
    width: 74px; height: 74px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 4px solid #fff;
    background: rgba(255, 255, 255, .22);
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 0 rgba(14, 63, 118, .3);
    color: #fff;
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.mw-media-play:hover span { transform: scale(1.08); }
.mw-media-play svg, .mw-media-play i { width: 30px; height: 30px; }

.mw-media-caption {
    padding: 12px 16px 14px;
    background: linear-gradient(180deg, rgba(14, 63, 118, .35), rgba(14, 63, 118, .65));
}
.mw-media-caption h3 {
    margin: 0 0 2px;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
}
.mw-media-caption span { font-size: .8rem; color: #dceeff; font-weight: 700; }

.mw-feature-copy h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 4px;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 0 var(--mw-blue-600), 0 5px 14px rgba(11, 58, 104, .45);
}
.mw-feature-copy h3 svg, .mw-feature-copy h3 i { width: 26px; height: 26px; flex: 0 0 auto; color: var(--mw-sun); }

.mw-feature-rule { height: 3px; border-radius: 3px; margin: 12px 0 16px; background: linear-gradient(90deg, rgba(255,255,255,.8), rgba(255,255,255,0)); }


/* Tab carousel */
.mw-tabs { position: relative; display: flex; align-items: center; gap: 10px; margin: 24px 0; }

.mw-tabs-track {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    scrollbar-width: none;
}
.mw-tabs-track::-webkit-scrollbar { display: none; }

.mw-tab {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 10px 12px;
    border: 3px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: #dceeff;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .74rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.15;
    cursor: pointer;
    text-align: center;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}
.mw-tab svg, .mw-tab i { width: 22px; height: 22px; display: block; margin: 0 auto 6px; }
.mw-tab:hover { color: #fff; transform: translateY(-2px); }
.mw-tab.is-active {
    color: #6b3b00;
    background: linear-gradient(180deg, var(--mw-sun), var(--mw-sun-deep));
    border-color: #fff;
    box-shadow: 0 4px 0 var(--mw-sun-shadow);
}

.mw-tabs .mw-arrow { position: static; translate: none; width: 38px; height: 38px; flex: 0 0 auto; }

.mw-feature-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.mw-textlink {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    border-bottom: 3px solid transparent;
    padding-bottom: 3px;
    transition: color .18s ease, border-color .18s ease;
}
.mw-textlink:hover { color: var(--mw-sun); border-bottom-color: var(--mw-sun); }

/* ==========================================================================
   8. Media gallery
   ========================================================================== */

.mw-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }

/* A lone card would stretch the full shell width and blow the media stage up
   to a wall-sized block; keep it to a sensible size and centred. */
.mw-gallery > :only-child { max-width: 640px; margin-inline: auto; width: 100%; }

.mw-gallery-card {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .8);
    box-shadow: 0 8px 0 rgba(14, 63, 118, .2), 0 20px 36px rgba(11, 58, 104, .32);
    background: linear-gradient(180deg, var(--mw-blue-400), var(--mw-blue-600));
    transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease;
}
.mw-gallery-card:hover { transform: translateY(-7px); box-shadow: 0 15px 0 rgba(14, 63, 118, .2), 0 30px 48px rgba(11, 58, 104, .38); }

.mw-gallery-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.mw-gallery-card .mw-media-stage { aspect-ratio: 4 / 3; }
.mw-gallery-card .mw-media-caption { display: none; }
.mw-gallery-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mw-gallery-card:hover .mw-gallery-media img { transform: scale(1.07); }

.mw-gallery-overlay {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    background: rgba(11, 58, 104, .2);
}
.mw-gallery-overlay span {
    width: 58px; height: 58px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 3px solid #fff;
    background: rgba(255, 255, 255, .22);
    backdrop-filter: blur(4px);
    color: #fff;
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.mw-gallery-card:hover .mw-gallery-overlay span { transform: scale(1.1); }
.mw-gallery-overlay svg, .mw-gallery-overlay i { width: 24px; height: 24px; }

.mw-gallery-body { padding: 12px 14px 14px; background: linear-gradient(180deg, rgba(14, 63, 118, .25), rgba(14, 63, 118, .6)); }
.mw-gallery-body h3 { margin: 0 0 2px; font-family: 'Baloo 2', 'Nunito', sans-serif; font-weight: 800; font-size: .98rem; color: #fff; }
.mw-gallery-body span { font-size: .78rem; color: #dceeff; font-weight: 700; }

/* ==========================================================================
   9. Content grids reused by the lower sections
   ========================================================================== */

.mw-grid { display: grid; gap: 18px; }
.mw-grid-4 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.mw-grid-6 { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.mw-grid-8 { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }

.mw-scroll-box { max-height: 560px; overflow-y: auto; padding-right: 10px; }

/* Champion rows */
.mw-champ-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, .75);
    background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .12));
    backdrop-filter: blur(8px);
    box-shadow: 0 5px 0 rgba(14, 63, 118, .2);
}
.mw-champ-rank {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 3px solid #fff;
    background: linear-gradient(180deg, var(--mw-blue-300), var(--mw-blue-600));
    font-family: 'Baloo 2', sans-serif; font-weight: 800;
    flex: 0 0 auto;
}
.mw-champ-rank.is-1 { background: linear-gradient(180deg, var(--mw-sun), var(--mw-sun-deep)); color: #6b3b00; }
.mw-champ-rank.is-2 { background: linear-gradient(180deg, #f2f8ff, #b9cede); color: var(--mw-blue-800); }
.mw-champ-rank.is-3 { background: linear-gradient(180deg, #ffc98a, #d98634); color: #5a2f00; }
.mw-champ-row img { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; object-fit: cover; background: rgba(255,255,255,.5); flex: 0 0 auto; }
.mw-champ-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; display: block; line-height: 1.2; }
.mw-champ-meta { font-size: .78rem; color: #dceeff; font-weight: 700; }
.mw-champ-level { margin-left: auto; font-weight: 800; color: var(--mw-sun); white-space: nowrap; }

/* Tile used by maps / npcs / events */
.mw-tile {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .75);
    background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .12));
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 0 rgba(14, 63, 118, .18), 0 14px 26px rgba(11, 58, 104, .26);
    color: #fff;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease;
}
.mw-tile:hover { transform: translateY(-5px); box-shadow: 0 11px 0 rgba(14, 63, 118, .18), 0 22px 34px rgba(11, 58, 104, .32); color: #fff; }
.mw-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.mw-tile-sprite { display: grid; place-items: center; height: 96px; padding: 8px; }
.mw-tile-sprite img { width: auto; height: 100%; aspect-ratio: auto; object-fit: contain; }
.mw-tile-body { padding: 9px 12px 12px; text-align: center; }
.mw-tile-body b { display: block; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: .85rem; line-height: 1.2; }
.mw-tile-body span { font-size: .72rem; color: #dceeff; font-weight: 700; }

/* Relic icon */
.mw-relic {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 14px;
    border: 3px solid rgba(255, 255, 255, .8);
    background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(191, 230, 255, .28));
    box-shadow: 0 5px 0 rgba(14, 63, 118, .18);
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.mw-relic:hover { transform: translateY(-4px) scale(1.05); z-index: 5; }
.mw-relic img { max-width: 74%; max-height: 74%; }

.mw-relic-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    translate: -50% 0;
    width: 190px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 3px solid #fff;
    background: linear-gradient(180deg, #5ab6ef, var(--mw-blue-600));
    box-shadow: 0 8px 0 rgba(14, 63, 118, .25), 0 16px 28px rgba(11, 58, 104, .35);
    opacity: 0; visibility: hidden;
    transition: opacity .18s ease, visibility .18s;
    z-index: 10;
    pointer-events: none;
}
.mw-relic:hover .mw-relic-tip { opacity: 1; visibility: visible; }
.mw-relic-tip b { display: block; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: .85rem; }
.mw-relic-tip span { font-size: .72rem; color: #dceeff; font-weight: 600; line-height: 1.35; display: block; }

/* Numbered steps for the How to Play block */
.mw-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mw-step { display: flex; align-items: flex-start; gap: 14px; }
.mw-step-num {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 3px solid #fff;
    background: linear-gradient(180deg, var(--mw-sun), var(--mw-sun-deep));
    color: #6b3b00;
    font-family: 'Baloo 2', sans-serif; font-weight: 800;
    box-shadow: 0 4px 0 var(--mw-sun-shadow);
    flex: 0 0 auto;
}
.mw-step b { display: block; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: .98rem; }
.mw-step p { margin: 2px 0 0; color: #eaf7ff; font-weight: 600; font-size: .88rem; line-height: 1.5; }

/* Event / action cards */
.mw-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 3px solid rgba(255, 255, 255, .75);
    background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .12));
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 0 rgba(14, 63, 118, .2);
    color: #fff;
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.mw-action:hover { transform: translateY(-4px); color: #fff; }
.mw-action-icon { font-size: 1.7rem; line-height: 1; flex: 0 0 auto; }
.mw-action b { display: block; font-family: 'Baloo 2', sans-serif; font-weight: 800; }
.mw-action span { font-size: .8rem; color: #dceeff; font-weight: 600; }

/* ==========================================================================
   10. Footer
   ========================================================================== */

.mw-footer {
    position: relative;
    margin-top: clamp(60px, 8vw, 120px);
    background: linear-gradient(180deg, rgba(20, 45, 80, .55) 0%, rgba(10, 24, 44, .92) 45%, rgba(7, 17, 32, .97) 100%);
    border-top: 3px solid rgba(255, 255, 255, .35);
    backdrop-filter: blur(6px);
}

/* Dotted primary nav, as in the reference */
.mw-footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 6px;
    list-style: none;
    margin: 0;
    padding: 28px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.mw-footer-nav a {
    padding: 4px 14px;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #dceeff;
    transition: color .18s ease;
}
.mw-footer-nav a:hover, .mw-footer-nav .is-active a { color: var(--mw-sun); }
.mw-footer-nav li + li::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--mw-sun);
    box-shadow: 0 0 8px rgba(255, 215, 94, .7);
    vertical-align: middle;
}

.mw-footer-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(20px, 4vw, 56px);
    padding: 34px 0;
}
.mw-footer-main img.mw-footer-logo { height: 62px; width: auto; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .4)); }
.mw-footer-main p { margin: 0; color: #a9c6e0; font-weight: 600; font-size: .88rem; line-height: 1.6; }
.mw-footer-main p b { color: #eaf7ff; }
.mw-footer-tools { display: flex; align-items: center; gap: 14px; }

.mw-footer-legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 0 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: #7f9ab4;
    font-size: .78rem;
    font-weight: 600;
}
.mw-footer-legal a { color: #a9c6e0; }
.mw-footer-legal a:hover { color: var(--mw-sun); }

/* ==========================================================================
   10b. Legacy chrome retirement
   ==========================================================================
   Every page now renders the shared .mw-topbar and .mw-footer. The old
   per-page copyright footers are redundant, so they are hidden rather than
   deleted — restore them by removing this rule.
   ========================================================================== */

footer:not(.mw-footer) { display: none !important; }

/* home.css draws a hairline around every <section>; on the painted world that
   reads as stray boxes floating over the art. */
.mw-section, .mw-hero { border: 0 !important; }

/* Over dark key art the translucent outline button reads as dead grey — give
   it a proper glassy sky tint so it reads as a sibling of the gold CTA. */
.mw-hero .btn-outline-warning,
.mw-hero .btn-outline-primary {
    background: linear-gradient(180deg, rgba(126, 205, 247, .42), rgba(29, 111, 196, .48)) !important;
    backdrop-filter: blur(6px);
}

/* The class tabs carry .active (set by the homepage showcase script) as well
   as .is-active (set by the carousel binder). Both must look selected. */
.mw-tab.active { color: #6b3b00; background: linear-gradient(180deg, var(--mw-sun), var(--mw-sun-deep)); border-color: #fff; box-shadow: 0 4px 0 var(--mw-sun-shadow); }

/* Section anchors must clear the fixed bar when jumped to. */
[id] { scroll-margin-top: 90px; }

/* ==========================================================================
   10c. Pages that carry their own inline <style> palette
   ==========================================================================
   login, register, donate, mall, marketplace, banking, verify, mfa, beta and
   recovery all define a private --gold/--dark/--card set; launcher and
   maintenance define their own. Remapping those names re-skins each page the
   same way the --mw-* remap does for the rest of the site.
   ========================================================================== */

:root {
    /* Shared login/register/shop palette */
    --gold:  var(--mw-sun);
    --dark:  transparent;
    --card:  rgba(255, 255, 255, .26);
    --card2: rgba(255, 255, 255, .16);

    /* launcher.php */
    --bg:     transparent;
    --panel:  rgba(255, 255, 255, .24);
    --text:   #ffffff;
    --muted:  var(--mw-muted);
    --line:   rgba(255, 255, 255, .45);
    --btn:    var(--mw-blue-500);
    --ok:     var(--mw-mint);
    --warn:   var(--mw-sun);
    --bad:    var(--mw-red);

    /* maintenance.php */
    --bg-1:         transparent;
    --bg-2:         transparent;
    --panel-border: rgba(255, 255, 255, .6);
    --text-main:    #ffffff;
    --text-soft:    var(--mw-muted);
    --accent:       var(--mw-sun);
    --accent-2:     var(--mw-blue-400);
    --shadow:       0 10px 0 rgba(14, 63, 118, .22);
}

/* Several of these pages centre their content with body flex, which fights
   the fixed bar's top padding. Normal document flow suits them all. */
body { display: block !important; }

/* Their full-bleed dark photo backdrops and scrims sit in front of the world. */
.login-bg, .register-bg, .verify-bg, .bank-bg, .market-bg { background: transparent !important; }
.login-bg::after, .register-bg::after, .verify-bg::after,
.bank-bg::after, .market-bg::after { display: none !important; }

/* The launcher's console keeps a dark readable ground for its monospace log,
   but gains the cartoon frame so it reads as part of the page. */
.log {
    background: rgba(11, 34, 62, .78) !important;
    border: 3px solid rgba(255, 255, 255, .7) !important;
    border-radius: var(--mw-radius-sm) !important;
    box-shadow: inset 0 3px 10px rgba(4, 16, 32, .6) !important;
    color: #cfe8ff !important;
}
.secondary {
    background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .12)) !important;
    border: 3px solid #fff !important;
    border-radius: var(--mw-radius-pill) !important;
    color: #fff !important;
    box-shadow: 0 4px 0 rgba(14, 63, 118, .32) !important;
}

/* Their panels become cloud plates like everything else. */
.login-card, .register-card, .verify-card, .bank-card, .market-card, .setup-card,
.recovery-card, .beta-card, .listing-card, .listing-popup, .panel, .secret-box,
.code-box, .token-box, .battlepass-option {
    background: linear-gradient(180deg, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, .14) 100%) !important;
    backdrop-filter: blur(8px);
    border: 3px solid rgba(255, 255, 255, .8) !important;
    border-radius: var(--mw-radius) !important;
    box-shadow: 0 8px 0 rgba(14, 63, 118, .2), 0 18px 36px rgba(11, 58, 104, .26) !important;
    color: #fff !important;
}

/* ==========================================================================
   10d. Glass over painted art
   ==========================================================================
   On a flat sky a milky white plate reads fine; over a busy painting it turns
   to soup and swallows its own text. Every translucent surface switches to a
   deep blue glass with a white rim — closer to the reference, and legible.
   ========================================================================== */

.mw-champ-row, .mw-tile, .mw-action, .mw-perk, .mw-status-pill, .mw-relic,
.card, .retro-card, .wiki-card, .map-card, .npc-card, .quest-card, .pet-card,
.rank-card, .guide-card, .profile-card, .mall-card, .donate-card, .info-box,
.score-panel, .leaderboard-panel, .reward-tier-panel, .class-showcase-card,
.status-indicator-box, .login-form, .register-form, .login-guide, .register-guide,
.login-card, .register-card, .verify-card, .bank-card, .market-card, .setup-card,
.recovery-card, .beta-card, .listing-card, .panel, .accordion-item, .list-group-item {
    background: linear-gradient(180deg, rgba(12, 48, 90, .68) 0%, rgba(6, 28, 58, .78) 100%) !important;
    backdrop-filter: blur(10px) saturate(1.1);
    border-color: rgba(255, 255, 255, .62) !important;
}

.mw-relic { background: linear-gradient(180deg, rgba(16, 60, 110, .62), rgba(8, 34, 68, .74)) !important; }

/* Section copy gains a matching floor so paragraphs never fight the art. */
.mw-head p, .mw-why-copy p, .mw-feature-copy p, .mw-news-foot p,
.mw-tile-body span, .mw-champ-meta, .mw-action span span {
    color: #dbeeff;
}

/* Per-page hero bands and full-bleed backdrops paint their own near-black
   plate, which punches a hole in the world. Let the scene show through and
   give the band a soft sky wash instead. */
.ranking-bg, .wiki-bg, .quest-bg, .pet-bg, .news-bg, .profile-bg,
.guide-page::before, .guide-page::after { background: transparent !important; }

.ranking-hero, .wiki-hero, .pet-hero, .page-hero, .quest-header,
.spring-banner, .guide-hero, .mall-hero, .donate-hero, .ranking-event-banner {
    background: linear-gradient(180deg, rgba(12, 48, 90, .55) 0%, rgba(6, 28, 58, .38) 100%) !important;
    border-bottom-color: rgba(255, 255, 255, .45) !important;
}

/* Remaining per-page panels (ranking stat cards, prize cards, filter tabs,
   table shells) still carried the old gold-on-black look. */
.stat-card, .prize-card, .ranking-table-wrap, .filter-tab, .empty-state,
.ranking-event-banner, .prize-place {
    background: linear-gradient(180deg, rgba(12, 48, 90, .68) 0%, rgba(6, 28, 58, .78) 100%) !important;
    backdrop-filter: blur(10px) saturate(1.1);
    border-color: rgba(255, 255, 255, .55) !important;
    border-radius: var(--mw-radius-sm) !important;
    color: #fff !important;
}

.filter-tab {
    border-radius: var(--mw-radius-pill) !important;
    font-family: 'Baloo 2', 'Nunito', sans-serif !important;
    font-weight: 800 !important;
}
.filter-tab.active, .filter-tab:hover {
    background: linear-gradient(180deg, var(--mw-sun), var(--mw-sun-deep)) !important;
    color: #6b3b00 !important;
    border-color: #fff !important;
}

/* The old theme set Cinzel on numbers and stat labels across several pages. */
.stat-card *, .prize-card *, .level-text, .player-name, .rank-badge,
.ranking-event-title, .section-title, .widget-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif !important;
}

/* Page titles keep the rounded display face rather than the old serif. */
.ranking-hero h1, .wiki-hero h1, .pet-hero h1, .page-hero h1, .guide-hero h1,
.ranking-hero h2, .wiki-hero h2, .pet-hero h2, .page-hero h2, .guide-hero h2 {
    font-family: 'Baloo 2', 'Nunito', sans-serif !important;
    letter-spacing: .02em !important;
}

/* ==========================================================================
   11. Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    .mw-why, .mw-feature { grid-template-columns: minmax(0, 1fr); }
    .mw-why-art { order: -1; }
    .mw-footer-main { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
    .mw-arrow-prev { left: -10px; }
    .mw-arrow-next { right: -10px; }

    .mw-burger { display: block; }
    .mw-topbar { justify-content: space-between; }
    .mw-topnav {
        position: absolute;
        transform: none;
        top: 100%; left: 12px; right: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin: 0;
        padding: 10px;
        background: linear-gradient(180deg, #ffffff, #e8f6ff);
        border: 3px solid #fff;
        border-radius: 20px;
        box-shadow: 0 10px 0 rgba(14, 63, 118, .18), 0 22px 40px rgba(11, 58, 104, .34);
        max-height: min(70vh, 520px);
        overflow-y: auto;
        display: none;
    }
    .mw-topnav.is-open { display: flex; }
    .mw-topnav > li > a { color: var(--mw-blue-700); text-shadow: none; padding: 10px 12px; }
    .mw-topnav > li > a::after { display: none; }
    .mw-topnav > li.is-active > a { color: var(--mw-blue-600); background: rgba(127, 208, 250, .28); border-radius: 12px; }
    .mw-submenu {
        position: static;
        translate: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-left: 3px solid rgba(127, 208, 250, .5);
        border-radius: 0;
        margin: 0 0 6px 14px;
        padding: 2px 0 2px 8px;
        background: transparent;
        min-width: 0;
    }
    .mw-submenu a { font-size: .84rem; padding: 7px 10px; }
}

@media (max-width: 767.98px) {
    /* One column has no left/right to alternate between — everything squares
       up to the left edge and the beds stop overhanging the viewport. */
    .mw-section:nth-of-type(even) .mw-head,
    .mw-section .mw-head {
        text-align: left;
        margin-inline: 0;
        max-width: none;
        padding: 18px 18px 20px;
    }
    .mw-section:nth-of-type(even) .mw-head::before,
    .mw-section .mw-head::before {
        inset: -8px -16px -10px -16px;
        border-radius: 28px;
        background: linear-gradient(180deg, rgba(4, 20, 44, .78), rgba(4, 20, 44, .5));
    }
    .mw-section:nth-of-type(even) .mw-head p,
    .mw-section .mw-head p { margin-inline: 0; }
    .mw-section:nth-of-type(even) .mw-head .mw-flourish,
    .mw-section .mw-head .mw-flourish { margin-inline: 0; justify-content: flex-start; }

    .mw-section:nth-of-type(even) .mw-news-foot,
    .mw-section:nth-of-type(even) .mw-feature-actions,
    .mw-section:nth-of-type(even) .mw-perks { flex-direction: row; }
    .mw-section:nth-of-type(even) .mw-rail-track,
    .mw-section:nth-of-type(even) .mw-gallery { direction: ltr; }
    .mw-section:nth-of-type(even) > .mw-shell > .d-flex.justify-content-center,
    .mw-section:nth-of-type(odd)  > .mw-shell > .d-flex.justify-content-center { justify-content: flex-start !important; }
    .mw-section:nth-of-type(even) > .mw-shell > .text-center,
    .mw-section:nth-of-type(odd)  > .mw-shell > .text-center { text-align: left !important; }

    .mw-hero { min-height: auto; padding: 118px 0 60px; }
    .mw-news-card, .mw-news-card.is-feature { flex-basis: min(300px, 82vw); margin-top: 0 !important; }
    .mw-topbar-tools .mw-discord-btn span { display: none; }
    .mw-scroll-box { max-height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
    .mw-world-sky, .mw-world-sun, .mw-isle, .mw-world .mw-cloud-layer { transform: none !important; }
    .mw-bird, .mw-petal, .mw-hero-emblem, .mw-why-art img { animation: none !important; }
    .mw-rail-track, .mw-tabs-track { scroll-behavior: auto; }
}
