/* ==========================================================================
   Shaiya Malefic — design tokens
   ========================================================================== */
:root {
    --void: #090f16;
    --abyss: #111c26;
    --abyss-2: #172633;
    --line: #344754;
    --line-soft: #263943;

    --blood: #a33242;
    --blood-deep: #702735;
    --ember: #ef7d70;
    --gold: #bca268;
    --gold-bright: #e3cb91;

    --ash: #c6d0cf;
    --ash-dim: #9aabaa;
    --ash-bright: #f0f2e9;
    --surface-glass: rgba(13, 23, 31, 0.86);
    --faction-light-color: #92c4da;
    --faction-fury-color: #ef8278;

    --font-display: "Cinzel", serif;
    --font-body: "Manrope", sans-serif;

    --radius: 3px;
    --notch: 18px;
    --content-width: 1200px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* Safety net: nothing on the site should ever need horizontal
       scroll/drag to be reached -- if some element is a hair too wide
       for a phone screen, clip it here instead of letting the whole
       page pan sideways. */
    overflow-x: hidden;
    max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    margin: 0;
    background: var(--void);
    background-image:
        radial-gradient(ellipse at top, rgba(161, 29, 61, 0.10), transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(201, 162, 75, 0.06), transparent 45%);
    color: var(--ash);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    max-width: 100%;
}

/* ==========================================================================
   Page backdrops -- an optional, faint full-bleed atmosphere image fixed
   behind a page's content (set per-page via $pageBackdrop in header.php).
   Deliberately dim + desaturated so body copy always stays readable
   without needing a bespoke overlay tuned per image.
   ========================================================================== */
.page-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center 30%;
    opacity: 0.15;
    filter: saturate(0.7) contrast(1.05);
    pointer-events: none;
}

.page-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, var(--void) 0%, transparent 18%, transparent 70%, var(--void) 100%),
        radial-gradient(ellipse at center, transparent 0%, var(--void) 92%);
}

/* ==========================================================================
   Seasonal particle overlay -- fixed, full-screen, click-through. Each
   theme stylesheet defines what ".fx-piece" looks like via .fx-<theme>;
   this just holds the shared positioning/behavior.
   ========================================================================== */
.seasonal-fx {
    position: fixed;
    inset: 0;
    z-index: 40;
    overflow: hidden;
    pointer-events: none;
}

.fx-piece {
    position: absolute;
    top: -5vh;
    will-change: transform;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ash-bright);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.25;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { max-width: 68ch; }

a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Notched panel — the site's one recurring structural motif: a plated,
   riveted slab with a cut corner, instead of a rounded card.
   ========================================================================== */
.panel {
    position: relative;
    background: linear-gradient(180deg, var(--abyss) 0%, var(--abyss-2) 100%);
    border: 1px solid var(--line);
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
    padding: 28px;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.panel:hover {
    transform: translateY(-3px);
    border-color: rgba(201, 162, 75, 0.4);
    box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(201, 162, 75, 0.08);
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid rgba(201, 162, 75, 0.15);
    clip-path: inherit;
}

/* ==========================================================================
   Top navigation
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(11, 8, 16, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}

/* Two-row header: a top bar (brand | live stats + auth buttons) and a
   separate nav strip below it, so nothing has to compete for space on
   one crowded line. */
.header-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 24px;
    max-width: var(--content-width);
    margin: 0 auto;
}

.header-topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-navbar {
    border-top: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.015);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ash-bright);
    flex: 0 0 auto;
}

/* logo-mark.png is the full "Shaiya Malefic" wordmark + crest artwork
   (supplied pre-cut, transparent background) -- the text is baked into
   the image itself, so there is no separate .brand-text element to size
   any more. It needs to render noticeably taller than a plain icon would
   for its own lettering to stay legible, hence 64px/52px/44px here
   instead of the ~32-48px an icon-only mark could get away with. */
.brand img { height: 64px; width: auto; display: block; filter: drop-shadow(0 0 8px rgba(178, 110, 255, 0.45)); }

@media (max-width: 640px) {
    .brand img { height: 52px; }
}

@media (max-width: 420px) {
    .brand img { height: 44px; }
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    list-style: none;
    padding: 11px 24px;
    max-width: var(--content-width);
    margin: 0 auto;
}

.nav-links a {
    color: var(--ash);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold-bright);
    text-decoration: none;
}

.nav-discord-link {
    display: inline-flex;
    align-items: center;
    color: #7fa4ff !important;
}
.nav-discord-link:hover { color: #a8c0ff !important; }

/* "Server Info" dropdown -- the label itself is a normal link straight to
   /game/server-info; the small caret button next to it is the only thing
   that opens the "Rank System" submenu (see main.js). Desktop also opens
   it on hover/focus, as a bonus, but the caret click/tap is what works
   everywhere, including touch and Remote Desktop / RDP sessions where
   hover can be unreliable. */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; }
.nav-links > li > a,
.nav-links .nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.nav-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--gold);
    opacity: .88;
    transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}
.nav-links a:hover .nav-icon,
.nav-links a.active .nav-icon,
.nav-dropdown:hover .nav-icon,
.nav-dropdown:focus-within .nav-icon { color: var(--gold-bright); opacity: 1; }
.nav-links .nav-dropdown-menu a { display: flex; align-items: center; gap: 10px; }
.nav-dropdown-menu .nav-icon { width: 15px; height: 15px; }

/* Some dropdown labels ("Server Info") are a real <a> link straight to a
   page; others ("Ranks") are a non-navigating <span> that only opens the
   submenu via its caret button -- see includes/header.php. Both need the
   same look, so this styles the shared class rather than the <a>-only
   rule above. */
.nav-links .nav-dropdown-toggle {
    color: var(--ash);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
span.nav-dropdown-toggle { cursor: default; }
.nav-links .nav-dropdown-toggle.active,
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle {
    color: var(--gold-bright);
}

.nav-caret-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: inherit;
    padding: 4px 4px 4px 2px;
    margin: 0;
    cursor: pointer;
    font: inherit;
}
.nav-caret { font-size: 0.7em; transition: transform 0.15s ease; }
.nav-dropdown.open .nav-caret,
.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 6px;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 170px;
    background: var(--abyss);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
    z-index: 40;
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-dropdown-menu li { padding: 0; }
.nav-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    font-size: 0.82rem;
    text-transform: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border-radius: 4px;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: rgba(255, 255, 255, 0.04);
    color: var(--gold-bright);
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--ash-dim);
    white-space: nowrap;
}

.header-stat { display: inline-flex; align-items: center; gap: 6px; color: var(--ash-bright); }
.header-stat .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.header-stat.faction-light .dot { background: #7fc8ff; box-shadow: 0 0 6px rgba(127, 200, 255, 0.7); }
.header-stat.faction-fury .dot { background: var(--ember); box-shadow: 0 0 6px rgba(255, 84, 112, 0.7); }
.header-stat-sep { width: 1px; height: 14px; background: var(--line); }

@media (max-width: 1180px) {
    .header-stats { display: none; }
}

.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-actions .btn { padding: 10px 18px; font-size: 0.88rem; }

.nav-toggle {
    display: none;
    flex: 0 0 auto;
    background: none;
    border: 1px solid var(--line);
    color: var(--ash-bright);
    padding: 8px 12px;
    font-size: 1.1rem;
    cursor: pointer;
}

@media (max-width: 860px) {
    .header-navbar { border-top: none; }
    .nav-links { display: none; }
    .nav-toggle { display: inline-block; }

    /* Login/Register (or Admin/My account/Log out) stay visible in the
       topbar on mobile too -- shrunk down so, together with the brand and
       the hamburger button, the whole row always fits without ever
       needing a horizontal drag to reach the menu button. */
    .header-topbar-right { gap: 8px; }
    .nav-actions { gap: 6px; }
    /* --btn-notch scales the corner clip-path (see .btn) down with the
       button -- left at its default 10px, that diagonal corner cut eats
       a big chunk of these much shorter buttons and chops into the text
       itself, which is the "broken" look reported on mobile. */
    .nav-actions .btn { padding: 8px 12px; font-size: 0.76rem; white-space: nowrap; --btn-notch: 5px; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--abyss);
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        padding: 16px 24px;
        gap: 16px;
        max-height: calc(100vh - 100%);
        overflow-y: auto;
    }

    /* Dropdown becomes a plain inline sub-list on mobile -- no floating
       panel, no hover (touch has no hover). Collapsed by default; tapping
       the caret button (see main.js) adds .open to reveal it. The caret
       is a full-height, clearly bordered tap target here -- on a phone,
       a small icon crammed right next to the "Server Info" text mostly
       just caught the text link instead, so the dropdown never seemed to
       open. */
    .nav-dropdown { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
    .nav-caret-btn {
        border: 1px solid var(--line);
        border-radius: 4px;
        padding: 10px 16px;
        margin-left: 10px;
    }
    .nav-caret { font-size: 0.95rem; }
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: none;
        margin-top: 4px;
        padding: 0 0 0 14px;
        border-left: 1px solid var(--line);
        display: none;
        width: 100%;
    }
    /* Matches the desktop ".nav-dropdown.open .nav-dropdown-menu" rule's
       specificity (3 classes) so this actually wins on mobile too -- that
       desktop rule sets transform: translate(-50%, 0), which (with
       position now static, not absolute) shifted the open submenu half
       its own width off-screen to the left instead of just showing it in
       place, clipped invisible by the page's overflow-x:hidden. */
    .nav-dropdown.open .nav-dropdown-menu { display: block; transform: none; }
    .nav-dropdown-menu a { padding: 6px 0; }
}

@media (max-width: 560px) {
    .header-topbar { padding: 12px 16px; }
}

@media (max-width: 420px) {
    /* Very narrow phones: the logo (with its own baked-in wordmark) is
       sized down separately, right after .brand img above. This just
       tightens the surrounding chrome so Login/Register + the hamburger
       button don't get squeezed off the right edge at this width. */
    .header-topbar { padding: 10px 12px; }
    .nav-actions .btn { padding: 7px 10px; font-size: 0.72rem; --btn-notch: 4px; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - var(--btn-notch, 10px)) 0, 100% var(--btn-notch, 10px), 100% 100%, var(--btn-notch, 10px) 100%, 0 calc(100% - var(--btn-notch, 10px)));
    transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform 500ms ease;
    pointer-events: none;
}

.btn:hover {
    text-decoration: none;
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.6);
}

.btn:hover::before { transform: translateX(120%); }

.btn:active { transform: translateY(0); filter: brightness(1.02); box-shadow: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--blood) 0%, var(--blood-deep) 100%);
    color: var(--ash-bright);
}

.btn-primary:hover { box-shadow: 0 10px 26px -12px rgba(160, 30, 30, 0.55); }

.btn-gold {
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
    color: #241a08;
}

.btn-gold:hover { box-shadow: 0 10px 26px -12px rgba(201, 162, 75, 0.55); }

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ash-bright);
}

.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); box-shadow: 0 10px 22px -14px rgba(201, 162, 75, 0.35); }

.btn-block { width: 100%; }

@media (prefers-reduced-motion: reduce) {
    .btn, .btn::before, .panel { transition: none; }
    .btn:hover, .panel:hover { transform: none; }
}

/* ==========================================================================
   Hero (home page)
   ========================================================================== */
.hero {
    padding: 96px 0 72px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { order: -1; max-width: 220px; margin: 0 auto; }
}

.eyebrow {
    color: var(--ember);
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.hero p.lede {
    font-size: 1.1rem;
    color: var(--ash);
    margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-art { text-align: center; position: relative; }
.hero-art::before {
    content: "";
    position: absolute;
    inset: -10%;
    background: radial-gradient(ellipse at center, rgba(151, 71, 255, 0.22), transparent 65%);
    filter: blur(10px);
    z-index: -1;
}
.hero-art img {
    width: 100%;
    height: auto;
    max-width: 720px;
    filter: drop-shadow(0 0 40px rgba(151, 71, 255, 0.4)) drop-shadow(0 0 90px rgba(161, 29, 61, 0.2));
}

/* Stat strip */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: 48px;
}

.stat {
    background: var(--abyss);
    padding: 20px 24px;
}

.stat .value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--gold-bright);
}

.stat .label {
    font-size: 0.85rem;
    color: var(--ash-dim);
    margin-top: 4px;
}

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

/* Feature row */
.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

@media (max-width: 860px) {
    .feature-row { grid-template-columns: 1fr; }
}

/* Used where .feature-row sits in a narrower column (e.g. next to the
   sidebar on the homepage) -- 2 columns instead of 3, collapsing to 1
   sooner since the available width is already reduced. */
.feature-row--split {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 0;
}

@media (max-width: 700px) {
    .feature-row--split { grid-template-columns: 1fr; }
}

/* Homepage "Latest news" cards */
.update-card .date {
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.update-card h3 { margin-bottom: 8px; }

.update-card-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--gold-bright);
    transition: transform 160ms ease, color 160ms ease;
}

.update-card-link:hover {
    color: var(--gold);
    text-decoration: none;
    transform: translateX(3px);
}

/* Big clickable action tiles (account page, and anywhere a grid of
   primary actions makes sense). An icon badge + title + description +
   an arrow that shifts on hover, with a colored accent that lights up --
   inspired by other Shaiya sites' image-tile account panels, but built
   from our own notched-panel/icon language instead of borrowed art. */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.link-tile {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    position: relative;
}

.link-tile::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gold);
    opacity: 0.5;
    transition: opacity 220ms ease, width 220ms ease;
}

.link-tile:hover::after { opacity: 1; width: 4px; }
.link-tile--blood::after { background: var(--ember); }

.link-tile-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(201, 162, 75, 0.1);
    border: 1px solid var(--border-gold, var(--line));
    color: var(--gold-bright);
    transition: background 220ms ease, transform 220ms ease;
}

.link-tile-icon svg { width: 22px; height: 22px; }

.link-tile--blood .link-tile-icon {
    background: rgba(255, 84, 112, 0.1);
    color: var(--ember);
}

.link-tile:hover .link-tile-icon { transform: scale(1.08); background: rgba(201, 162, 75, 0.18); }
.link-tile--blood:hover .link-tile-icon { background: rgba(255, 84, 112, 0.18); }

.link-tile-body { flex: 1 1 auto; min-width: 0; }
.link-tile-body h3 { margin-bottom: 3px; font-size: 1rem; }
.link-tile-body p { color: var(--ash-dim); font-size: 0.85rem; margin: 0; }

.link-tile-arrow {
    flex: 0 0 auto;
    color: var(--ash-dim);
    font-size: 1.1rem;
    transition: transform 220ms ease, color 220ms ease;
}

.link-tile:hover .link-tile-arrow { transform: translateX(4px); color: var(--gold-bright); }
.link-tile--blood:hover .link-tile-arrow { color: var(--ember); }

/* Notched title bar for a page's primary section headings -- an icon +
   label in a thin gold-edged strip, echoing the "banner" section headers
   other Shaiya sites use, built with our own clip-path/notch language
   instead of a background image. */
.title-bar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px 10px 18px;
    margin-bottom: 4px;
    background: linear-gradient(90deg, rgba(201, 162, 75, 0.14) 0%, rgba(201, 162, 75, 0.02) 100%);
    border: 1px solid var(--border-gold, rgba(201, 162, 75, 0.35));
    border-left: 3px solid var(--gold);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.title-bar-icon {
    display: inline-flex;
    color: var(--gold-bright);
    flex: 0 0 auto;
}

.title-bar-icon svg { width: 20px; height: 20px; }

.title-bar h2 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Boss loot-grade tooltip (game/server-info.php). Hover a boss name to
   see the loot grades its MobItems rows carry, with drop rate. */
.boss-name-hover {
    position: relative;
    cursor: help;
    display: inline-flex;
    align-items: center;
    border-bottom: 1px dotted rgba(201, 162, 75, 0.5);
    padding-bottom: 2px;
}

.drop-tooltip {
    visibility: hidden;
    opacity: 0;
    width: 260px;
    position: absolute;
    z-index: 40;
    left: 0;
    top: calc(100% + 10px);
    background: var(--abyss);
    border: 1px solid var(--line);
    box-shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(201, 162, 75, 0.08);
    padding: 14px;
    transition: opacity 160ms ease, visibility 160ms ease;
    font-family: var(--font-body);
    text-transform: none;
}

.boss-name-hover:hover .drop-tooltip,
.drop-tooltip:hover {
    visibility: visible;
    opacity: 1;
}

.drop-tooltip h4 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.drop-tooltip-count { color: var(--ash-dim); font-size: 0.7rem; text-transform: none; }

.drop-tooltip-list { max-height: 220px; overflow-y: auto; }
.drop-tooltip-list table { width: 100%; border-collapse: collapse; }
.drop-tooltip-list th { font-size: 0.65rem; color: var(--ash-dim); text-transform: uppercase; text-align: left; padding-bottom: 4px; }
.drop-tooltip-list td { font-size: 0.8rem; color: var(--ash); padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.drop-tooltip-list tr:last-child td { border-bottom: none; }

@media (max-width: 640px) {
    .drop-tooltip { left: auto; right: 0; width: 220px; }
}

/* Scroll-reveal (assets/js/main.js). Uses "animation", not "transition",
   so it never fights with .panel's/.btn's own hover transitions on the
   same element. */
.reveal-init { opacity: 0; transform: translateY(16px); }

.reveal-init.reveal-in {
    animation: reveal-in-kf 600ms ease forwards;
}

@keyframes reveal-in-kf {
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-init { opacity: 1; transform: none; }
}

/* Two-column panel layout (account page: characters + change password) */
.two-col-panels {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

.two-col-panels--reverse { grid-template-columns: 1fr 1.3fr; }

@media (max-width: 760px) {
    .two-col-panels,
    .two-col-panels--reverse { grid-template-columns: 1fr; }
}

/* Homepage: three columns side by side, all starting at the same top --
   Top 10 rankings on the left, "Built for the long war" features in the
   middle, Server info / Boss records on the right. See index.php. */
.home-three-col {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

@media (max-width: 980px) {
    .home-three-col { grid-template-columns: 1fr 1fr; }
    .home-three-col > :nth-child(2) { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .home-three-col,
    .home-three-col > :nth-child(2) { grid-template-columns: 1fr; grid-column: auto; }
}

.feature h3 { color: var(--gold-bright); margin-bottom: 8px; }
.feature p { color: var(--ash-dim); font-size: 0.95rem; }

section.section { padding: 64px 0; }
section.section + section.section { border-top: 1px solid var(--line-soft); }

/* ==========================================================================
   Forms (register / login / verify)
   ========================================================================== */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 72px 24px;
}

.auth-panel { width: 100%; max-width: 420px; }

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: 0.85rem;
    color: var(--ash-dim);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.field input,
.field select {
    width: 100%;
    background: var(--void);
    border: 1px solid var(--line);
    color: var(--ash-bright);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.field input:focus,
.field select:focus {
    border-color: var(--gold);
    outline: none;
}

.field-hint { font-size: 0.8rem; color: var(--ash-dim); margin-top: 6px; }

.form-error {
    background: rgba(161, 29, 61, 0.15);
    border: 1px solid var(--blood);
    color: #ffb3c0;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.form-success {
    background: rgba(201, 162, 75, 0.12);
    border: 1px solid var(--gold);
    color: var(--gold-bright);
    padding: 12px 16px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--ash-dim);
}

.g-recaptcha { margin-bottom: 18px; }

/* ==========================================================================
   Tables (ranks / updates)
   ========================================================================== */
table.ranks {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

table.ranks th {
    text-align: left;
    font-family: var(--font-display);
    color: var(--gold-bright);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

table.ranks td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ash);
}

table.ranks tr:hover td { background: rgba(201, 162, 75, 0.05); }

.rank-1 { color: var(--gold-bright); font-weight: 700; }
.rank-2 { color: #d8d0e0; font-weight: 700; }
.rank-3 { color: #c98a4b; font-weight: 700; }

.rank-search-panel { margin-top: 20px; }

.rank-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.rank-search-field { margin-bottom: 0; }

.rank-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-search-message { margin: 14px 0 0; }

.rank-search-results {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.rank-search-result {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
}

.rank-search-player,
.rank-search-positions {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 18px;
}

.rank-search-player > strong { color: var(--gold-bright); }
.rank-search-details { color: var(--ash-dim); font-size: 0.88rem; }
.rank-search-positions > span { color: var(--ash-dim); }
.rank-search-positions strong { color: var(--ash-bright); }

.faction-light { color: #7fc8ff; }
.faction-fury { color: var(--ember); }

.faction-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: middle;
}
.faction-dot-light { background: #7fc8ff; box-shadow: 0 0 6px rgba(127, 200, 255, 0.6); }
.faction-dot-fury { background: var(--ember); box-shadow: 0 0 6px rgba(255, 84, 112, 0.6); }

/* ==========================================================================
   Updates / news list
   ========================================================================== */
.update-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--line-soft);
}

.update-item:first-child { padding-top: 0; }
.update-item .date { color: var(--ash-dim); font-size: 0.85rem; margin-bottom: 6px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line-soft);
    padding: 32px 0;
    color: var(--ash-dim);
    font-size: 0.85rem;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--ash-dim); }
.footer-links a:hover { color: var(--gold-bright); }

/* ==========================================================================
   Utility
   ========================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Homepage ranking carousel controls and compact leaderboard rows. */
.home-rank-carousel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.home-rank-carousel__title {
    min-width: 0;
    margin: 0;
    font-size: 1rem;
}

.home-rank-carousel__heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.home-rank-carousel__title-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.home-rank-carousel__controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
}

.home-rank-carousel__position {
    min-width: 2.5em;
    color: var(--ash-dim);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.home-rank-carousel__button {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--gold-bright);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: border-color 160ms ease, background 160ms ease;
}

.home-rank-carousel__button:hover {
    border-color: var(--gold);
    background: rgba(201, 162, 75, 0.08);
}

.home-rank-carousel__button:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 2px;
}

.home-rank-carousel__rank-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 4px;
}

.home-rank-carousel__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-rank-carousel__mvp {
    flex: 0 0 auto;
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 0.68rem;
    white-space: nowrap;
}

/* ==========================================================================
   THE REALM, REFORGED
   A dark-fantasy war room: slate-blue stone, tarnished brass and the
   opposed signals of Light and Fury. These refinements intentionally keep
   the existing PHP hooks and component vocabulary untouched.
   ========================================================================== */
:root {
    color-scheme: dark;
    --panel-shadow: 0 22px 54px rgba(0, 0, 0, .32);
    --gold-wash: rgba(188, 162, 104, .12);
    --focus-ring: #f0d898;
}

html { scrollbar-color: #60747b #0b141b; }
body {
    color: var(--ash);
    background-color: var(--void);
    background-image:
        radial-gradient(ellipse at 50% -18%, rgba(97, 139, 151, .19), transparent 47%),
        radial-gradient(ellipse at 0% 58%, rgba(114, 37, 49, .13), transparent 42%),
        radial-gradient(ellipse at 100% 82%, rgba(153, 130, 78, .08), transparent 36%),
        linear-gradient(180deg, #0d1720 0%, var(--void) 44%, #0b1118 100%);
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .28;
    background-image:
        linear-gradient(115deg, transparent 48%, rgba(176, 195, 183, .035) 49%, transparent 50%),
        linear-gradient(25deg, transparent 48%, rgba(176, 195, 183, .025) 49%, transparent 50%);
    background-size: 42px 42px, 67px 67px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 76%);
}
::selection { color: #10161a; background: var(--gold-bright); }
a { color: var(--gold-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff0bd; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
h1, h2, h3, h4 { text-wrap: pretty; }
h1 {
    max-width: 13ch;
    font-size: clamp(2.55rem, 5vw, 4.7rem);
    letter-spacing: .012em;
    line-height: 1.08;
    text-shadow: 0 8px 30px rgba(0, 0, 0, .36);
}
h2 { font-size: clamp(1.45rem, 2.5vw, 2.1rem); }
.container { max-width: var(--content-width); padding-inline: clamp(18px, 4vw, 44px); }

.site-header {
    background: rgba(8, 15, 21, .91);
    border-bottom: 1px solid rgba(188, 162, 104, .30);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .26);
    backdrop-filter: blur(16px) saturate(120%);
}
.header-topbar { padding-block: 11px; min-height: 82px; }
.brand img {
    height: 68px;
    filter: drop-shadow(0 4px 14px rgba(144, 190, 205, .26));
}
.header-navbar {
    position: relative;
    border-top: 1px solid rgba(188, 162, 104, .12);
    background: linear-gradient(90deg, rgba(30, 49, 58, .44), rgba(12, 22, 29, .78) 38%, rgba(40, 28, 34, .42));
}
.nav-links { padding-block: 0; gap: clamp(18px, 3vw, 38px); }
.nav-links > li { display: flex; align-items: center; min-height: 48px; }
.nav-links a, .nav-links .nav-dropdown-toggle {
    position: relative;
    color: #c3cdca;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .105em;
    transition: color 160ms ease;
}
.nav-links a::after, .nav-links .nav-dropdown-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -8px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright));
    transition: right 180ms ease;
}
.nav-links a:hover::after, .nav-links a.active::after,
.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after { right: 0; }
.nav-links a:hover, .nav-links a.active, .nav-links .nav-dropdown-toggle.active,
.nav-dropdown:hover .nav-dropdown-toggle, .nav-dropdown:focus-within .nav-dropdown-toggle {
    color: var(--gold-bright);
    text-decoration: none;
}
.nav-links a:hover .nav-icon, .nav-links a.active .nav-icon,
.nav-dropdown:hover .nav-icon, .nav-dropdown:focus-within .nav-icon {
    color: var(--gold-bright);
    transform: translateY(-1px);
}
.nav-discord-link { color: #a9c8cf !important; }
.nav-dropdown-menu {
    top: calc(100% - 1px);
    padding: 8px;
    background: #101c25;
    border: 1px solid #52646a;
    border-top: 2px solid var(--gold);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 22px 46px rgba(0, 0, 0, .55);
}
.nav-dropdown-menu a::after { display: none; }
.nav-dropdown-menu a { padding: 10px 12px; color: var(--ash); }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a.active { background: rgba(188, 162, 104, .12); color: var(--gold-bright); }
.header-stats {
    gap: 12px;
    padding: 8px 14px;
    background: rgba(21, 37, 46, .9);
    border-color: #3b555e;
    border-radius: 3px;
    box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.header-stat { font-variant-numeric: tabular-nums; }
.header-stat-sep { background: #526269; }
.header-stat.faction-light .dot { background: var(--faction-light-color); box-shadow: 0 0 8px rgba(146,196,218,.5); }
.header-stat.faction-fury .dot { background: var(--faction-fury-color); box-shadow: 0 0 8px rgba(239,130,120,.45); }
.nav-toggle {
    border-color: #62747a;
    background: rgba(30, 49, 58, .58);
    transition: background 160ms ease, border-color 160ms ease;
}
.nav-toggle:hover { background: rgba(188, 162, 104, .13); border-color: var(--gold); }

.btn {
    min-height: 44px;
    letter-spacing: .065em;
    text-transform: uppercase;
    font-size: .78rem;
    font-weight: 800;
    --btn-notch: 12px;
}
.btn-primary {
    color: #fff3e9;
    background: linear-gradient(135deg, #ad3a48, #722535);
    border-color: rgba(255, 194, 175, .28);
    box-shadow: inset 0 1px rgba(255,255,255,.13), 0 8px 22px rgba(78, 22, 32, .24);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 28px rgba(131, 37, 48, .32); }
.btn-gold {
    color: #171914;
    background: linear-gradient(135deg, #ead49c, #ae9255);
    border-color: rgba(255, 235, 179, .44);
}
.btn-ghost { background: rgba(16, 29, 38, .6); border-color: #627178; }
.btn-ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); background: rgba(188, 162, 104, .1); }

.hero {
    position: relative;
    isolation: isolate;
    padding: clamp(65px, 8vw, 112px) 0 58px;
    background:
        linear-gradient(90deg, rgba(9, 16, 22, .96) 0%, rgba(9, 16, 22, .82) 48%, rgba(9, 16, 22, .16) 100%),
        radial-gradient(ellipse at 76% 44%, rgba(136, 164, 154, .15), transparent 42%),
        linear-gradient(180deg, rgba(21, 42, 51, .28), transparent 70%);
}
.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    z-index: -1;
    background: linear-gradient(90deg, transparent, rgba(188,162,104,.62), rgba(143,185,192,.3), transparent);
}
.hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(28px, 5vw, 72px); }
.hero-grid > div:first-child { position: relative; z-index: 2; }
.hero .eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d5b979;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.hero .eyebrow::before { content: ""; display: block; width: 36px; height: 1px; background: var(--gold); }
.hero p.lede { max-width: 58ch; color: #c3ceca; font-size: clamp(1rem, 1.35vw, 1.15rem); }
.hero-art { min-width: 0; }
.hero-art::before {
    inset: 4% 2%;
    background: radial-gradient(ellipse at center, rgba(112, 167, 178, .22), rgba(121, 48, 57, .10) 42%, transparent 71%);
    filter: blur(20px);
}
.hero-art img {
    max-width: 660px;
    filter: drop-shadow(0 24px 45px rgba(0,0,0,.62)) drop-shadow(0 0 48px rgba(134,184,195,.18));
}
.hero-actions { gap: 12px; }
.stat-strip {
    overflow: hidden;
    margin-top: 42px;
    border: 1px solid #405661;
    background: #405661;
    box-shadow: var(--panel-shadow);
}
.stat { position: relative; background: linear-gradient(145deg, #152631, #101b24); padding: 18px 20px; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 1px; background: rgba(188,162,104,.27); }
.stat .value { color: var(--gold-bright); font-size: clamp(1.5rem, 2vw, 2rem); font-variant-numeric: tabular-nums; }
.stat .label { color: #a8b7b4; line-height: 1.4; }

section.section { padding: clamp(42px, 6vw, 76px) 0; }
section.section + section.section { border-top: 1px solid rgba(115, 144, 149, .18); }
section.section > .container > h2,
.home-three-col > div > h2 {
    position: relative;
    margin: 0 0 24px;
    padding-bottom: 14px;
}
section.section > .container > h2::after,
.home-three-col > div > h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 66px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
}
.home-three-col { grid-template-columns: minmax(250px, 1fr) minmax(280px, 1.15fr) minmax(245px, .92fr); gap: 22px; }
.feature-row { gap: 16px; }
.feature h3 { color: var(--gold-bright); }
.feature p { color: #aebbb8; }

.panel {
    background:
        linear-gradient(145deg, rgba(25, 43, 53, .97), rgba(15, 26, 35, .98)),
        var(--abyss);
    border-color: #405762;
    box-shadow: inset 0 1px rgba(255,255,255,.035), 0 12px 30px rgba(0,0,0,.18);
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
    padding: clamp(20px, 2.4vw, 30px);
}
.panel::before { border-color: rgba(205, 184, 128, .12); }
.panel:hover {
    transform: translateY(-2px);
    border-color: rgba(204, 180, 119, .62);
    box-shadow: inset 0 1px rgba(255,255,255,.045), 0 18px 38px rgba(0,0,0,.3);
}
.home-rank-carousel { min-width: 0; }
.home-rank-carousel__header { padding-bottom: 12px; border-bottom: 1px solid rgba(128,153,153,.23); }
.home-rank-carousel__title { font-size: .94rem; color: #f0eee2; }
.home-rank-carousel__position { color: #aebbb8; font-variant-numeric: tabular-nums; }
.home-rank-carousel__button { border-color: #52666b; color: var(--gold-bright); background: rgba(10,18,24,.32); }
.home-rank-carousel__button:hover { border-color: var(--gold); background: var(--gold-wash); }
.home-rank-carousel ol li { border-bottom-color: rgba(128,153,153,.18) !important; }
.home-rank-carousel a { color: var(--gold-bright); }
.home-rank-carousel a:hover { color: #fff0bd; }
.home-rank-carousel__mvp { color: #ecd28e; letter-spacing: .03em; }
.title-bar {
    background: linear-gradient(90deg, rgba(188,162,104,.14), rgba(188,162,104,.025));
    border-color: rgba(188,162,104,.4);
    border-left-color: var(--gold);
    padding: 11px 23px 11px 18px;
}
.title-bar h2 { color: #f0eee2; }
.title-bar-icon { color: var(--gold-bright); }
.update-card .date { color: #dfc27e; }
.update-card { min-height: 220px; }
.update-card-link { color: var(--gold-bright); }

.link-tile { background: rgba(18,32,41,.62); }
.link-tile:hover { background: rgba(31,49,57,.72); text-decoration: none; }
.link-tile-icon { border-color: rgba(188,162,104,.36); background: rgba(188,162,104,.1); }
.link-tile--blood .link-tile-icon { background: rgba(239,125,112,.1); }
.link-tile-body p { color: #aab9b5; }
.link-tile-arrow { color: #c0ccc6; }
.boss-name-hover { border-bottom-color: rgba(227,203,145,.65); }
.drop-tooltip { background: #101d26; border-color: #53676d; box-shadow: 0 20px 45px rgba(0,0,0,.65); }
.drop-tooltip h4 { color: var(--gold-bright); border-color: #3c5058; }
.drop-tooltip-list td { color: var(--ash); border-color: #293c44; }

.auth-wrap { padding: clamp(42px, 7vw, 82px) 20px; }
.auth-panel { max-width: 470px; }
.auth-panel.panel { padding: clamp(24px, 5vw, 38px); }
.field label { color: #bac7c3; font-weight: 700; }
.field input, .field select {
    min-height: 46px;
    background: #0a141b;
    border-color: #53666c;
    border-radius: 2px;
    color: #f1f1e9;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.field input::placeholder { color: #879896; }
.field input:focus, .field select:focus {
    border-color: var(--gold-bright);
    background: #101e26;
    box-shadow: 0 0 0 3px rgba(227,203,145,.13);
}
.field-hint { color: #aab9b5; }
.form-error { background: rgba(126,35,50,.24); border-color: #a94955; color: #ffd2d0; }
.form-success { background: rgba(111,112,58,.22); border-color: #a5a160; color: #f1e3a5; }
.auth-switch { color: #aab9b5; }

table.ranks { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
table.ranks th {
    position: sticky;
    top: 0;
    color: #e6d29d;
    background: #14232d;
    border-bottom: 1px solid #63736d;
    text-transform: uppercase;
    letter-spacing: .075em;
    font-size: .75rem;
}
table.ranks td { border-bottom-color: rgba(121,147,148,.17); }
table.ranks tbody tr:nth-child(even) td { background: rgba(174,196,185,.025); }
table.ranks tbody tr:hover td { background: rgba(188,162,104,.095); }
.rank-1 { color: #f1d986; }
.rank-2 { color: #c9d7dc; }
.rank-3 { color: #d9a47b; }
.faction-light { color: var(--faction-light-color); }
.faction-fury { color: var(--faction-fury-color); }
.faction-dot-light { background: var(--faction-light-color); box-shadow: 0 0 8px rgba(146,196,218,.4); }
.faction-dot-fury { background: var(--faction-fury-color); box-shadow: 0 0 8px rgba(239,130,120,.4); }
.update-item { border-bottom-color: rgba(121,147,148,.22); }
.update-item .date { color: #c7b579; }

.site-footer {
    position: relative;
    padding: 34px 0;
    background: linear-gradient(180deg, rgba(13,23,30,.35), rgba(7,13,18,.94));
    border-top: 1px solid rgba(188,162,104,.25);
    color: #aab8b4;
}
.site-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(188,162,104,.45), rgba(139,184,193,.28), transparent);
}
.footer-grid { align-items: center; }
.footer-links { flex-wrap: wrap; gap: 10px 22px; }
.footer-links a { color: #bdc8c2; }
.footer-links a:hover { color: var(--gold-bright); text-decoration: none; }

@media (max-width: 980px) {
    .home-three-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .home-three-col > :nth-child(2) { grid-column: 1 / -1; }
    .home-three-col > :nth-child(2) .feature-row { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 860px) {
    .header-topbar { min-height: 72px; }
    .nav-links.open {
        background: rgba(12, 22, 29, .98);
        border-color: rgba(188,162,104,.3);
        box-shadow: 0 20px 30px rgba(0,0,0,.42);
    }
    .nav-links.open > li { min-height: 42px; }
    .nav-links.open a::after, .nav-links.open .nav-dropdown-toggle::after { display: none; }
    .nav-caret-btn { border-color: #51666c; border-radius: 2px; }
    .nav-dropdown-menu { background: transparent; border: 0; border-left: 1px solid #52666b; box-shadow: none; }
    .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); }
}
@media (max-width: 700px) {
    .hero { padding: 54px 0 42px; }
    .hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero-art { order: -1; max-width: 340px; margin: 0 auto; }
    .hero-art img { max-width: 100%; }
    .hero-grid > div:first-child { text-align: center; }
    .hero .eyebrow, .hero-actions { justify-content: center; }
    .hero .lede { margin-inline: auto; }
    .home-three-col { grid-template-columns: 1fr; }
    .home-three-col > :nth-child(2) { grid-column: auto; }
    .home-three-col > :nth-child(2) .feature-row { grid-template-columns: 1fr; }
    .two-col-panels, .two-col-panels--reverse { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .container { padding-inline: 17px; }
    .stat-strip { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .stat { padding: 14px 11px; }
    .stat .value { font-size: 1.35rem; }
    .stat .label { font-size: .72rem; }
    .feature-row { grid-template-columns: 1fr; }
    .footer-grid { flex-direction: column; align-items: flex-start; }
    .footer-links { gap: 10px 16px; }
    .panel { padding: 20px; }
    .table-wrap, .panel[style*="overflow-x:auto"] { overflow-x: auto; }
    table.ranks { min-width: 620px; }
    table.ranks th, table.ranks td { padding: 10px 12px; }
    .rank-search-form { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .brand img { height: 42px; }
    .header-topbar { gap: 6px; }
    .header-topbar-right { gap: 6px; }
    .nav-actions .btn { min-height: 36px; padding: 7px 9px; font-size: .65rem; letter-spacing: .035em; }
    .nav-toggle { padding: 7px 9px; }
    .hero-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .panel:hover, .btn:hover, .link-tile:hover .link-tile-icon { transform: none; }
}

/* Public policy pages and the checkout consent control. */
.policy-page .policy-intro { max-width: 82ch; margin: 0 auto 28px; }
.policy-page .policy-intro h1 { max-width: none; margin: 0 0 12px; font-size: clamp(2rem, 4vw, 3.2rem); }
.policy-kicker { display: flex; align-items: center; gap: 12px; color: var(--gold-bright); font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.policy-kicker::before { content: ""; display: block; width: 36px; height: 1px; background: var(--gold); }
.policy-page .policy-updated { color: var(--ash-dim); font-size: .88rem; }
.policy-page .policy-notice {
    margin-top: 20px;
    padding: 14px 16px;
    color: var(--ash-bright);
    background: rgba(188, 162, 104, .09);
    border: 1px solid rgba(188, 162, 104, .34);
    border-left: 3px solid var(--gold);
}
.policy-stack { display: grid; gap: 18px; }
.policy-card.panel { padding: clamp(20px, 3vw, 30px); }
.policy-card h2 { margin: 0 0 14px; color: var(--gold-bright); }
.policy-card h3 { margin: 22px 0 8px; color: var(--ash-bright); font-size: 1.05rem; }
.policy-card p, .policy-card li { color: var(--ash); line-height: 1.75; }
.policy-card p:last-child { margin-bottom: 0; }
.policy-card ul, .policy-card ol { padding-left: 1.35rem; }
.policy-card li + li { margin-top: 7px; }
.policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.policy-table-wrap { overflow-x: auto; margin-top: 16px; }
.policy-table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: .9rem; }
.policy-table caption { padding: 0 0 10px; color: var(--ash-dim); text-align: left; }
.policy-table th, .policy-table td { padding: 11px 12px; border: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.policy-table th { color: var(--gold-bright); background: rgba(188, 162, 104, .09); }
.policy-table td { color: var(--ash); }
.policy-table tbody tr:nth-child(even) td { background: rgba(174, 196, 185, .025); }
.policy-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 18px; }
.policy-links a { font-weight: 700; }
.dp-checkout-form { margin-top: 18px; }
.policy-consent { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; }
.policy-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--gold-bright); }
.policy-consent label { color: var(--ash); font-size: .86rem; line-height: 1.6; }
.policy-consent label a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }
.policy-consent-help { margin: 0 0 12px; color: var(--ash-dim); font-size: .76rem; }
.dp-payment-options { display: grid; gap: 9px; }
@media (max-width: 700px) {
    .policy-grid { grid-template-columns: 1fr; }
    .policy-page .policy-intro { margin-bottom: 20px; }
}
@media (max-width: 640px) {
    .policy-page .policy-intro { max-width: none; }
    .policy-card.panel { min-width: 0; padding: 18px 16px; }
    .policy-card h2 { font-size: 1.3rem; }
    .policy-card p,
    .policy-card li {
        max-width: 100%;
        font-size: 1rem;
        line-height: 1.65;
        overflow-wrap: anywhere;
        white-space: normal;
    }
    .policy-card ul,
    .policy-card ol { padding-inline-start: 1.1rem; }
}
@media (max-width: 560px) {
    .policy-table-wrap { overflow: visible; }
    .policy-table { display: block; width: 100%; min-width: 0; }
    .policy-table caption { font-size: .82rem; }
    .policy-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .policy-table tbody { display: grid; gap: 10px; }
    .policy-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
        border: 1px solid var(--line-soft);
    }
    .policy-table tbody th {
        grid-column: 1 / -1;
        padding: 10px 12px;
        border: 0;
        border-bottom: 1px solid var(--line-soft);
    }
    .policy-table tbody td {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
        padding: 9px 10px;
        font-size: .8rem;
        overflow-wrap: anywhere;
    }
    .policy-table tbody td::before {
        color: var(--gold-bright);
        font-size: .7rem;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
    .policy-table tbody td:nth-of-type(1)::before { content: "1st offense"; }
    .policy-table tbody td:nth-of-type(2)::before { content: "2nd offense"; }
    .policy-table tbody td:nth-of-type(3)::before { content: "3rd offense"; }
    .policy-table tbody td:nth-of-type(4)::before { content: "4th offense"; }
}

/* Player support ticket inbox and staff replies. */
.login-captcha { margin: 18px 0 22px; overflow-x: auto; }
.login-captcha .g-recaptcha { min-height: 78px; }
.support-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}
.support-page-heading h1 { margin-bottom: 8px; }
.support-page-heading .field-hint { margin: 0; }
.support-layout {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1.35fr);
    gap: 20px;
    align-items: start;
}
.support-layout--admin { grid-template-columns: minmax(290px, .75fr) minmax(0, 1.45fr); }
.support-column { display: grid; gap: 20px; min-width: 0; }
.support-column > .panel h2 { font-size: 1.35rem; }
.support-textarea {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    background: var(--void);
    border: 1px solid var(--line);
    color: var(--ash-bright);
    padding: 12px 14px;
    font: inherit;
}
.support-ticket-list { list-style: none; display: grid; gap: 8px; padding: 0; margin: 16px 0 0; }
.support-ticket-list li { margin: 0; }
.support-ticket-link {
    display: grid;
    gap: 8px;
    padding: 13px;
    background: rgba(9, 15, 22, .48);
    border: 1px solid var(--line-soft);
    color: var(--ash);
    transition: border-color 160ms ease, background 160ms ease;
}
.support-ticket-link:hover,
.support-ticket-link.is-current {
    border-color: rgba(227, 203, 145, .58);
    background: rgba(188, 162, 104, .08);
    text-decoration: none;
}
.support-ticket-title { color: var(--ash-bright); font-weight: 700; overflow-wrap: anywhere; }
.support-ticket-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--ash-dim); font-size: .78rem; }
.support-ticket-date { color: var(--ash-dim); font-size: .74rem; }
.ticket-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 8px;
    border: 1px solid var(--line);
    color: var(--ash-dim);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.ticket-status--open { border-color: rgba(239, 125, 112, .45); color: var(--ember); }
.ticket-status--answered { border-color: rgba(227, 203, 145, .5); color: var(--gold-bright); }
.ticket-status--closed { border-color: rgba(154, 171, 170, .35); color: var(--ash-dim); }
.support-thread-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.support-thread-heading h2 { margin-bottom: 0; overflow-wrap: anywhere; }
.support-thread-heading .field-hint { margin: 0 0 5px; }
.support-thread { display: grid; gap: 12px; max-height: 620px; overflow-y: auto; padding: 2px 4px 2px 0; }
.support-message {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--line);
    background: rgba(9, 15, 22, .5);
}
.support-message--staff {
    border-left-color: var(--gold);
    background: rgba(188, 162, 104, .06);
}
.support-message-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; color: var(--gold-bright); font-size: .8rem; }
.support-message-meta time { color: var(--ash-dim); font-size: .73rem; }
.support-message-body { color: var(--ash); overflow-wrap: anywhere; white-space: normal; }
.support-admin-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, .55fr); gap: 20px; align-items: start; }
.support-filter { display: grid; gap: 7px; }
.support-filter label { color: var(--ash-dim); font-size: .82rem; }
.support-filter select {
    width: 100%;
    background: var(--void);
    border: 1px solid var(--line);
    color: var(--ash-bright);
    padding: 10px 12px;
    font: inherit;
}
.support-empty-state { min-height: 220px; display: grid; place-content: center; text-align: center; }
.support-empty-state h2 { margin-bottom: 8px; }
.support-empty-state .field-hint { margin: 0 auto; }
.support-empty-icon { display: flex; justify-content: center; margin-bottom: 14px; color: var(--gold-bright); }
.support-empty-icon .nav-icon { width: 28px; height: 28px; }
@media (max-width: 900px) {
    .support-layout,
    .support-layout--admin { grid-template-columns: 1fr; }
    .support-admin-actions { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .support-page-heading { flex-direction: column; align-items: stretch; }
    .support-thread-heading { flex-direction: column; }
}
