/* 4Return Royal Night - loaded after classic.css.
   Re-maps the classic tokens to the navy / gold palette and restyles the shared
   c-* components, so every existing view and page stylesheet follows along. */

:root {
    /* Classic tokens, re-mapped */
    --c-night: #080a12;
    --c-soot: #0d111c;
    --c-iron: #121828;
    --c-iron-hi: #182033;
    --c-edge: #263049;
    --c-edge-hi: #3a4668;

    --c-gold: #efc04e;
    --c-gold-hi: #ffdb73;
    --c-gold-lo: #b8882c;

    --c-bone: #f3efe8;
    --c-ash: #9aa6bc;
    --c-dust: #6d7a91;

    /* Parchment surfaces become dark cards with light ink */
    --c-vellum: #121828;
    --c-vellum-lo: #0d111c;
    --c-ink: #f3efe8;
    --c-ink-soft: #c9cfdb;
    --c-rust: #ffdb73;

    --c-blood: #a3271d;
    --c-blood-hi: #ff6a4a;
    --c-moss: #4ade80;

    --c-valorian: #6ea3ff;
    --c-derion: #ff7a62;

    --f-title: 'Cinzel', 'Times New Roman', serif;
    --f-italic: 'Outfit', system-ui, sans-serif;
    --f-text: 'Outfit', system-ui, sans-serif;
    --f-label: 'Outfit', system-ui, sans-serif;
    --f-num: 'Barlow Condensed', 'Outfit', sans-serif;

    --wrap: 1240px;

    /* Royal tokens */
    --rn-line: rgba(186, 204, 255, 0.14);
    --rn-line-strong: rgba(255, 219, 115, 0.45);
    --rn-card: #121828;
    --rn-card-2: #182033;
    --rn-text-2: #c9cfdb;
    --rn-radius: 18px;
    --rn-gold-grad: linear-gradient(180deg, #ffe08a 0%, #efc04e 50%, #c08a28 100%);
    --rn-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

/* ---------- Page transitions ---------- */

/* Cross-document view transitions: the header and the account menu stay put while
   the rest of the page cross-fades, instead of the whole page redrawing at once. */
@view-transition {
    navigation: auto;
}

.rn-header {
    view-transition-name: site-header;
}

.rn-accountnav {
    view-transition-name: account-nav;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.22s;
    animation-timing-function: ease-out;
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }
}

/* ---------- Base ---------- */

body.classic.royal {
    color: var(--c-bone);
    font: 400 16px/1.6 var(--f-text);
    background-color: var(--c-night);
    background-image: none;
}

.royal a {
    color: var(--c-gold-hi);
}

.royal a:hover {
    color: #fff1c2;
}

.royal h1,
.royal h2,
.royal h3 {
    font-family: var(--f-title);
}

.royal .c-wrap {
    max-width: var(--wrap);
    padding-left: 24px;
    padding-right: 24px;
}

.royal .c-main {
    padding-top: 0;
    padding-bottom: 96px;
}

.royal .c-sep {
    color: var(--c-gold);
}

/* ---------- Header ---------- */

.rn-header {
    position: relative;
    z-index: 30;
    background: var(--c-night);
    border-bottom: 1px solid var(--rn-line);
}

.rn-header.is-over {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(8, 10, 18, 0.88) 0%, rgba(8, 10, 18, 0) 100%);
    border-bottom-color: transparent;
}

.rn-header-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
}

.royal .rn-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--c-gold);
}

/* Gold 4Return logo (img/logo-4return.png) */
.rn-brand img {
    display: block;
    width: auto;
    height: 42px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.rn-footer .rn-brand img {
    height: 48px;
}

.rn-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0 30px;
}

.royal .rn-nav a {
    display: inline-block;
    padding: 12px 0;
    font: 500 15px/1.2 var(--f-text);
    letter-spacing: 0.06em;
    color: #d9d4cb;
    border-bottom: 1px solid transparent;
}

.royal .rn-nav a:hover {
    color: var(--c-gold-hi);
}

.royal .rn-nav a.is-active {
    color: var(--c-gold-hi);
    border-bottom-color: var(--c-gold);
}

.rn-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.royal .rn-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    font: 500 15px/1 var(--f-text);
    color: #d9d4cb;
    cursor: pointer;
}

.royal .rn-link:hover {
    color: var(--c-gold-hi);
}

.royal .rn-cta {
    min-height: 44px;
    padding: 0 22px;
    font-size: 15px;
}

.royal .rn-account {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 5px 16px 5px 5px;
    border-radius: 14px;
    background: var(--rn-card);
    border: 1px solid var(--rn-line);
    color: var(--c-bone);
}

.rn-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #24304d 0%, #151b2b 100%);
    border: 1px solid rgba(156, 192, 255, 0.35);
    color: #dbe6ff;
    font: 700 15px/1 var(--f-text);
}

.rn-account-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.rn-account-text b {
    font-size: 14px;
    font-weight: 600;
}

.rn-account-text small {
    font-size: 12px;
    color: var(--c-ash);
}

.rn-toggle {
    display: none;
    align-items: center;
    gap: 4px;
    flex-direction: column;
    justify-content: center;
    width: 48px;
    height: 44px;
    border: 1px solid var(--rn-line);
    border-radius: 10px;
    background: var(--rn-card);
    cursor: pointer;
}

.rn-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--c-gold-hi);
}

.rn-toggle em {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* ---------- Footer ---------- */

.rn-footer {
    border-top: 1px solid var(--rn-line);
    background: #06070d;
}

.rn-footer-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 44px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 32px;
}

.rn-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0 26px;
}

.royal .rn-footer-links a {
    display: inline-block;
    padding: 10px 0;
    font-size: 15px;
    color: var(--c-ash);
}

.royal .rn-footer-links a:hover {
    color: var(--c-gold-hi);
}

.rn-footer-copy {
    margin: 0;
    font-size: 14px;
    color: #8792a8;
}

/* ---------- Notices: toasts, alerts and form errors ----------
   One look for every message the site gives back: a round tone icon, a short title and the text.
   Tones: success (moss), error (ember), warning (gold), info (sky). */

.royal {
    --tone-success: #4ade80;
    --tone-error: #ff6a4a;
    --tone-warning: #efc04e;
    --tone-info: #6ea3ff;
}

.rn-notice-icon {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #0b0e16;
    background: var(--tone, var(--tone-info));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone, #6ea3ff) 18%, transparent), 0 0 18px color-mix(in srgb, var(--tone, #6ea3ff) 45%, transparent);
}

.rn-notice-icon svg {
    width: 18px;
    height: 18px;
}

.is-success,
.c-alert-success { --tone: var(--tone-success); }
.is-error,
.c-alert-error { --tone: var(--tone-error); }
.is-warning,
.c-alert-warning { --tone: var(--tone-warning); }
.is-info,
.c-alert-info { --tone: var(--tone-info); }

/* Toasts (TempData after a redirect) */
.rn-toasts {
    position: fixed;
    z-index: 90;
    top: 92px;
    right: 24px;
    width: min(400px, calc(100vw - 32px));
    display: grid;
    gap: 12px;
    pointer-events: none;
}

.rn-toast {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 44px 18px 16px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--tone) 35%, rgba(186, 204, 255, 0.14));
    background:
        radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tone) 14%, transparent) 0%, transparent 55%),
        rgba(13, 17, 28, 0.96);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    pointer-events: auto;
    animation: rn-toast-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.rn-toast.is-leaving {
    animation: rn-toast-out 0.35s ease both;
}

.rn-toast-body {
    min-width: 0;
    padding-top: 2px;
}

.rn-toast-body b {
    display: block;
    font: 700 15px/1.3 var(--f-title);
    letter-spacing: 0.02em;
    color: var(--c-bone);
}

.royal .rn-toast-body p {
    margin: 3px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--rn-text-2);
}

.rn-toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--c-ash);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.rn-toast-close:hover,
.rn-toast-close:focus-visible {
    background: rgba(186, 204, 255, 0.1);
    color: var(--c-bone);
}

/* Time left before an auto toast closes; holds while hovered */
.rn-toast-timer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--tone);
    opacity: 0.85;
    transform-origin: left center;
    animation: rn-toast-timer 7s linear forwards;
}

.rn-toast:hover .rn-toast-timer,
.rn-toast:focus-within .rn-toast-timer {
    animation-play-state: paused;
}

@keyframes rn-toast-in {
    from { opacity: 0; transform: translateX(28px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes rn-toast-out {
    to { opacity: 0; transform: translateX(28px); }
}

@keyframes rn-toast-timer {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Alerts inside pages (c-alert) */
.royal .c-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--tone) 32%, rgba(186, 204, 255, 0.12));
    background:
        radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--tone) 12%, transparent) 0%, transparent 60%),
        #0d111c;
    color: var(--rn-text-2);
    box-shadow: none;
    font-size: 15px;
    line-height: 1.55;
}

.royal .c-alert .rn-notice-icon {
    width: 28px;
    height: 28px;
}

.royal .c-alert .rn-notice-icon svg {
    width: 15px;
    height: 15px;
}

.c-alert-body {
    min-width: 0;
    padding-top: 3px;
}

.c-alert-body strong {
    color: var(--c-bone);
}

/* Form error summary (asp-validation-summary) */
.royal .validation-summary-errors {
    --tone: var(--tone-error);
    position: relative;
    margin: 0 0 4px;
    padding: 14px 16px 14px 58px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--tone) 35%, rgba(186, 204, 255, 0.12));
    background:
        radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--tone) 12%, transparent) 0%, transparent 60%),
        #0d111c;
    color: var(--rn-text-2);
    font-size: 15px;
    line-height: 1.55;
    animation: rn-shake 0.4s ease both;
}

.royal .validation-summary-errors::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6.5v7' stroke='%230b0e16' stroke-width='2.6' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17.5' r='1.6' fill='%230b0e16'/%3E%3C/svg%3E") center / 15px no-repeat,
        var(--tone);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent), 0 0 18px color-mix(in srgb, var(--tone) 45%, transparent);
}

.royal .validation-summary-errors ul {
    margin: 0;
    padding: 4px 0 0;
    list-style: none;
}

.royal .validation-summary-errors li + li {
    margin-top: 4px;
}

.royal .validation-summary-valid {
    display: none;
}

@keyframes rn-shake {
    0%, 100% { transform: none; }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

/* Field errors: message under the input with a small mark, the input itself glows */
.royal .field-validation-error,
.royal .c-field-error {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    font-size: 13.5px;
    color: #ffa394;
}

.royal .field-validation-error::before,
.royal .c-field-error::before {
    content: '';
    flex: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6.5v7' stroke='%230b0e16' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17.5' r='1.8' fill='%230b0e16'/%3E%3C/svg%3E") center / 11px no-repeat,
        var(--tone-error);
}

.royal .field-validation-valid {
    display: none;
}

.royal .c-input.input-validation-error,
.royal .c-input.input-validation-error:focus {
    border-color: rgba(255, 106, 74, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 106, 74, 0.16);
}

@media (max-width: 640px) {
    .rn-toasts {
        top: auto;
        bottom: 16px;
        right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rn-toast,
    .rn-toast.is-leaving,
    .royal .validation-summary-errors {
        animation: none;
    }

    .rn-toast-timer {
        animation-duration: 12s;
    }
}

/* ---------- Page banner (c-page-header on public pages) ---------- */

.royal-public .c-main .c-page-head {
    position: relative;
    isolation: isolate;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 280px;
    padding: 72px 0 48px;
    margin: 0 0 12px;
    border-bottom: 0;
    box-shadow: none;
}

.royal-public .c-main .c-page-head::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background:
        radial-gradient(ellipse 60% 80% at 50% 50%, rgba(8, 10, 18, 0.4) 0%, rgba(8, 10, 18, 0.84) 70%, rgba(8, 10, 18, 0.97) 100%),
        linear-gradient(180deg, rgba(8, 10, 18, 0) 55%, #080a12 100%),
        var(--page-art) center 40% / cover no-repeat;
}

.royal-public .c-main .c-page-head-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.royal .c-page-kicker {
    font: 600 13px/1 var(--f-text);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.royal-public .c-main .c-page-kicker::before {
    content: '\25C6';
    display: block;
    width: 220px;
    margin: 0 auto 16px;
    font-size: 13px;
    letter-spacing: 0;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(239, 192, 78, 0), #efc04e) left center / 90px 1px no-repeat,
        linear-gradient(90deg, #efc04e, rgba(239, 192, 78, 0)) right center / 90px 1px no-repeat;
}

.royal .c-page-title {
    margin: 10px 0 0 !important;
    font: 800 clamp(34px, 5vw, 60px)/1.05 var(--f-title) !important;
    color: var(--c-bone);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

.royal .c-page-lead {
    margin-top: 10px !important;
    max-width: 620px;
    font-size: 17px;
    color: var(--rn-text-2);
}

.royal-public .c-main .c-page-actions {
    justify-content: center;
    margin-top: 8px;
}

/* Panel pages: the page header is a card with art */
.royal-panel .c-page-head {
    position: relative;
    overflow: hidden;
    padding: 30px 32px;
    margin: 0;
    border-radius: var(--rn-radius);
    border: 1px solid var(--rn-line);
    box-shadow: none;
    background:
        linear-gradient(90deg, rgba(8, 10, 18, 0.96) 0%, rgba(8, 10, 18, 0.72) 55%, rgba(8, 10, 18, 0.45) 100%),
        var(--page-art) center 40% / cover no-repeat;
}

.royal-panel .c-page-title {
    font-size: clamp(28px, 3.4vw, 42px) !important;
}

/* Thin art band under the header on panel pages */
.rn-panel-band {
    height: 140px;
    margin-bottom: -96px;
    background:
        linear-gradient(180deg, rgba(8, 10, 18, 0.55) 0%, #080a12 100%),
        var(--page-art) center 45% / cover no-repeat;
}

.royal-panel .c-main {
    position: relative;
}

/* ---------- Boxes ---------- */

.royal .c-box {
    background: linear-gradient(180deg, var(--rn-card) 0%, var(--c-soot) 100%);
    border: 1px solid var(--rn-line);
    border-radius: var(--rn-radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

.royal .c-box::before,
.royal .c-box::after {
    display: none;
}

.royal .c-box-title {
    margin: 0 !important;
    padding: 18px 22px 14px;
    text-align: left;
    font: 700 18px/1.25 var(--f-title) !important;
    letter-spacing: 0.02em;
    color: var(--c-bone);
    text-shadow: none;
    background: none;
    border-bottom: 1px solid var(--rn-line);
    box-shadow: none;
}

.royal .c-box-title::before {
    content: '\25C6';
    position: static;
    display: inline-block;
    width: auto;
    height: auto;
    margin-right: 10px;
    background: none;
    box-shadow: none;
    transform: none;
    color: var(--c-gold);
    font-size: 11px;
    vertical-align: 2px;
}

.royal .c-box-title::after {
    display: none;
}

.royal .c-box-body {
    padding: 20px 22px 24px;
}

.royal .c-box-body-flush {
    padding: 0 0 18px;
}

.royal .c-box-note {
    color: var(--c-ash);
    font-style: normal;
}

.royal .c-box-link {
    padding: 14px 22px 0;
    font: 600 14px/1 var(--f-text);
    letter-spacing: 0.02em;
}

.royal .c-muted {
    color: var(--c-ash);
    font-style: normal;
}

/* Parchment becomes a plain dark surface */
.royal .c-parchment {
    margin: 0;
    padding: 6px 22px 22px;
    color: var(--c-bone);
    background: none;
    box-shadow: none;
}

.royal .c-parchment-foot {
    border-top: 1px solid var(--rn-line);
}

/* ---------- Buttons ---------- */

.royal .c-btn {
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    font: 600 15px/1 var(--f-text);
    letter-spacing: 0.03em;
    text-transform: none;
    text-shadow: none;
    transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.royal .c-btn-lg {
    min-height: 56px;
    padding: 0 30px;
    font-size: 17px;
}

.royal .c-btn-sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.royal .c-btn-block + .c-btn-block {
    margin-top: 10px;
}

.classic.royal .c-btn-gold {
    color: #1a1204;
    font-family: var(--f-title);
    font-weight: 800;
    letter-spacing: 0.05em;
    background: var(--rn-gold-grad);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 0 0 1px #7a5512, 0 10px 28px rgba(239, 192, 78, 0.22);
}

.classic.royal .c-btn-gold:hover {
    color: #1a1204;
    filter: brightness(1.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 0 0 1px #7a5512, 0 14px 36px rgba(239, 192, 78, 0.38);
}

.classic.royal .c-btn-red {
    color: #fff;
    background: linear-gradient(180deg, #e0574a 0%, #b8302a 55%, #8f2019 100%);
    box-shadow: inset 0 1px 0 rgba(255, 200, 190, 0.35), 0 0 0 1px #5e140f, 0 10px 28px rgba(184, 48, 42, 0.25);
}

.classic.royal .c-btn-red:hover {
    color: #fff;
}

.classic.royal .c-btn-ghost {
    color: var(--c-gold-hi);
    background: rgba(8, 10, 18, 0.35);
    border-color: var(--rn-line-strong);
    box-shadow: none;
}

.classic.royal .c-btn-ghost:hover {
    color: #fff1c2;
    background: rgba(239, 192, 78, 0.08);
}

.classic.royal .c-btn-ink {
    color: var(--c-bone);
    background: var(--rn-card-2);
    border-color: var(--rn-line);
    box-shadow: none;
}

/* ---------- Forms ---------- */

.royal .c-label {
    font: 600 13px/1.2 var(--f-text);
    letter-spacing: 0.06em;
    text-transform: none;
    color: var(--rn-text-2);
}

.royal .c-input {
    min-height: 52px;
    padding: 0 16px;
    border-radius: 12px;
    background: #0a0d16;
    border: 1px solid rgba(186, 204, 255, 0.2);
    box-shadow: none;
    color: var(--c-bone);
    font: 400 16px/1.4 var(--f-text);
}

.royal textarea.c-input {
    padding: 14px 16px;
}

.royal .c-input:focus {
    outline: none;
    border-color: rgba(255, 219, 115, 0.7);
    box-shadow: 0 0 0 3px rgba(239, 192, 78, 0.14);
}

.royal .c-input::placeholder {
    color: #6d7a91;
}

.royal .c-check input {
    accent-color: var(--c-gold);
}

.royal .c-hint {
    color: var(--c-ash);
    font-style: normal;
}

.royal .c-form-foot {
    color: var(--c-ash);
    border-top-color: var(--rn-line);
}

/* ---------- Auth pages ---------- */

.royal-account .c-main {
    position: relative;
    isolation: isolate;
    padding-top: 64px;
    min-height: 70vh;
}

.royal-account .c-main::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background:
        radial-gradient(ellipse 55% 70% at 50% 40%, rgba(8, 10, 18, 0.55) 0%, rgba(8, 10, 18, 0.9) 75%, #080a12 100%),
        var(--page-art) center 30% / cover no-repeat;
}

.royal .c-auth {
    max-width: 480px;
}

.royal .c-auth .c-box,
.royal .c-auth-wide .c-box {
    background: rgba(13, 17, 28, 0.88);
    backdrop-filter: blur(6px);
    border-color: var(--rn-line-strong);
}

.royal .c-auth .c-box-title {
    padding: 26px 26px 18px;
    text-align: center;
    font-size: 24px !important;
}

.royal .c-auth .c-box-body {
    padding: 22px 26px 28px;
}

.royal .c-captcha {
    border-radius: 12px;
}

/* ---------- News list ---------- */

.royal .c-news {
    padding: 22px 0;
    border-bottom: 1px solid var(--rn-line);
    border-image: none;
}

.royal .c-news-date {
    padding: 10px 0 12px;
    border-radius: 12px;
    background: #0d111c;
    border: 1px solid var(--rn-line);
    box-shadow: none;
}

.royal .c-news-day {
    font: 700 30px/1 var(--f-num);
    color: var(--c-gold-hi);
}

.royal .c-news-month,
.royal .c-news-year {
    font-family: var(--f-text);
    color: var(--c-ash);
}

.royal .c-news-meta {
    color: var(--c-ash);
    font-style: normal;
}

.royal .c-news-title {
    font-family: var(--f-title);
}

.classic.royal .c-news-title a {
    color: var(--c-bone);
    font-weight: 700;
}

.classic.royal .c-news-title a:hover {
    color: var(--c-gold-hi);
}

.royal .c-news-excerpt {
    color: var(--rn-text-2);
}

.classic.royal .c-news-more {
    color: var(--c-gold-hi);
    font-family: var(--f-text);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.royal .c-news-tag {
    padding: 4px 12px;
    border-radius: 999px;
    border: 0;
    font: 700 11px/1.2 var(--f-text);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow: none;
    text-shadow: none;
}

.royal .tag-update { background: #efc04e; color: #1a1204; }
.royal .tag-event { background: #8b7cff; color: #120c2e; }
.royal .tag-announcement { background: #6ea3ff; color: #06142e; }
.royal .tag-maintenance { background: #5eead4; color: #04201c; }
.royal .tag-news { background: #c9cfdb; color: #0d111c; }

/* ---------- Article ---------- */

.royal .c-prose {
    color: #d9d4cb;
    font-size: 17px;
    line-height: 1.75;
}

.royal .c-prose h2,
.royal .c-prose h3,
.royal .c-parchment .c-prose h3,
.royal .c-box-body .c-prose h3 {
    font-family: var(--f-title);
    color: var(--c-bone);
}

.royal .c-prose a,
.royal .c-parchment .c-prose a {
    color: var(--c-gold-hi);
}

.royal .c-prose blockquote {
    border-left: 3px solid var(--c-gold);
    border-radius: 0 12px 12px 0;
    background: rgba(239, 192, 78, 0.06);
    color: var(--c-bone);
}

.royal .c-prose img {
    border-radius: 14px;
}

.royal .c-prose hr {
    border-color: var(--rn-line);
}

/* Older posts from the HTML editor carried dark inline colours; BBCode colours are on purpose */
.royal .c-parchment .c-prose:not(.bb-content) [style] {
    color: inherit !important;
}

/* ---------- Tables ---------- */

.royal .c-table-wrap {
    border-radius: 14px;
}

.royal .c-table th,
.royal .c-parchment .c-table th {
    padding: 14px 18px;
    font: 600 12px/1.2 var(--f-text);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-ash);
    background: transparent;
    border-bottom: 1px solid var(--rn-line);
}

.royal .c-table td,
.royal .c-parchment .c-table td {
    padding: 15px 18px;
    color: var(--c-bone);
    border-bottom: 1px solid rgba(186, 204, 255, 0.07);
}

.royal .c-table tbody tr:hover td {
    background: rgba(239, 192, 78, 0.04);
}

.royal .c-table .is-num {
    font: 700 20px/1 var(--f-num);
}

.royal .c-kv th {
    color: var(--c-ash);
    font-family: var(--f-text);
}

.royal .c-kv td,
.royal .c-kv th {
    border-color: var(--rn-line);
}

/* ---------- Stats ---------- */

.royal .c-stats {
    gap: 16px;
}

.royal .c-stat {
    padding: 22px 24px;
    border-radius: 16px;
    background: var(--rn-card);
    border: 1px solid var(--rn-line);
    box-shadow: none;
    text-align: left;
}

.royal .c-stat::before,
.royal .c-stat::after {
    display: none;
}

.royal .c-stats .c-stat:first-child {
    background: linear-gradient(160deg, #2a2210 0%, var(--rn-card) 70%);
    border-color: var(--rn-line-strong);
}

.royal .c-stat-label {
    font: 600 12px/1.2 var(--f-text);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-ash);
}

.royal .c-stats .c-stat:first-child .c-stat-label,
.royal .c-stats .c-stat:first-child .c-stat-value {
    color: var(--c-gold-hi);
}

/* Dashboard: Moonstones and Bonus Points tiles carry the in-game currency icons */
.royal-panel .c-stats .c-stat:nth-child(-n+2) .c-stat-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.royal-panel .c-stats .c-stat:nth-child(-n+2) .c-stat-label::before {
    content: '';
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid rgba(156, 192, 255, 0.35);
    background: url('../img/icons/moonstone.png') center / cover no-repeat;
}

.royal-panel .c-stats .c-stat:nth-child(2) .c-stat-label::before {
    background-image: url('../img/icons/bonus-points.png');
}

.royal .c-stat-value {
    margin-top: 6px;
    font: 700 44px/1 var(--f-num);
    color: var(--c-bone);
    text-shadow: none;
}

.royal .c-stat-note {
    color: var(--c-ash);
    font-style: normal;
}

/* Character name / kingdom cells with game icons (dashboard table) */
.rn-hero-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.rn-hero-cell img {
    flex: none;
    object-fit: contain;
}

.royal .rn-hero-link {
    color: var(--c-bone);
    text-decoration: none;
}

.royal .rn-hero-link:hover,
.royal .rn-hero-link:focus-visible {
    color: var(--c-gold-hi);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Badges, chips, pills ---------- */

.royal .c-badge {
    border-radius: 999px;
    border: 0;
    padding: 4px 10px;
    font: 700 11px/1.2 var(--f-text);
    letter-spacing: 0.08em;
}

.royal .c-badge-gold { background: rgba(239, 192, 78, 0.16); color: #ffdb73; }
.royal .c-badge-green { background: rgba(74, 222, 128, 0.15); color: #86efac; }
.royal .c-badge-red { background: rgba(255, 106, 74, 0.15); color: #ffa394; }
.royal .c-badge-blue { background: rgba(110, 163, 255, 0.16); color: #9cc0ff; }
.royal .c-badge-purple { background: rgba(139, 124, 255, 0.18); color: #c4bbff; }
.royal .c-badge-muted { background: rgba(186, 204, 255, 0.1); color: #c9cfdb; }

.classic.royal .c-chip {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(186, 204, 255, 0.16);
    background: #0d111c;
    color: var(--rn-text-2);
    font: 500 14px/1 var(--f-text);
    letter-spacing: 0.02em;
    text-transform: none;
    box-shadow: none;
}

.classic.royal .c-chip:hover {
    color: var(--c-gold-hi);
    border-color: var(--rn-line-strong);
}

.classic.royal .c-chip.is-active {
    color: var(--c-gold-hi);
    border-color: rgba(255, 219, 115, 0.6);
    background: rgba(239, 192, 78, 0.12);
}

.royal .c-pill {
    border-radius: 999px;
    font-family: var(--f-text);
}

/* ---------- Cards, steps, lists ---------- */

.royal .c-card {
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--rn-card-2) 0%, var(--rn-card) 100%);
    border: 1px solid var(--rn-line);
    box-shadow: none;
}

.royal .c-card.is-selected {
    border-color: rgba(255, 219, 115, 0.7);
    box-shadow: 0 0 0 1px rgba(255, 219, 115, 0.25), 0 14px 40px rgba(239, 192, 78, 0.18);
}

.royal .c-card-title {
    font: 700 19px/1.25 var(--f-title);
    color: var(--c-bone);
}

.royal .c-card-meta {
    color: var(--c-ash);
    font-style: normal;
}

.royal .c-step-num {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 219, 115, 0.5);
    background: radial-gradient(circle, rgba(239, 192, 78, 0.18) 0%, rgba(239, 192, 78, 0) 70%);
    color: var(--c-gold-hi);
    font: 800 17px/1 var(--f-title);
    box-shadow: none;
    transform: none;
}

.royal .c-step-num::before,
.royal .c-step-num::after {
    display: none;
}

.royal .c-linklist a {
    color: var(--rn-text-2);
    font-family: var(--f-text);
}

.royal .c-linklist a::before {
    color: var(--c-gold);
}

.royal .c-linklist a:hover {
    color: var(--c-gold-hi);
}

.royal .c-pager span,
.classic.royal .c-pager a {
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(186, 204, 255, 0.16);
    background: #0d111c;
    font: 600 15px/1 var(--f-text);
    color: var(--c-bone);
    box-shadow: none;
}

.royal .c-pager .is-current {
    background: var(--rn-gold-grad);
    border-color: transparent;
    color: #1a1204;
}

.royal .c-pager .is-disabled {
    color: #6d7a91;
}

.royal .c-blank,
.royal .c-empty,
.royal .c-parchment .c-blank {
    border-radius: 16px;
    border: 1.5px dashed rgba(186, 204, 255, 0.22);
    background: transparent;
    color: var(--c-ash);
}

.royal .c-blank-title,
.royal .c-empty-title,
.royal .c-parchment .c-blank-title {
    font-family: var(--f-title);
    color: var(--rn-text-2);
}

/* ---------- Battle list (schedule widgets) ---------- */

.royal .c-battle {
    border-radius: 12px;
    background: #0d111c;
    border: 1px solid var(--rn-line);
}

.royal .c-countdown {
    font-family: var(--f-num);
    color: var(--c-gold-hi);
}

/* ---------- Account panel ---------- */

.royal .c-panel-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.royal .c-panel-main {
    display: grid;
    gap: 24px;
}

.rn-accountnav {
    position: sticky;
    top: 20px;
    border-radius: var(--rn-radius);
    background: linear-gradient(180deg, var(--rn-card) 0%, var(--c-soot) 100%);
    border: 1px solid var(--rn-line);
    box-shadow: var(--rn-shadow);
    overflow: hidden;
}

.royal .c-panel-user {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
    padding: 20px 20px 18px;
    margin: 0;
    border-bottom: 1px solid var(--rn-line);
    background: linear-gradient(135deg, rgba(110, 163, 255, 0.1) 0%, rgba(110, 163, 255, 0) 70%);
}

.royal .c-panel-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #24304d 0%, #151b2b 100%);
    border: 1px solid rgba(156, 192, 255, 0.35);
    box-shadow: none;
    color: #dbe6ff;
    font: 700 18px/1 var(--f-text);
}

.royal .c-panel-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.royal .c-panel-user-text small {
    font: 500 12px/1.2 var(--f-text);
    letter-spacing: 0.04em;
    text-transform: none;
    font-style: normal;
    color: var(--c-ash);
}

.royal .c-panel-user-text b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 600 15px/1.3 var(--f-text);
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-bone);
}

.rn-role {
    grid-column: 2;
    justify-self: start;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(110, 163, 255, 0.14);
    border: 1px solid rgba(110, 163, 255, 0.3);
    font: 600 11px/1.3 var(--f-text);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9cc0ff;
}

.royal .c-sidenav {
    display: grid;
    gap: 2px;
    padding: 10px;
}

.classic.royal .c-sidenav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--rn-text-2);
    font: 500 15px/1 var(--f-text);
    letter-spacing: 0.01em;
    text-transform: none;
    box-shadow: none;
}

.classic.royal .c-sidenav a::before,
.classic.royal .c-sidenav a::after {
    display: none;
}

.classic.royal .c-sidenav a:hover {
    color: var(--c-gold-hi);
    background: rgba(239, 192, 78, 0.05);
}

.classic.royal .c-sidenav a.is-active {
    color: var(--c-gold-hi);
    background: rgba(239, 192, 78, 0.1);
    box-shadow: inset 2px 0 0 var(--c-gold);
}

.classic.royal .c-sidenav .c-sidenav-admin {
    margin-top: 6px;
    color: #ffa394;
    border-top: 1px solid var(--rn-line);
    border-radius: 0 0 10px 10px;
}

.rn-accountnav-foot {
    padding: 8px 18px 20px;
}

/* ---------- Home ---------- */

.rn-home {
    overflow: hidden;
}

.rn-hero {
    position: relative;
    min-height: 880px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rn-hero-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
    filter: saturate(1.1) brightness(1.35) contrast(1.05);
}

.rn-hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 75% 65% at 50% 40%, rgba(8, 10, 18, 0.05) 0%, rgba(8, 10, 18, 0.45) 65%, rgba(8, 10, 18, 0.85) 100%),
        linear-gradient(180deg, rgba(8, 10, 18, 0.35) 0%, rgba(8, 10, 18, 0) 22%, rgba(8, 10, 18, 0) 62%, #080a12 97%);
}

.rn-embers i {
    position: absolute;
    bottom: -10px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffdb73;
    box-shadow: 0 0 10px 2px rgba(255, 180, 80, 0.75);
    opacity: 0;
    animation: rn-rise 11s linear infinite;
}

.rn-embers i:nth-child(1) { left: 8%; animation-delay: 0s; }
.rn-embers i:nth-child(2) { left: 18%; animation-delay: 3.5s; animation-duration: 13s; }
.rn-embers i:nth-child(3) { left: 27%; animation-delay: 6s; }
.rn-embers i:nth-child(4) { left: 38%; animation-delay: 1.5s; animation-duration: 14s; }
.rn-embers i:nth-child(5) { left: 52%; animation-delay: 8s; }
.rn-embers i:nth-child(6) { left: 61%; animation-delay: 2.5s; animation-duration: 12s; }
.rn-embers i:nth-child(7) { left: 70%; animation-delay: 5s; }
.rn-embers i:nth-child(8) { left: 79%; animation-delay: 9.5s; animation-duration: 15s; }
.rn-embers i:nth-child(9) { left: 88%; animation-delay: 4s; }
.rn-embers i:nth-child(10) { left: 94%; animation-delay: 7s; animation-duration: 13s; }

@keyframes rn-rise {
    0% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 0.9; }
    70% { opacity: 0.6; }
    100% { transform: translate(40px, -760px); opacity: 0; }
}

.rn-hero-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 140px 24px 48px;
    text-align: center;
}

.rn-hero-logo {
    margin: 0;
    line-height: 0;
}

/* Gold 4Return logo (img/logo-4return.png, 527x194) */
.rn-hero-logo img {
    width: min(527px, 82vw);
    height: auto;
    filter: drop-shadow(0 0 36px rgba(239, 192, 78, 0.3)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.75));
}

.royal .rn-hero-title {
    margin: 0;
    font: 600 clamp(26px, 3vw, 42px)/1.2 var(--f-title);
    color: var(--c-bone);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.rn-hero-title span {
    color: var(--c-gold-hi);
}

.rn-next {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.rn-next-label {
    margin: 0;
    font-size: 15px;
    color: #d9d4cb;
}

.rn-next-label b {
    color: var(--c-bone);
}

.rn-timer {
    display: flex;
    gap: 10px;
}

.rn-timer-cell {
    width: 92px;
    padding: 12px 0 10px;
    border-radius: 12px;
    background: rgba(13, 17, 28, 0.72);
    border: 1px solid rgba(255, 219, 115, 0.35);
    text-align: center;
}

.rn-timer-cell strong {
    display: block;
    font: 700 40px/1 var(--f-num);
    color: var(--c-gold-hi);
}

.rn-timer-cell span {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-ash);
}

.rn-timer.is-live .rn-timer-cell {
    border-color: var(--c-moss);
}

/* server launch: "the server is live" line once the countdown is over */
.rn-release-live {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(13, 17, 28, 0.72);
    border: 1px solid rgba(74, 222, 128, 0.45);
    font-size: 17px;
    font-weight: 600;
    color: var(--c-bone);
}

.rn-release-live span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-moss);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
}

.rn-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.classic.royal .rn-btn-play {
    min-width: 300px;
    min-height: 64px;
    padding: 0 40px;
    gap: 12px;
    font-size: 21px;
    border-radius: 14px;
}

.royal .rn-hero-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 16px;
    font-weight: 500;
}

.rn-hero-stats {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--rn-line);
    background: rgba(8, 10, 18, 0.6);
}

.rn-stats {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.rn-stat {
    padding: 20px 12px;
    text-align: center;
    border-right: 1px solid rgba(186, 204, 255, 0.12);
}

.rn-stat:last-child {
    border-right: 0;
}

.rn-stat span {
    display: block;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-ash);
}

.rn-stat strong {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font: 700 36px/1.1 var(--f-num);
    color: var(--c-gold-hi);
}

.rn-stat strong i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-moss);
    box-shadow: 0 0 10px var(--c-moss);
}

.rn-stat strong.is-offline {
    color: #ffa394;
}

.rn-stat strong.is-offline i {
    background: var(--c-blood-hi);
    box-shadow: none;
}

.rn-section {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 110px 24px 0;
    box-sizing: border-box;
}

.rn-section-wide {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.rn-home > .rn-section:last-child {
    padding-bottom: 110px;
}

.rn-head {
    text-align: center;
    margin-bottom: 44px;
    padding: 0 24px;
}

.rn-kicker {
    margin: 0;
    font: 600 13px/1 var(--f-text);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.rn-kicker::before {
    content: '\25C6';
    display: block;
    width: 220px;
    margin: 0 auto 16px;
    font-size: 13px;
    letter-spacing: 0;
    background:
        linear-gradient(90deg, rgba(239, 192, 78, 0), #efc04e) left center / 90px 1px no-repeat,
        linear-gradient(90deg, #efc04e, rgba(239, 192, 78, 0)) right center / 90px 1px no-repeat;
}

.royal .rn-title {
    margin: 10px 0 0;
    font: 700 clamp(34px, 4vw, 52px)/1.1 var(--f-title);
    color: var(--c-bone);
}

.rn-center {
    margin-top: 28px;
    text-align: center;
}

/* News cards */
.rn-news {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.royal .rn-news-card {
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 230px;
    display: flex;
    align-items: flex-end;
    border-radius: var(--rn-radius);
    border: 1px solid var(--rn-line);
    color: var(--c-bone);
}

.rn-news-card.is-featured {
    flex: 3 1 560px;
    min-height: 480px;
}

.rn-news-side {
    flex: 2 1 360px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rn-news-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.rn-news-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 10, 18, 0) 25%, rgba(8, 10, 18, 0.95) 100%);
}

.rn-news-card:hover img {
    transform: scale(1.04);
}

.rn-news-body {
    position: relative;
    z-index: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.is-featured .rn-news-body {
    padding: 34px;
}

.rn-news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #d9d4cb;
}

.rn-news-title {
    font: 700 24px/1.2 var(--f-title);
}

.is-featured .rn-news-title {
    font-size: 34px;
    line-height: 1.15;
}

.rn-news-excerpt {
    max-width: 560px;
    color: var(--rn-text-2);
}

/* Kingdoms */
.rn-kingdoms {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--rn-line);
    border-bottom: 1px solid var(--rn-line);
}

.rn-kingdom {
    position: relative;
    overflow: hidden;
    flex: 1 1 480px;
    min-height: 560px;
    display: flex;
    align-items: flex-end;
}

.rn-kingdom.is-valorian {
    justify-content: flex-end;
}

.rn-kingdom > img,
.rn-kingdom > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.3) saturate(1.1);
}

.rn-kingdom::after {
    content: '';
    position: absolute;
    inset: 0;
}

.rn-kingdom.is-valorian::after {
    background: linear-gradient(180deg, rgba(20, 48, 110, 0.12) 0%, rgba(8, 10, 18, 0.25) 40%, rgba(8, 10, 18, 0.92) 92%);
}

.rn-kingdom.is-derion::after {
    background: linear-gradient(180deg, rgba(120, 20, 20, 0.12) 0%, rgba(8, 10, 18, 0.25) 40%, rgba(8, 10, 18, 0.92) 92%);
}

.rn-kingdom-body {
    position: relative;
    z-index: 1;
    max-width: 440px;
    padding: 48px 64px 56px 48px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.is-derion .rn-kingdom-body {
    padding: 48px 48px 56px 64px;
}

.rn-kingdom-motto {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.is-valorian .rn-kingdom-motto { color: #9cc0ff; }
.is-derion .rn-kingdom-motto { color: #ffa394; }

.royal .rn-kingdom-name {
    margin: 0;
    font: 800 56px/1 var(--f-title);
    color: var(--c-bone);
}

.rn-crest {
    width: 112px;
    height: auto;
    margin-bottom: 6px;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6));
}

.royal .rn-kingdom-text {
    margin: 2px 0 12px;
    max-width: 400px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--rn-text-2);
}

.rn-kingdom-online {
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--rn-text-2);
}

.rn-kingdom-online i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-moss);
}

.rn-kingdom-vs {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: #0d111c;
    border: 1px solid var(--c-gold-hi);
    box-shadow: 0 0 30px rgba(239, 192, 78, 0.35);
    display: grid;
    place-items: center;
    z-index: 2;
}

.rn-kingdom-vs::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1px;
    height: 1200px;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: linear-gradient(180deg, rgba(255, 219, 115, 0) 0%, #ffdb73 50%, rgba(255, 219, 115, 0) 100%);
    z-index: -1;
}

.rn-kingdom-vs span {
    transform: rotate(-45deg);
    font: 800 20px/1 var(--f-title);
    color: var(--c-gold-hi);
}

/* Battle modes */
.rn-mode-stage {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    border-radius: 20px;
    border: 1px solid var(--rn-line);
}

/* Mode maps (img/modes): crossfade with a slow push-in while a picture is on screen */
.rn-mode-art {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #080a12;
}

.rn-mode-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1.2s ease;
}

.rn-mode-art img.is-shown {
    opacity: 1;
}

/* .is-live stays on a picture until it has faded out, so the push-in never jumps back */
.rn-mode-art img.is-live {
    animation: rn-mode-push 8s linear forwards;
}

.rn-modes.is-paused .rn-mode-art img.is-live {
    animation-play-state: paused;
}

@keyframes rn-mode-push {
    from { transform: scale(1.02); }
    to { transform: scale(1.09); }
}

/* Pictures of the previous mode fade out above the new ones */
.rn-mode-art img.is-old {
    z-index: 1;
    opacity: 0;
}

/* Copy slides in again whenever the mode changes */
.rn-mode-copy.is-swapping > * {
    animation: rn-mode-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.rn-mode-copy.is-swapping > :nth-child(2) { animation-delay: 0.05s; }
.rn-mode-copy.is-swapping > :nth-child(3) { animation-delay: 0.1s; }
.rn-mode-copy.is-swapping > :nth-child(4) { animation-delay: 0.15s; }

@keyframes rn-mode-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* Story-style timer: one segment per map, the current one fills until the switch */
.rn-mode-progress {
    position: absolute;
    top: 22px;
    left: 48px;
    right: 28px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 18px;
}

.rn-mode-segs {
    flex: 1;
    display: flex;
    gap: 6px;
}

.rn-mode-seg {
    position: relative;
    flex: 1;
    height: 18px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.rn-mode-seg::before,
.rn-mode-seg span {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 7px;
    height: 4px;
    border-radius: 2px;
}

.rn-mode-seg::before {
    background: rgba(243, 239, 232, 0.22);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    transition: background 0.2s ease;
}

.rn-mode-seg:hover::before {
    background: rgba(243, 239, 232, 0.4);
}

.rn-mode-seg span {
    background: linear-gradient(90deg, var(--c-gold-hi) 0%, var(--accent, var(--c-gold-hi)) 100%);
    box-shadow: 0 0 10px color-mix(in srgb, var(--accent, #ffdb73) 55%, transparent);
    transform: scaleX(var(--fill, 0));
    transform-origin: left center;
}

.rn-mode-seg:focus-visible {
    outline: 2px solid var(--c-gold-hi);
    outline-offset: 2px;
    border-radius: 4px;
}

.rn-mode-next {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font: 600 12px/1 var(--f-text);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(243, 239, 232, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Pause glyph appears while the showcase is held */
.rn-mode-next::before {
    content: '';
    width: 8px;
    height: 10px;
    border-left: 3px solid currentColor;
    border-right: 3px solid currentColor;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.rn-modes.is-paused .rn-mode-next::before {
    opacity: 1;
}

.rn-modes.is-static .rn-mode-next,
.rn-modes.is-static .rn-mode-seg span {
    display: none;
}

/* Active tab underline doubles as the mode's overall progress */
.rn-mode-tab.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(243, 239, 232, 0.1);
}

@media (max-width: 640px) {
    .rn-mode-progress {
        top: 14px;
        left: 20px;
        right: 16px;
        gap: 12px;
    }

    .rn-mode-next {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rn-mode-art img.is-live,
    .rn-mode-copy.is-swapping > * {
        animation: none;
    }
}

.rn-mode-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 10, 18, 0.95) 0%, rgba(8, 10, 18, 0.75) 40%, rgba(8, 10, 18, 0.1) 75%);
}

.rn-mode-copy {
    position: relative;
    z-index: 1;
    max-width: 520px;
    padding: 48px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rn-mode-count {
    margin: 0;
    font: 600 20px/1 var(--f-num);
    letter-spacing: 0.08em;
    color: var(--c-ash);
}

.rn-mode-count b {
    font-size: 34px;
}

.royal .rn-mode-name {
    margin: 0;
    font: 800 clamp(34px, 4vw, 52px)/1.05 var(--f-title);
    color: var(--c-bone);
}

.rn-mode-blurb {
    margin: 0;
    font-size: 17px;
    color: var(--rn-text-2);
}

.rn-mode-tags {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rn-mode-tags li {
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(13, 17, 28, 0.8);
    border: 1px solid rgba(186, 204, 255, 0.16);
}

.rn-mode-tags span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-ash);
}

.rn-mode-tags b {
    font-weight: 600;
}

.royal .rn-mode-group {
    margin: 32px 0 0;
    display: flex;
    align-items: center;
    gap: 14px;
    font: 600 12px/1 var(--f-text);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.rn-mode-group::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(239, 192, 78, 0.4), rgba(239, 192, 78, 0));
}

.rn-mode-tabs {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.rn-mode-tab {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 76px;
    padding: 14px 20px;
    border-radius: 14px;
    border: 1px solid rgba(186, 204, 255, 0.12);
    background: #0d111c;
    color: var(--c-bone);
    font-family: var(--f-text);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.rn-mode-tab:hover {
    border-color: rgba(255, 219, 115, 0.3);
}

.rn-mode-tab.is-active {
    background: var(--rn-card-2);
    border-color: rgba(255, 219, 115, 0.45);
}

.rn-mode-tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    height: 3px;
    background: var(--accent);
    transform: scaleX(var(--mode-p, 1));
    transform-origin: left center;
}

.rn-mode-tab-num {
    font: 700 26px/1 var(--f-num);
    color: #6d7a91;
}

.rn-mode-tab.is-active .rn-mode-tab-num {
    color: var(--accent);
}

.rn-mode-tab-copy {
    display: flex;
    flex-direction: column;
}

.rn-mode-tab-copy b {
    font: 700 17px/1.25 var(--f-title);
}

.rn-mode-tab-copy small {
    font-size: 13px;
    color: var(--c-ash);
}

/* Steps */
.rn-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.rn-steps li {
    padding: 34px 30px;
    border-radius: var(--rn-radius);
    background: linear-gradient(180deg, var(--rn-card) 0%, var(--c-soot) 100%);
    border: 1px solid var(--rn-line);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.rn-step-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 219, 115, 0.5);
    background: radial-gradient(circle, rgba(239, 192, 78, 0.18) 0%, rgba(239, 192, 78, 0) 70%);
    color: var(--c-gold-hi);
}

.royal .rn-steps h3 {
    margin: 4px 0 0;
    font: 700 22px/1.25 var(--f-title);
}

.royal .rn-steps h3 a {
    color: var(--c-bone);
}

.royal .rn-steps h3 a:hover {
    color: var(--c-gold-hi);
}

.rn-steps p {
    margin: 0;
    color: var(--c-ash);
}

/* Community */
.rn-community {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: center;
    border-radius: 22px;
    border: 1px solid var(--rn-line);
}

.rn-community img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 60%;
}

.rn-community::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 10, 18, 0.95) 0%, rgba(8, 10, 18, 0.7) 45%, rgba(30, 34, 80, 0.35) 100%);
}

.rn-community-body {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 56px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.royal .rn-community-title {
    margin: 0;
    font: 800 clamp(32px, 4vw, 48px)/1.1 var(--f-title);
    color: var(--c-bone);
}

.rn-community-body p {
    margin: 12px 0 0;
    max-width: 480px;
    font-size: 17px;
    color: var(--rn-text-2);
}

.rn-community-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.classic.royal .rn-btn-discord {
    min-height: 58px;
    padding: 0 28px;
    gap: 12px;
    background: #5865f2;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
}

.classic.royal .rn-btn-discord:hover {
    color: #fff;
}

/* ---------- Page stylesheets: parchment surfaces become cards ---------- */

.royal .rl-scroll,
.royal .ms-bill,
.royal .rv-ledger {
    color: var(--c-bone);
    border-radius: var(--rn-radius);
    border: 1px solid var(--rn-line);
    background: linear-gradient(180deg, var(--rn-card) 0%, var(--c-soot) 100%);
    box-shadow: var(--rn-shadow);
}

.royal .ms-bill {
    border-color: var(--rn-line-strong);
}

.royal .rl-scroll::before,
.royal .rl-scroll::after {
    display: none;
}

.royal .rl-scroll-head,
.royal .rv-ledger-head {
    border-bottom: 1px solid var(--rn-line);
}

.royal .rl-contents,
.royal .ms-case {
    border-radius: var(--rn-radius);
    border: 1px solid var(--rn-line);
    background: linear-gradient(180deg, var(--rn-card) 0%, var(--c-soot) 100%);
    box-shadow: none;
}

.royal .rl-contents-title {
    border-bottom: 1px solid var(--rn-line);
    box-shadow: none;
    font-family: var(--f-title);
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
    .rn-toggle {
        display: inline-flex;
        order: 3;
        flex: none;
    }

    .rn-nav {
        order: 4;
        width: 100%;
    }

    .rn-brand {
        margin-right: auto;
    }

    .royal .rn-link,
    .royal .rn-cta {
        white-space: nowrap;
    }

    .rn-nav ul {
        display: none;
        flex-direction: column;
        padding: 8px 0;
        border-top: 1px solid var(--rn-line);
    }

    .rn-nav ul.is-open {
        display: flex;
    }

    .rn-header.is-over .rn-nav ul.is-open {
        background: rgba(8, 10, 18, 0.96);
        border-radius: 14px;
        padding: 8px 16px;
    }

    .rn-actions {
        order: 2;
    }

    .royal .c-panel-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .rn-accountnav {
        position: static;
    }

    .rn-kingdom-vs {
        display: none;
    }

    .rn-kingdom.is-valorian {
        justify-content: flex-start;
    }

    .rn-kingdom-body,
    .is-derion .rn-kingdom-body {
        padding: 40px 28px;
    }
}

@media (max-width: 640px) {
    .rn-actions .rn-account-text {
        display: none;
    }

    .rn-hero {
        min-height: 760px;
    }

    .rn-hero-inner {
        padding-top: 150px;
    }

    .rn-header-inner {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .rn-actions {
        gap: 10px;
    }

    .rn-header:not(.is-over) .rn-header-inner,
    .rn-header-inner:has(.rn-nav ul.is-open) {
        flex-wrap: wrap;
    }

    .royal .rn-cta {
        padding: 0 14px;
    }

    .rn-brand img {
        height: 36px;
    }

    .rn-timer-cell {
        width: 80px;
    }

    .classic.royal .rn-btn-play {
        min-width: 0;
        width: 100%;
    }

    .rn-stat {
        border-right: 0;
        border-bottom: 1px solid rgba(186, 204, 255, 0.12);
    }

    .rn-mode-copy,
    .rn-community-body {
        padding: 32px 24px;
    }

    .royal-public .c-main .c-page-head {
        min-height: 220px;
        padding: 56px 0 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rn-embers {
        display: none;
    }

    .rn-news-card img {
        transition: none;
    }
}

/* Live Discord counts in the community block (DiscordService) */
.royal .rn-discord-live {
    margin: 14px 0 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(8, 10, 18, 0.65);
    border: 1px solid rgba(88, 101, 242, 0.45);
    font-size: 15px;
    color: var(--rn-text-2);
}

.rn-discord-live b {
    color: var(--c-bone);
    font-family: var(--f-num);
    font-size: 17px;
}

.rn-discord-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #3ba55d;
    box-shadow: 0 0 0 3px rgba(59, 165, 93, 0.25);
    animation: rn-discord-pulse 2s ease-in-out infinite;
}

.rn-discord-sep { color: var(--c-dust); }

@keyframes rn-discord-pulse {
    50% { box-shadow: 0 0 0 6px rgba(59, 165, 93, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .rn-discord-dot { animation: none; }
}

/* reCAPTCHA v3: the note replaces the floating badge (allowed by Google when the note is shown) */
.c-captcha-note { margin: 4px 0 0; font-size: 12px; line-height: 1.5; text-align: center; opacity: 0.6; }
.c-captcha-note a { color: inherit; text-decoration: underline; }
.grecaptcha-badge { visibility: hidden; }

/* four countdown cells (days too) on narrow phones */
@media (max-width: 420px) {
    .rn-timer {
        gap: 6px;
    }

    .rn-timer-cell {
        width: 68px;
        padding: 10px 0 8px;
    }

    .rn-timer-cell strong {
        font-size: 32px;
    }

    .rn-timer-cell span {
        font-size: 10px;
        letter-spacing: 0.1em;
    }
}

/* hero button before the launch: looks like the button, does nothing */
.classic.royal .rn-btn-play.is-soon,
.classic.royal .rn-btn-play.is-soon:hover {
    cursor: default;
    filter: saturate(0.55) brightness(0.85);
    box-shadow: none;
    transform: none;
}
