:root {
    color-scheme: dark;
    --ink: #080a0c;
    --ink-soft: #0f1317;
    --panel: rgba(15, 18, 21, 0.92);
    --panel-solid: #12161a;
    --panel-raised: #1a1f24;
    --line: rgba(201, 155, 73, 0.28);
    --line-strong: rgba(224, 177, 87, 0.68);
    --gold: #d0a24d;
    --gold-bright: #f2ce82;
    --gold-deep: #8d6429;
    --ivory: #f0e4c8;
    --muted: #a7a394;
    --muted-2: #74766f;
    --blood: #7b2026;
    --blood-bright: #bd4d4d;
    --blue: #416b78;
    --green: #52806a;
    --warning: #c88d32;
    --danger: #b54545;
    --success: #4f8b69;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 24px;
    --content: 1180px;
    --serif: Georgia, "Times New Roman", serif;
    --sans: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--ink);
    color: var(--ivory);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

/* Codex IMPERIVM — archivio condiviso con l'interfaccia nativa di gioco. */
.wiki-v3-page {
    background:
        radial-gradient(circle at 50% 8%, rgba(126, 32, 31, 0.26), transparent 39rem),
        radial-gradient(circle at 14% 48%, rgba(156, 109, 45, 0.1), transparent 34rem),
        #090a0b;
}

.wiki-v3-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(206, 157, 72, 0.34);
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.94) 0%, rgba(12, 9, 7, 0.77) 32%, rgba(31, 18, 11, 0.34) 58%, rgba(5, 5, 5, 0.78) 100%),
        linear-gradient(180deg, rgba(8, 5, 3, 0.03), rgba(8, 6, 5, 0.62)),
        url("../media/codex-window.png") center 18% / cover;
    box-shadow: inset 0 -24px 55px rgba(0, 0, 0, 0.56);
}

.wiki-v3-hero::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, #090a0b 110%);
    content: "";
    pointer-events: none;
}

.wiki-v3-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 310px;
    padding-block: 92px 56px;
}

.wiki-v3-hero-copy {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    padding-right: clamp(250px, 24vw, 380px);
}

.wiki-v3-hero h1 {
    max-width: 780px;
    margin: 0;
    color: #f4e7c7;
    font: 700 clamp(2.6rem, 6vw, 5.7rem)/0.95 var(--serif);
    letter-spacing: -0.045em;
    text-shadow: 0 4px 26px #000;
}

.wiki-v3-hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 20px 0 0;
    color: #c8bc9f;
    font-family: var(--serif);
    font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.wiki-v3-oracle-art {
    position: absolute;
    z-index: 1;
    right: clamp(-22px, 1.2vw, 18px);
    bottom: -84px;
    width: clamp(270px, 22vw, 345px);
    opacity: 1;
    filter:
        saturate(0.96)
        contrast(1.035)
        drop-shadow(0 22px 24px rgba(0, 0, 0, 0.72))
        drop-shadow(0 0 18px rgba(211, 156, 60, 0.18));
    pointer-events: none;
    transform-origin: 62% 62%;
    animation: wiki-oracle-breathe 7s ease-in-out infinite;
}

.wiki-v3-oracle-art img {
    display: block;
    width: 100%;
    height: auto;
}

@keyframes wiki-oracle-breathe {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(0, -5px, 0) scale(1.008); }
}

.wiki-v3-shell { padding-block: 38px 92px; }

.wiki-v3-browser {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 26px;
}

.wiki-v3-sidebar,
.wiki-v3-reader-index {
    align-self: start;
    border: 1px solid rgba(201, 155, 73, 0.32);
    background:
        linear-gradient(rgba(18, 17, 15, 0.96), rgba(10, 11, 12, 0.98)),
        repeating-linear-gradient(135deg, transparent 0 7px, rgba(255, 255, 255, 0.015) 8px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32), inset 0 0 0 4px rgba(0, 0, 0, 0.25);
}

.wiki-v3-search { padding: 22px 20px 18px; border-bottom: 1px solid rgba(201, 155, 73, 0.2); }
.wiki-v3-search label,
.wiki-v3-categories h2 {
    display: block;
    margin: 0 0 9px;
    color: #c9a969;
    font: 700 0.72rem/1 var(--sans);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.wiki-v3-search > div { display: flex; border: 1px solid #51442e; background: #080909; }
.wiki-v3-search input { width: 100%; min-width: 0; padding: 10px 12px; border: 0; outline: 0; background: transparent; color: var(--ivory); }
.wiki-v3-search button { width: 42px; border: 0; border-left: 1px solid #51442e; background: #241d13; color: #d7b66e; cursor: pointer; }
.wiki-v3-search > div:focus-within { border-color: #bf9550; box-shadow: 0 0 0 2px rgba(191, 149, 80, 0.12); }

.wiki-v3-categories { padding: 20px 10px; }
.wiki-v3-categories h2 { padding-inline: 10px; }
.wiki-v3-categories a {
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;
    min-height: 44px;
    padding: 5px 10px;
    border-left: 2px solid transparent;
    color: #bcb39f;
    font-family: var(--serif);
    text-decoration: none;
}
.wiki-v3-categories a:hover { background: rgba(201, 155, 73, 0.07); color: #f1dfb7; }
.wiki-v3-categories a.is-active { border-left-color: #a53d3d; background: linear-gradient(90deg, rgba(123, 32, 38, 0.32), transparent); color: #f0d79d; }
.wiki-v3-category-rune { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid #5f4a2a; color: #d4aa5b; font: 700 0.72rem/1 var(--serif); }

.wiki-v3-sync { display: flex; gap: 10px; margin: 0 18px 20px; padding: 14px; border-top: 1px solid rgba(201, 155, 73, 0.19); color: #8f8a7c; font-size: 0.76rem; line-height: 1.35; }
.wiki-v3-sync > span { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #608363; box-shadow: 0 0 0 3px rgba(96, 131, 99, 0.14); }
.wiki-v3-sync p { margin: 0; }
.wiki-v3-sync strong { display: block; color: #bdb49d; }

.wiki-v3-catalogue > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding: 7px 2px 18px;
    border-bottom: 1px solid rgba(201, 155, 73, 0.28);
}
.wiki-v3-catalogue > header h2 { margin: 2px 0 0; font: 700 clamp(1.8rem, 3vw, 2.6rem)/1 var(--serif); }
.wiki-v3-catalogue > header > span { color: #8c8678; font-size: 0.82rem; }
.wiki-v3-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.wiki-v3-card {
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 18px;
    min-height: 196px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(171, 134, 70, 0.3);
    background: linear-gradient(145deg, rgba(25, 23, 19, 0.96), rgba(11, 12, 13, 0.98));
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.015);
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}
.wiki-v3-card::after { position: absolute; right: -24px; bottom: -42px; color: rgba(156, 113, 49, 0.07); font: 700 9rem/1 var(--serif); content: "I"; }
.wiki-v3-card:hover { z-index: 1; border-color: rgba(228, 183, 94, 0.72); background: linear-gradient(145deg, rgba(39, 31, 21, 0.98), rgba(13, 13, 14, 0.99)); color: inherit; transform: translateY(-2px); }
.wiki-v3-card-number { position: relative; z-index: 1; padding-right: 14px; border-right: 1px solid rgba(201, 155, 73, 0.23); }
.wiki-v3-card-number small { display: block; color: #766d5d; font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; }
.wiki-v3-card-number strong { display: block; margin-top: 6px; color: #d5ad61; font: 700 1.3rem/1 var(--serif); }
.wiki-v3-card > div:last-child { position: relative; z-index: 1; }
.wiki-v3-card-category { color: #a33d3d; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.wiki-v3-card h3 { margin: 7px 0 9px; color: #ebddbc; font: 700 1.32rem/1.15 var(--serif); }
.wiki-v3-card p { display: -webkit-box; margin: 0; overflow: hidden; color: #9d998e; font-size: 0.88rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.wiki-v3-card-open { display: inline-block; margin-top: 16px; color: #cda454; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; }

.wiki-chest-card { min-height: 174px; }
.wiki-chest-card::after { content: "C"; }
.wiki-chest-detail { padding: 4px 2px 10px; }
.wiki-chest-detail-head { display: flex; align-items: center; gap: 14px; margin: 24px 0 18px; padding: 18px; border: 1px solid rgba(171, 134, 70, 0.3); background: #12110f; }
.wiki-chest-detail-head .wiki-v3-category-rune { flex: 0 0 auto; width: 42px; height: 42px; }
.wiki-chest-detail-head small { color: #817765; font-size: 0.62rem; letter-spacing: 0.1em; }
.wiki-chest-detail-head h3 { margin: 4px 0 0; color: #ebddbc; font: 700 1.45rem/1.15 var(--serif); }
.wiki-chest-content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wiki-chest-content { padding: 14px; border: 1px solid rgba(171, 134, 70, 0.25); background: #0f0f0e; }
.wiki-chest-content > div { display: flex; align-items: center; gap: 10px; }
.wiki-chest-content strong { color: #d9c49c; font-size: 0.9rem; }
.wiki-chest-content p { display: flex; gap: 10px; margin: 9px 0 0 36px; color: #7f786d; font-size: 0.72rem; }
.wiki-chest-content p b { color: #cda454; }
.wiki-chest-content p span { margin-left: auto; color: #a33d3d; }
.wiki-chest-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 24px; }
.wiki-chest-pagination a { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(171, 134, 70, 0.3); color: #a8926b; }
.wiki-chest-pagination a.is-active { border-color: #9f4938; background: #702a22; color: #fff1d6; }

.wiki-v3-breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; color: #716c62; font-size: 0.78rem; }
.wiki-v3-preview-banner { margin-bottom: 12px; padding: 9px 13px; border: 1px solid #8e3e43; background: rgba(119, 44, 49, 0.22); color: #d98e91; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.13em; text-align: center; }
.wiki-v3-breadcrumb a { color: #ae9e7d; }
.wiki-v3-reader { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; }
.wiki-v3-reader-index { position: sticky; top: 94px; padding: 20px; }
.wiki-v3-reader-index .button { width: 100%; }
.wiki-v3-reader-mark { display: flex; align-items: center; justify-content: space-between; margin: 22px 0; padding: 18px 0; border-block: 1px solid rgba(201, 155, 73, 0.2); }
.wiki-v3-reader-mark span { color: #8c8068; font-size: 0.65rem; letter-spacing: 0.13em; text-transform: uppercase; }
.wiki-v3-reader-mark strong { color: #d8b86f; font: 700 1.6rem/1 var(--serif); }
.wiki-v3-reader-index dl { margin: 0; }
.wiki-v3-reader-index dl div { padding: 9px 0; }
.wiki-v3-reader-index dt { color: #6f6b63; font-size: 0.62rem; letter-spacing: 0.11em; text-transform: uppercase; }
.wiki-v3-reader-index dd { margin: 2px 0 0; color: #c5bda8; font-family: var(--serif); }

.wiki-v3-article {
    min-height: 650px;
    padding: clamp(30px, 6vw, 72px);
    border: 1px solid rgba(190, 147, 73, 0.4);
    background:
        linear-gradient(90deg, rgba(100, 74, 35, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(#ede1c3, #d9cba9);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.48), inset 0 0 70px rgba(74, 47, 16, 0.2);
    color: #2d271f;
}
.wiki-v3-article > header > p { margin: 0; color: #8a6528; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.wiki-v3-article > header h1 { margin: 8px 0 17px; color: #30271b; font: 700 clamp(2.3rem, 5vw, 4.6rem)/0.98 var(--serif); letter-spacing: -0.04em; }
.wiki-v3-rule { display: flex; align-items: center; height: 18px; }
.wiki-v3-rule::before, .wiki-v3-rule::after { flex: 1; height: 1px; background: #a48145; content: ""; }
.wiki-v3-rule span { width: 11px; height: 11px; margin: 0 10px; border: 1px solid #966d2a; transform: rotate(45deg); }
.wiki-v3-blocks { max-width: 780px; margin: 34px auto 0; }
.wiki-v3-heading { margin: 36px 0 12px; color: #4d321d; font-family: var(--serif); }
.wiki-v3-paragraph { margin: 0 0 18px; font: 1.03rem/1.8 var(--serif); }
.wiki-v3-callout { margin: 28px 0; padding: 20px 22px; border: 1px solid #a88751; border-left: 5px solid #7e3434; background: rgba(255, 250, 232, 0.42); }
.wiki-v3-callout.is-success { border-left-color: #557558; }
.wiki-v3-callout.is-warning { border-left-color: #9a6a28; }
.wiki-v3-callout strong { display: block; color: #563c21; font-family: var(--serif); font-size: 1.12rem; }
.wiki-v3-callout p { margin: 5px 0 0; }
.wiki-v3-steps { margin: 30px 0; }
.wiki-v3-steps h2, .wiki-v3-facts h2 { color: #4d321d; font-family: var(--serif); }
.wiki-v3-steps ol { margin: 0; padding: 0; list-style: none; counter-reset: wiki-step; }
.wiki-v3-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid rgba(91, 64, 27, 0.19); counter-increment: wiki-step; }
.wiki-v3-steps li::before { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #8d6b38; color: #6d4b22; font: 700 0.8rem/1 var(--serif); content: counter(wiki-step, decimal-leading-zero); }
.wiki-v3-entity { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin: 18px 0; padding: 16px; border: 1px solid #a78b5e; background: rgba(82, 59, 29, 0.08); }
.wiki-v3-entity-kind { padding: 8px 10px; background: #4d3421; color: #e8d4a8; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.wiki-v3-entity strong { color: #3e2d1d; font-family: var(--serif); }
.wiki-v3-entity p { margin: 3px 0 0; color: #665846; font-size: 0.85rem; }
.wiki-v3-entity code { color: #7c5423; }
.wiki-v3-facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid #a78b5e; background: #a78b5e; }
.wiki-v3-facts dl div { padding: 13px 15px; background: #e2d4b4; }
.wiki-v3-facts dt { color: #826a46; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }
.wiki-v3-facts dd { margin: 2px 0 0; color: #392c21; font-family: var(--serif); font-weight: 700; }
.wiki-v3-image img { display: block; width: 100%; border: 1px solid #846438; }
.wiki-v3-image figcaption { margin-top: 7px; color: #6d604e; font-size: 0.78rem; text-align: center; }
.wiki-v3-empty { display: grid; min-height: 350px; place-items: center; align-content: center; padding: 40px; border: 1px solid rgba(201, 155, 73, 0.25); background: rgba(19, 18, 16, 0.75); text-align: center; }
.wiki-v3-empty > span { color: #775c32; font: 700 3.4rem/1 var(--serif); }
.wiki-v3-empty h2 { margin: 14px 0 5px; font-family: var(--serif); }
.wiki-v3-empty p { margin: 0 0 20px; color: var(--muted); }

@media (max-width: 920px) {
    .wiki-v3-hero-copy { padding-right: 0; }
    .wiki-v3-oracle-art { display: none; }
    .wiki-v3-browser, .wiki-v3-reader { grid-template-columns: 1fr; }
    .wiki-v3-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
    .wiki-v3-sync { display: none; }
    .wiki-v3-reader-index { position: static; display: grid; grid-template-columns: auto 1fr 1fr; gap: 18px; align-items: center; }
    .wiki-v3-reader-mark { margin: 0; padding: 0 18px; border-block: 0; border-inline: 1px solid rgba(201, 155, 73, 0.2); }
    .wiki-v3-reader-index dl { display: flex; gap: 18px; }
}

@media (max-width: 680px) {
    .wiki-v3-hero-inner { min-height: 250px; padding-top: 76px; }
    .wiki-v3-sidebar, .wiki-v3-grid { grid-template-columns: 1fr; }
    .wiki-v3-card { grid-template-columns: 58px 1fr; padding: 19px; }
    .wiki-v3-reader-index { display: block; }
    .wiki-v3-reader-mark { margin: 18px 0; padding: 14px 0; border-block: 1px solid rgba(201, 155, 73, 0.2); border-inline: 0; }
    .wiki-v3-article { padding: 28px 20px; }
    .wiki-v3-facts dl { grid-template-columns: 1fr; }
    .wiki-v3-entity { grid-template-columns: 1fr; }
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 15% 15%, rgba(123, 32, 38, 0.18), transparent 32%),
        radial-gradient(circle at 85% 60%, rgba(65, 107, 120, 0.12), transparent 34%),
        linear-gradient(135deg, #0a0c0e 0%, #11161a 45%, #08090b 100%);
    content: "";
}

img,
video {
    max-width: 100%;
}

a {
    color: var(--gold-bright);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: #fff1c4;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

::selection {
    background: var(--gold);
    color: var(--ink);
}

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

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--gold-bright);
    color: var(--ink);
    font-weight: 800;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: none;
}

.world-backdrop {
    position: fixed;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    filter: saturate(0.76) contrast(1.08);
}

.world-shade {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(5, 6, 7, 0.5) 0%, rgba(8, 10, 12, 0.86) 70%, #080a0c 100%),
        radial-gradient(circle at center 12%, transparent 0, rgba(5, 7, 9, 0.22) 48%, rgba(5, 7, 9, 0.7) 100%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 78px;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 10, 12, 0.86);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(18px) saturate(1.2);
}

.nav-shell {
    display: flex;
    width: min(var(--content), calc(100% - 40px));
    height: 100%;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: block;
    width: 150px;
    height: 54px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 5px;
}

.brand img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.08);
}

.main-menu {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.main-menu a,
.main-menu button {
    display: inline-flex;
    min-height: 42px;
    padding: 0 11px;
    border: 0;
    border-radius: 7px;
    align-items: center;
    background: transparent;
    color: #d8d2c2;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.main-menu a:hover,
.main-menu button:hover,
.main-menu a[aria-current="page"] {
    background: rgba(208, 162, 77, 0.1);
    color: var(--gold-bright);
}

.main-menu .nav-cta {
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(208, 162, 77, 0.16), rgba(141, 100, 41, 0.06));
    color: var(--gold-bright);
}

.nav-divider {
    width: 1px;
    height: 26px;
    margin: 0 4px;
    background: var(--line);
}

.nav-logout {
    display: inline-flex;
    margin: 0;
}

.nav-toggle {
    display: none;
    width: 48px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    margin: 4px 0;
    background: var(--gold-bright);
}

.nav-toggle b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.flash-stack {
    position: fixed;
    top: 94px;
    right: 20px;
    z-index: 1200;
    display: grid;
    width: min(430px, calc(100% - 40px));
    gap: 10px;
}

.alert {
    display: flex;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    align-items: flex-start;
    gap: 12px;
    background: rgba(18, 22, 26, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    color: #ded9cb;
}

.alert p {
    flex: 1;
    margin: 0;
}

.alert strong {
    display: block;
    margin-bottom: 4px;
    color: #fff0c2;
}

.alert ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.alert button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.alert-mark {
    width: 8px;
    height: 8px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 14px currentColor;
}

.alert-success {
    border-color: rgba(79, 139, 105, 0.5);
}

.alert-success .alert-mark {
    background: var(--success);
}

.alert-error {
    border-color: rgba(181, 69, 69, 0.58);
}

.alert-error .alert-mark {
    background: var(--danger);
}

.alert-warning {
    border-color: rgba(200, 141, 50, 0.58);
}

.alert-warning .alert-mark {
    background: var(--warning);
}

main {
    min-height: calc(100vh - 78px);
}

.content-shell {
    width: min(var(--content), calc(100% - 40px));
    margin: 0 auto;
    padding: 70px 0 96px;
}

.content-shell.narrow {
    width: min(760px, calc(100% - 40px));
}

.content-shell.wide {
    width: min(1380px, calc(100% - 40px));
}

.page-heading {
    max-width: 860px;
    margin: 0 0 44px;
}

.page-heading h1 {
    margin-bottom: 18px;
    color: #f4e8cb;
    font-size: clamp(2.5rem, 7vw, 5.4rem);
    text-wrap: balance;
}

.page-lead {
    max-width: 720px;
    color: #c6c0b0;
    font-size: clamp(1rem, 2vw, 1.22rem);
}

.eyebrow {
    margin-bottom: 14px;
    color: var(--gold-bright);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.panel {
    position: relative;
    padding: clamp(22px, 4vw, 38px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 36%),
        var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel::before {
    position: absolute;
    top: 0;
    left: 22px;
    width: 110px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
    content: "";
}

.panel + .panel {
    margin-top: 22px;
}

.panel h2 {
    margin-bottom: 12px;
    color: #f2e5c6;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.panel h3 {
    color: #ead9b3;
}

.panel p:last-child {
    margin-bottom: 0;
}

.centered {
    text-align: center;
}

.button,
button.button {
    display: inline-flex;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(180deg, #d7aa55, #9e7131);
    box-shadow: 0 8px 20px rgba(112, 75, 24, 0.24), inset 0 1px rgba(255, 255, 255, 0.24);
    color: #160f07;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.button:hover {
    color: #160f07;
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.035);
    box-shadow: none;
    color: var(--gold-bright);
}

.button-secondary:hover {
    color: #fff0bd;
}

.button-danger {
    border-color: rgba(181, 69, 69, 0.72);
    background: linear-gradient(180deg, #a33d43, #702128);
    color: #fff4e1;
}

.button-danger:hover {
    color: #fff;
}

.button-small {
    min-height: 36px;
    padding: 0 13px;
    font-size: 0.8rem;
}

.button[disabled],
button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.6);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button-row.centered {
    justify-content: center;
}

.ornament {
    display: flex;
    margin: 28px 0;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--gold);
}

.ornament::before,
.ornament::after {
    width: min(160px, 28vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong));
    content: "";
}

.ornament::after {
    background: linear-gradient(90deg, var(--line-strong), transparent);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-field label,
.field-label {
    color: #dfd5be;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.form-field input,
.form-field textarea,
.form-field select,
.search-field {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(208, 162, 77, 0.32);
    border-radius: var(--radius-sm);
    outline: none;
    background: rgba(5, 7, 9, 0.74);
    color: #f0e7d5;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-field textarea {
    min-height: 130px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.search-field:focus {
    border-color: var(--gold);
    background: rgba(9, 12, 14, 0.95);
    box-shadow: 0 0 0 3px rgba(208, 162, 77, 0.1);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #686b67;
}

.field-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.79rem;
}

.field-note.danger {
    color: #e58d8d;
}

.form-actions {
    display: flex;
    margin-top: 22px;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.form-trap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    min-width: 40px;
    height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--gold-bright);
    font-size: 0.72rem;
    font-weight: 800;
    transform: translateY(-50%);
    cursor: pointer;
}

.auth-shell {
    display: grid;
    width: min(1060px, calc(100% - 40px));
    min-height: 650px;
    margin: 0 auto;
    padding: 64px 0 90px;
    grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
    align-items: stretch;
}

.auth-story {
    position: relative;
    display: flex;
    padding: clamp(34px, 6vw, 70px);
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(180deg, rgba(6, 7, 8, 0.02) 20%, rgba(6, 8, 10, 0.42) 58%, rgba(6, 8, 10, 0.98) 93%),
        radial-gradient(circle at 72% 28%, rgba(145, 26, 34, 0.14), transparent 48%),
        url("../media/register-sura-imperivm.webp") center 8% / cover no-repeat,
        #090b0d;
    overflow: hidden;
}

.auth-story::before {
    position: absolute;
    inset: 22px;
    border: 1px solid rgba(208, 162, 77, 0.18);
    border-radius: calc(var(--radius-lg) - 8px) 0 0 calc(var(--radius-lg) - 8px);
    pointer-events: none;
    content: "";
}

.auth-story > * {
    position: relative;
    z-index: 1;
}

.auth-story h1 {
    margin-bottom: 18px;
    color: #f1e2bf;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9);
}

.auth-story p:not(.eyebrow) {
    max-width: 450px;
    color: #bcb6a8;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

.auth-panel {
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid var(--line);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    background: rgba(14, 17, 20, 0.97);
    box-shadow: var(--shadow);
}

.auth-panel h2 {
    margin-bottom: 10px;
    color: #f1e3c5;
    font-size: clamp(2rem, 4vw, 3rem);
}

.auth-panel > p {
    color: var(--muted);
}

.auth-links {
    display: grid;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    gap: 8px;
    font-size: 0.88rem;
}

.g-recaptcha {
    min-height: 78px;
    margin-top: 18px;
}

.home-hero {
    position: relative;
    display: grid;
    width: min(var(--content), calc(100% - 40px));
    min-height: calc(100vh - 78px);
    margin: 0 auto;
    padding: 80px 0 96px;
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.62fr);
    align-items: center;
    gap: clamp(40px, 8vw, 110px);
}

.home-hero-copy {
    max-width: 760px;
}

.home-hero h1 {
    margin-bottom: 24px;
    color: #f2e4c3;
    font-size: clamp(3.5rem, 8.5vw, 7.7rem);
    letter-spacing: -0.045em;
    line-height: 0.9;
    text-wrap: balance;
}

.home-hero h1 span {
    display: block;
    color: var(--gold-bright);
    font-style: italic;
    font-weight: 400;
}

.hero-lead {
    max-width: 680px;
    color: #d0c9b8;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
    display: flex;
    margin-top: 34px;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-seal {
    position: relative;
    width: min(370px, 100%);
    aspect-ratio: 1;
    margin-inline: auto;
    border: 1px solid rgba(208, 162, 77, 0.34);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(208, 162, 77, 0.16) 0 3%, transparent 3.5% 28%, rgba(208, 162, 77, 0.16) 28.5% 29%, transparent 29.5%),
        conic-gradient(from 45deg, transparent, rgba(123, 32, 38, 0.38), transparent 24%, rgba(65, 107, 120, 0.24), transparent 55%, rgba(208, 162, 77, 0.18), transparent);
    box-shadow: inset 0 0 70px rgba(208, 162, 77, 0.08), 0 0 80px rgba(0, 0, 0, 0.38);
}

.hero-seal::before,
.hero-seal::after {
    position: absolute;
    inset: 11%;
    border: 1px solid rgba(208, 162, 77, 0.32);
    border-radius: 50%;
    content: "";
}

.hero-seal::after {
    inset: 23%;
    border-radius: 18%;
    transform: rotate(45deg);
}

.hero-seal-content {
    position: absolute;
    inset: 28%;
    display: grid;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    place-items: center;
    background: rgba(10, 12, 14, 0.74);
    text-align: center;
}

.hero-seal-content strong {
    display: block;
    color: var(--gold-bright);
    font-family: var(--serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 0.9;
}

.hero-seal-content span {
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.17em;
}

.stat-band {
    border-block: 1px solid var(--line);
    background: rgba(8, 10, 12, 0.82);
    backdrop-filter: blur(12px);
}

.stat-grid {
    display: grid;
    width: min(var(--content), calc(100% - 40px));
    margin: 0 auto;
    grid-template-columns: repeat(4, 1fr);
}

.stat-item {
    padding: 28px 24px;
    border-left: 1px solid var(--line);
}

.stat-item:last-child {
    border-right: 1px solid var(--line);
}

.stat-item strong {
    display: block;
    color: #f2e2bd;
    font-family: var(--serif);
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    font-weight: 500;
}

.stat-item span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-section {
    width: min(var(--content), calc(100% - 40px));
    margin: 0 auto;
    padding: 110px 0;
}

.section-heading {
    display: grid;
    margin-bottom: 44px;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.55fr);
    align-items: end;
    gap: 40px;
}

.section-heading h2 {
    margin-bottom: 0;
    color: #f1e3c5;
    font-size: clamp(2.5rem, 6vw, 5rem);
}

.section-heading p:last-child {
    margin-bottom: 4px;
    color: var(--muted);
}

.path-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.path-card {
    position: relative;
    min-height: 310px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
        rgba(13, 16, 19, 0.9);
    overflow: hidden;
}

.path-card::after {
    position: absolute;
    right: -35px;
    bottom: -45px;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(208, 162, 77, 0.16);
    border-radius: 50%;
    content: "";
}

.path-index {
    display: inline-grid;
    width: 42px;
    height: 42px;
    margin-bottom: 46px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    place-items: center;
    color: var(--gold-bright);
    font-family: var(--serif);
}

.path-card h3 {
    margin-bottom: 12px;
    color: #ead9b5;
    font-size: 1.75rem;
}

.path-card p {
    color: var(--muted);
}

.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
}

.news-card {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(13, 16, 19, 0.92);
}

.news-card.featured {
    min-height: 430px;
}

.news-type,
.badge {
    display: inline-flex;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid rgba(208, 162, 77, 0.36);
    border-radius: 999px;
    align-items: center;
    color: var(--gold-bright);
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.news-card h3 {
    margin: 22px 0 12px;
    color: #f1e3c5;
    font-size: clamp(1.7rem, 4vw, 3rem);
}

.news-card p {
    color: #b7b2a6;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-card h3,
.news-list-item h3,
.site-body.news-page .panel > p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-meta {
    display: flex;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--muted-2);
    font-size: 0.75rem;
}

.news-actions {
    display: flex;
    margin-top: 24px;
    align-items: center;
    gap: 10px;
}

.news-list {
    display: grid;
    gap: 10px;
}

.news-list-item {
    display: block;
    padding: 20px;
    border: 1px solid rgba(208, 162, 77, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(13, 16, 19, 0.82);
    text-decoration: none;
}

.news-list-item:hover {
    border-color: var(--line-strong);
    background: rgba(22, 26, 30, 0.94);
}

.news-list-item h3 {
    margin-bottom: 8px;
    color: #ded2b8;
    font-family: var(--sans);
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0;
}

.news-list-item span {
    color: var(--muted-2);
    font-size: 0.73rem;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: #d6d1c4;
    font-size: 0.88rem;
}

.data-table th {
    padding: 13px 15px;
    border-bottom: 1px solid var(--line-strong);
    background: rgba(208, 162, 77, 0.08);
    color: var(--gold-bright);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 15px;
    border-bottom: 1px solid rgba(208, 162, 77, 0.12);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: rgba(208, 162, 77, 0.045);
}

.rank {
    color: var(--gold-bright);
    font-family: var(--serif);
    font-size: 1.1rem;
}

.empire-mark {
    display: inline-flex;
    min-width: 76px;
    padding: 4px 8px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.empire-1 {
    background: rgba(198, 161, 53, 0.14);
    color: #e5c46b;
}

.empire-2 {
    background: rgba(181, 69, 69, 0.14);
    color: #e48888;
}

.empire-3 {
    background: rgba(65, 107, 120, 0.2);
    color: #8bc2d0;
}

.tabs {
    display: flex;
    margin-bottom: 24px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 4px;
    background: rgba(8, 10, 12, 0.68);
}

.tab-button {
    min-height: 40px;
    padding: 0 15px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 0.79rem;
    font-weight: 800;
    cursor: pointer;
}

.tab-button:hover,
.tab-button.is-active {
    background: rgba(208, 162, 77, 0.13);
    color: var(--gold-bright);
}

.tab-panel[hidden] {
    display: none;
}

.wiki-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 22px;
}

.wiki-sidebar {
    align-self: start;
}

.wiki-sidebar h2 {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.category-list {
    display: grid;
    margin-top: 18px;
    gap: 5px;
}

.category-list a {
    padding: 9px 11px;
    border-radius: 7px;
    color: #bbb7ac;
    font-size: 0.83rem;
    text-decoration: none;
}

.category-list a:hover,
.category-list a.is-active {
    background: rgba(208, 162, 77, 0.1);
    color: var(--gold-bright);
}

.wiki-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wiki-card {
    display: block;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(14, 17, 20, 0.9);
    text-decoration: none;
}

.wiki-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.wiki-card h2 {
    margin: 14px 0 8px;
    color: #e8dbc0;
    font-size: 1.35rem;
}

.wiki-card p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.83rem;
}

.wiki-article {
    color: #d7d1c2;
}

.wiki-article h2,
.wiki-article h3,
.wiki-article h4 {
    margin-top: 1.8em;
    color: #f0dfbb;
}

.wiki-article img {
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.wiki-article table {
    width: 100%;
    border-collapse: collapse;
}

.wiki-article th,
.wiki-article td {
    padding: 10px;
    border: 1px solid var(--line);
}

.wiki-article pre,
.wiki-article code {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: #07090a;
    color: #e5d6b8;
}

.wiki-article code {
    padding: 2px 5px;
}

.wiki-article pre {
    padding: 16px;
    overflow-x: auto;
}

.account-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
}

.account-nav {
    position: sticky;
    top: 102px;
    display: grid;
    align-self: start;
    gap: 5px;
}

.account-nav a {
    display: flex;
    min-height: 43px;
    padding: 0 12px;
    border-radius: 7px;
    align-items: center;
    color: #bdb8ab;
    font-size: 0.83rem;
    font-weight: 800;
    text-decoration: none;
}

.account-nav a:hover,
.account-nav a.is-active {
    background: rgba(208, 162, 77, 0.11);
    color: var(--gold-bright);
}

.account-summary {
    display: grid;
    margin-bottom: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.summary-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(14, 17, 20, 0.88);
}

.summary-card strong {
    display: block;
    color: #eddfc1;
    font-family: var(--serif);
    font-size: 1.65rem;
}

.summary-card span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.security-status {
    display: flex;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(8, 10, 12, 0.45);
}

.security-status strong {
    display: block;
    color: #eadabd;
}

.security-status p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.83rem;
}

.referral-panel {
    display: grid;
    gap: 18px;
}

.referral-copy-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(320px, 1.28fr);
    gap: 14px;
}

.referral-copy-grid > div {
    display: grid;
    gap: 8px;
}

.referral-copy-row {
    display: flex;
    gap: 8px;
}

.referral-copy-row input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(208, 162, 77, 0.32);
    border-radius: var(--radius-sm);
    background: rgba(5, 7, 9, 0.74);
    color: #eee1c5;
}

.referral-copy-row .referral-code-input {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.referral-stats {
    display: grid;
    grid-template-columns: minmax(180px, 0.4fr) minmax(280px, 1fr);
    gap: 14px;
}

.referral-state {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(8, 10, 12, 0.45);
}

.referral-state > span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.referral-state strong {
    color: #eadabd;
}

.referral-state p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.83rem;
}

.referral-state-accepted {
    border-color: rgba(113, 181, 107, 0.48);
}

.referral-state-rejected {
    border-color: rgba(208, 91, 91, 0.42);
}

.download-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
    gap: 20px;
}

.download-main {
    min-height: 100%;
}

.download-size {
    display: inline-flex;
    margin: 10px 0 22px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.spec-list {
    display: grid;
    margin: 0;
    gap: 0;
}

.spec-list div {
    display: grid;
    padding: 13px 0;
    border-bottom: 1px solid rgba(208, 162, 77, 0.12);
    grid-template-columns: 110px 1fr;
    gap: 12px;
}

.spec-list dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.spec-list dd {
    margin: 0;
    color: #d9d3c5;
}

.requirements-panel {
    padding: clamp(22px, 3vw, 32px);
}

.requirement-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.requirement-card {
    padding: 20px;
    border: 1px solid rgba(208, 162, 77, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(7, 9, 11, 0.42);
}

.requirement-card.is-recommended {
    border-color: rgba(224, 177, 87, 0.52);
    background:
        linear-gradient(145deg, rgba(208, 162, 77, 0.08), transparent 42%),
        rgba(7, 9, 11, 0.56);
}

.requirement-card-head {
    min-height: 78px;
    margin-bottom: 4px;
}

.requirement-card-head h3 {
    margin-bottom: 9px;
    font-size: 1.3rem;
}

.preset-pill,
.coming-badge {
    display: inline-flex;
    padding: 5px 8px;
    border: 1px solid rgba(208, 162, 77, 0.3);
    border-radius: 999px;
    align-items: center;
    color: var(--gold-bright);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    line-height: 1.2;
    text-transform: uppercase;
}

.requirement-card .spec-list div {
    padding: 10px 0;
    grid-template-columns: 74px 1fr;
    gap: 9px;
}

.requirement-card .spec-list dd {
    font-size: 0.84rem;
    line-height: 1.45;
}

.requirement-note {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.download-mobile {
    margin-top: 22px;
}

.mobile-platform-grid {
    display: grid;
    margin-top: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.mobile-platform-card {
    display: grid;
    min-height: 122px;
    padding: 18px;
    border: 1px solid rgba(208, 162, 77, 0.18);
    border-radius: var(--radius-sm);
    align-items: center;
    grid-template-columns: 66px 1fr auto;
    gap: 16px;
    background: rgba(7, 9, 11, 0.4);
}

.platform-mark {
    display: grid;
    width: 62px;
    height: 62px;
    border: 1px solid var(--line);
    border-radius: 16px;
    place-items: center;
    background: rgba(255, 255, 255, 0.035);
    color: #f2e5c6;
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 700;
}

.platform-mark-android {
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.mobile-platform-card h3 {
    margin: 0 0 5px;
    font-size: 1.15rem;
}

.mobile-platform-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.coming-badge {
    border-color: rgba(82, 128, 106, 0.42);
    color: #9cc8ad;
    white-space: nowrap;
}

.cookie-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1400;
    display: none;
    width: min(480px, calc(100% - 40px));
    padding: 20px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(12, 15, 18, 0.98);
    box-shadow: var(--shadow);
}

.cookie-banner.is-visible {
    display: block;
}

.cookie-banner p {
    color: #c9c4b8;
    font-size: 0.86rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(6, 8, 9, 0.96);
}

.footer-grid {
    display: grid;
    width: min(var(--content), calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0 48px;
    grid-template-columns: 1.7fr repeat(3, 0.7fr);
    gap: 44px;
}

.footer-brand img {
    width: 190px;
    height: 74px;
    border-radius: 5px;
    object-fit: cover;
}

.footer-brand p {
    max-width: 410px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.footer-grid h2 {
    margin-bottom: 16px;
    color: var(--gold-bright);
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.footer-grid a,
.footer-grid span {
    display: block;
    margin: 7px 0;
    color: #9f9d95;
    font-size: 0.82rem;
    text-decoration: none;
}

.footer-grid a:hover {
    color: var(--gold-bright);
}

.footer-bottom {
    display: flex;
    width: min(var(--content), calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0 28px;
    border-top: 1px solid rgba(208, 162, 77, 0.12);
    justify-content: space-between;
    gap: 20px;
    color: var(--muted-2);
    font-size: 0.72rem;
}

.empty-state {
    padding: 46px 24px;
    border: 1px dashed rgba(208, 162, 77, 0.3);
    border-radius: var(--radius-sm);
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 8px;
    color: #dfd4bc;
    font-family: var(--serif);
    font-size: 1.35rem;
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.stack {
    display: grid;
    gap: 20px;
}

.muted {
    color: var(--muted);
}

.mono {
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 0.86em;
}

.danger-text {
    color: #e58a8a;
}

.success-text {
    color: #82bb98;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .world-backdrop {
        display: none;
    }
}

@media (max-width: 1040px) {
    .nav-toggle {
        display: block;
    }

    .main-menu {
        position: absolute;
        top: 77px;
        right: 0;
        left: 0;
        display: none;
        max-height: calc(100vh - 77px);
        padding: 16px 20px 24px;
        border-bottom: 1px solid var(--line);
        align-items: stretch;
        flex-direction: column;
        overflow-y: auto;
        background: rgba(8, 10, 12, 0.98);
    }

    .main-menu.is-open {
        display: flex;
    }

    .main-menu a,
    .main-menu button,
    .nav-logout {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-divider {
        width: 100%;
        height: 1px;
        margin: 8px 0;
    }

    .home-hero {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .hero-seal {
        width: 300px;
    }

    .path-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1.5fr repeat(3, 1fr);
        gap: 26px;
    }
}

@media (max-width: 820px) {
    .content-shell,
    .home-section {
        padding-top: 60px;
        padding-bottom: 70px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-story {
        min-height: 440px;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        background-position: center 12%;
    }

    .auth-story::before {
        border-radius: calc(var(--radius-lg) - 8px) calc(var(--radius-lg) - 8px) 0 0;
    }

    .auth-panel {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-item:nth-child(2) {
        border-right: 1px solid var(--line);
    }

    .stat-item:nth-child(n+3) {
        border-top: 1px solid var(--line);
    }

    .section-heading {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .news-layout,
    .download-grid {
        grid-template-columns: 1fr;
    }

    .requirement-cards {
        grid-template-columns: 1fr 1fr;
    }

    .wiki-shell,
    .account-layout {
        grid-template-columns: 1fr;
    }

    .wiki-sidebar,
    .account-nav {
        position: static;
    }

    .account-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .nav-shell,
    .content-shell,
    .content-shell.narrow,
    .content-shell.wide,
    .home-hero,
    .home-section,
    .stat-grid,
    .footer-grid,
    .footer-bottom,
    .auth-shell {
        width: min(100% - 24px, var(--content));
    }

    .brand {
        width: 128px;
        height: 46px;
    }

    .home-hero {
        padding-top: 54px;
        padding-bottom: 72px;
    }

    .home-hero h1 {
        font-size: clamp(3rem, 17vw, 5rem);
    }

    .hero-seal {
        width: 235px;
    }

    .stat-grid,
    .path-grid,
    .form-grid,
    .split,
    .wiki-grid,
    .account-summary,
    .requirement-cards,
    .mobile-platform-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .mobile-platform-card {
        grid-template-columns: 56px 1fr;
    }

    .platform-mark {
        width: 54px;
        height: 54px;
        border-radius: 14px;
    }

    .coming-badge {
        grid-column: 2;
        justify-self: start;
    }

    .stat-item,
    .stat-item:nth-child(2),
    .stat-item:last-child {
        padding: 20px;
        border-top: 1px solid var(--line);
        border-right: 1px solid var(--line);
    }

    .stat-item:first-child {
        border-top: 0;
    }

    .page-heading h1 {
        font-size: clamp(2.4rem, 14vw, 4rem);
    }

    .panel,
    .auth-panel,
    .auth-story {
        padding: 24px 18px;
    }

    .auth-story {
        min-height: 390px;
        background-position: center 10%;
    }

    .button,
    button.button {
        width: 100%;
    }

    .button-row,
    .hero-actions,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .account-nav {
        grid-template-columns: 1fr;
    }

    .security-status {
        align-items: stretch;
        flex-direction: column;
    }

    .referral-copy-grid,
    .referral-stats {
        grid-template-columns: 1fr;
    }

    .referral-copy-row {
        align-items: stretch;
        flex-direction: column;
    }

    .footer-brand,
    .footer-grid > div {
        grid-column: 1;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

/* Visual revision: clearer surfaces, smaller type and a visible game backdrop. */
:root {
    color-scheme: dark;
    --ink: #171a1b;
    --ink-soft: #202425;
    --panel: rgba(30, 34, 34, 0.9);
    --panel-solid: #252929;
    --panel-raised: #2d3232;
    --ivory: #f1eadb;
    --muted: #c2bcae;
    --muted-2: #92958f;
    --line: rgba(218, 174, 91, 0.25);
    --shadow: 0 20px 54px rgba(0, 0, 0, 0.3);
}

body {
    background: #171a1b;
    font-size: 15.5px;
    line-height: 1.58;
}

body::before {
    background:
        radial-gradient(circle at 16% 12%, rgba(132, 70, 49, 0.22), transparent 34%),
        radial-gradient(circle at 84% 58%, rgba(73, 108, 113, 0.2), transparent 38%),
        linear-gradient(135deg, #242727 0%, #1b2021 52%, #25221f 100%);
}

.world-backdrop {
    opacity: 0.88;
    filter: saturate(0.92) contrast(1.02) brightness(1.02);
}

.world-shade {
    background:
        linear-gradient(90deg, rgba(15, 17, 17, 0.8) 0%, rgba(15, 17, 17, 0.52) 43%, rgba(15, 17, 17, 0.1) 76%, rgba(15, 17, 17, 0.18) 100%),
        linear-gradient(180deg, rgba(17, 19, 19, 0.08) 55%, rgba(23, 26, 27, 0.9) 100%);
}

.site-header {
    height: 68px;
    background: rgba(18, 21, 21, 0.9);
    backdrop-filter: blur(14px) saturate(1.12);
}

.brand {
    width: 160px;
    height: 58px;
    overflow: visible;
}

.brand img {
    display: block;
    object-fit: contain;
    object-position: center;
}

.main-menu a,
.main-menu button {
    min-height: 38px;
    font-size: 0.78rem;
}

.panel,
.path-card,
.news-card,
.news-list-item,
.download-card,
.wiki-sidebar,
.account-nav {
    background-color: rgba(35, 39, 39, 0.88);
    backdrop-filter: blur(10px);
}

.page-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.page-heading h1 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
}

.page-lead {
    max-width: 720px;
    font-size: clamp(0.98rem, 1.5vw, 1.12rem);
}

.panel h2,
.auth-panel h2 {
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
}

.content-shell {
    padding-top: 54px;
    padding-bottom: 76px;
}

.language-switcher {
    position: relative;
    flex: 0 0 auto;
}

.language-switcher summary {
    display: flex;
    width: 64px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--gold-bright);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    list-style: none;
}

.language-switcher summary::-webkit-details-marker {
    display: none;
}

.language-switcher[open] summary {
    border-color: var(--line-strong);
    background: rgba(208, 162, 77, 0.1);
}

.language-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 1200;
    display: grid;
    width: 224px;
    max-width: calc(100vw - 32px);
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(24, 27, 27, 0.98);
    box-shadow: var(--shadow);
    max-height: min(520px, calc(100vh - 92px));
    overflow-x: hidden;
    overflow-y: auto;
}

.language-menu a {
    display: grid;
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 6px;
    align-items: center;
    grid-template-columns: 24px 28px minmax(0, 1fr);
    gap: 10px;
    color: #ddd6c8;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
}

.language-flag {
    display: inline-flex;
    width: 22px;
    height: 15px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 2px;
    background: #202424;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.language-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.language-menu a .language-flag {
    width: 24px;
    height: 16px;
}

.language-menu a .language-code {
    width: 28px;
    color: var(--gold-bright);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.language-menu a .language-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-menu a:hover,
.language-menu a.is-active {
    background: rgba(208, 162, 77, 0.1);
    color: #fff1cd;
}

.home-hero {
    width: min(1360px, calc(100% - 48px));
    min-height: min(680px, calc(100svh - 68px));
    padding: 58px 0 72px;
    grid-template-columns: minmax(420px, 520px) minmax(0, 720px);
    justify-content: center;
    gap: clamp(34px, 3.5vw, 54px);
}

.home-hero-copy {
    width: 100%;
    max-width: 520px;
    padding: clamp(25px, 2.7vw, 34px);
    border: 1px solid rgba(222, 184, 105, 0.28);
    border-radius: 16px;
    background: rgba(28, 31, 31, 0.78);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
}

.home-hero h1 {
    max-width: 480px;
    margin-bottom: 16px;
    font-size: clamp(2.35rem, 3.5vw, 3.35rem);
    line-height: 1.02;
}

.hero-lead {
    max-width: 610px;
    color: #e2dbce;
    font-size: clamp(1rem, 1.5vw, 1.14rem);
}

.hero-actions {
    margin-top: 23px;
}

.hero-facts {
    display: flex;
    margin: 23px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid rgba(222, 184, 105, 0.2);
    flex-wrap: wrap;
    gap: 8px 20px;
    list-style: none;
}

.hero-facts li {
    position: relative;
    padding-left: 14px;
    color: #cfc8bb;
    font-size: 0.78rem;
    font-weight: 650;
}

.hero-facts li::before {
    position: absolute;
    top: 0.62em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    content: "";
}

.stat-band {
    background: rgba(27, 31, 31, 0.94);
    backdrop-filter: blur(14px);
}

.stat-item strong {
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
}

.home-section {
    padding-top: 68px;
    padding-bottom: 74px;
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
}

.path-card {
    min-height: 250px;
}

.path-card h3,
.news-card h3,
.news-list-item h3 {
    font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.home-start {
    display: flex;
    padding: clamp(25px, 4vw, 40px);
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.home-start > div:first-child {
    max-width: 690px;
}

.home-start h2 {
    margin-bottom: 12px;
}

.live-broadcast {
    position: relative;
    width: 100%;
    max-width: 720px;
    min-width: 0;
    align-self: center;
    overflow: hidden;
    border: 1px solid rgba(222, 184, 105, 0.28);
    border-radius: 14px;
    background: #151818;
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.34);
    isolation: isolate;
}

.live-broadcast-header,
.live-broadcast-footer {
    position: relative;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(22, 25, 25, 0.98);
}

.live-broadcast-header {
    min-height: 56px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
    gap: 16px;
}

.live-channel,
.live-signal,
.live-signal > span {
    display: flex;
    align-items: center;
}

.live-channel {
    min-width: 0;
    gap: 10px;
}

.live-channel-copy {
    min-width: 0;
}

.live-channel-copy strong,
.live-channel-copy small {
    display: block;
}

.live-channel-copy strong {
    overflow: hidden;
    color: #f1e5ce;
    font-size: 0.78rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-channel-copy small {
    margin-top: 2px;
    color: #989d99;
    font-size: 0.64rem;
}

.live-signal {
    flex: 0 0 auto;
    gap: 7px;
}

.live-signal > span {
    min-height: 27px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    gap: 6px;
    background: #111414;
    color: #aeb4af;
    font-size: 0.59rem;
    font-weight: 750;
    letter-spacing: 0.045em;
}

.live-signal i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d0a24d;
}

.live-signal b {
    min-width: 12px;
    color: #d5dad6;
    font: inherit;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.live-signal em {
    color: #aeb4af;
    font: inherit;
    font-style: normal;
    letter-spacing: 0;
    white-space: nowrap;
}

.live-signal > span:last-child {
    border-color: rgba(224, 76, 69, 0.22);
    background: rgba(224, 76, 69, 0.08);
    color: #eee6d8;
}

.live-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0e1111;
}

.live-stage::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(180deg, transparent 62%, rgba(8, 10, 10, 0.7) 100%),
        radial-gradient(circle at center, transparent 54%, rgba(8, 10, 10, 0.11) 100%);
    pointer-events: none;
    content: "";
}

.live-stage video,
.live-stage iframe,
.live-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #101313;
}

.live-stage video {
    object-fit: cover;
    transition: opacity 320ms ease;
}

.live-stage canvas {
    z-index: 1;
    display: block;
    opacity: 0;
    transition: opacity 320ms ease;
}

.live-stage-3d.is-ready canvas {
    opacity: 1;
}

.live-stage-3d.is-ready video {
    opacity: 0;
    pointer-events: none;
}

.live-stage-3d.is-switching canvas {
    opacity: 0.16;
}

.live-stage-3d.is-fallback canvas {
    display: none;
}

.live-stage-3d.is-fallback video {
    opacity: 1;
}

.live3d-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    padding: 24px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(18, 21, 21, 0.42);
    color: #efe3ca;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.03em;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.live-stage-3d.is-ready .live3d-loading {
    opacity: 0;
    visibility: hidden;
}

.live-stage-3d.is-fallback .live3d-loading {
    inset: auto 16px 48px;
    padding: 8px 10px;
    justify-content: flex-start;
    border-radius: 8px;
    background: rgba(15, 17, 17, 0.78);
}

.live3d-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(231, 197, 126, 0.25);
    border-top-color: #e7c57e;
    border-radius: 50%;
    animation: live3d-spin 850ms linear infinite;
}

.live-stage-3d.is-fallback .live3d-spinner {
    display: none;
}

.live-toolbar {
    position: absolute;
    z-index: 4;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.live-status {
    display: inline-flex;
    min-height: 29px;
    padding: 5px 9px;
    border: 1px solid rgba(230, 190, 104, 0.38);
    border-radius: 6px;
    align-items: center;
    gap: 7px;
    background: #27261f;
    color: #f3e3be;
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.live-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d8a74c;
    box-shadow: 0 0 0 4px rgba(216, 167, 76, 0.12);
}

.live-status b {
    font: inherit;
}

.live-status.is-live i {
    background: #e04c45;
    box-shadow: 0 0 0 4px rgba(224, 76, 69, 0.15);
    animation: live-pulse 1.8s ease-out infinite;
}

.live-stage-3d.has-live-data .live-status i {
    background: #e04c45;
    box-shadow: 0 0 0 4px rgba(224, 76, 69, 0.15);
    animation: live-pulse 1.8s ease-out infinite;
}

.live-stage-3d.has-live-data .live-status {
    border-color: rgba(224, 76, 69, 0.46);
    background: rgba(65, 25, 23, 0.72);
    color: #fff0e5;
}

.live-stage-3d.has-live-data .live-signal i {
    background: #e04c45;
}

.live-player-button {
    display: inline-flex;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(14, 16, 16, 0.78);
    color: #eee7da;
    font: inherit;
    font-size: 0.65rem;
    font-weight: 750;
    cursor: pointer;
    backdrop-filter: blur(7px);
}

.live-player-button:hover,
.live-player-button:focus-visible {
    border-color: rgba(230, 190, 104, 0.65);
    background: rgba(34, 31, 24, 0.92);
}

.live-fullscreen {
    width: 34px;
    padding: 5px;
    font-size: 0.92rem;
}

.live-edge {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 4;
    height: 2px;
    background: rgba(255, 255, 255, 0.14);
    pointer-events: none;
}

.live-stage-3d.has-live-data .live-edge {
    background: #d94843;
    box-shadow: 0 -1px 8px rgba(217, 72, 67, 0.25);
}

.live-edge i {
    position: absolute;
    top: 50%;
    right: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    color: rgba(255, 255, 255, 0.35);
    transform: translate(0, -50%);
}

.live-stage-3d.has-live-data .live-edge i {
    color: #ec5a53;
    box-shadow: 0 0 0 3px rgba(236, 90, 83, 0.16);
}

.live-stage figcaption {
    position: absolute;
    right: 152px;
    bottom: 12px;
    left: 12px;
    z-index: 3;
    display: flex;
    min-width: 0;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    color: rgba(245, 233, 208, 0.8);
    font-size: 0.65rem;
    font-weight: 650;
    line-height: 1.45;
}

.live-stage figcaption > span,
.live-stage figcaption strong,
.live-stage figcaption small {
    display: block;
}

.live-stage figcaption > span {
    min-width: 0;
}

.live-stage figcaption strong {
    margin-bottom: 2px;
    overflow: hidden;
    color: #f5e2b8;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-stage figcaption small {
    overflow: hidden;
    color: rgba(232, 226, 215, 0.68);
    font-size: 0.59rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-stage figcaption time {
    flex: 0 0 auto;
    color: rgba(232, 226, 215, 0.72);
    font-size: 0.61rem;
    font-variant-numeric: tabular-nums;
}

.live-broadcast-footer {
    min-height: 38px;
    padding: 7px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    gap: 16px;
    color: #979d98;
    font-size: 0.62rem;
}

.live-broadcast-footer b {
    flex: 0 0 auto;
    color: #c8ab70;
    font-size: 0.58rem;
    letter-spacing: 0.055em;
}

.live-broadcast:fullscreen,
.live-broadcast.is-fullscreen {
    width: 100vw;
    max-width: none;
    height: 100vh;
    border: 0;
    border-radius: 0;
    background: #080a0a;
}

.live-broadcast:fullscreen .live-stage,
.live-broadcast.is-fullscreen .live-stage {
    height: calc(100vh - 94px);
    aspect-ratio: auto;
}

@keyframes live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(224, 76, 69, 0.4);
    }
    75%,
    100% {
        box-shadow: 0 0 0 8px rgba(224, 76, 69, 0);
    }
}

@keyframes live3d-spin {
    to {
        transform: rotate(360deg);
    }
}

.class-section {
    width: min(1320px, calc(100% - 40px));
}

.class-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.class-card {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border: 1px solid rgba(222, 184, 105, 0.24);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 22%, rgba(209, 166, 83, 0.2), transparent 42%),
        linear-gradient(165deg, #313636, #202424);
}

.class-sura {
    background:
        radial-gradient(circle at 50% 22%, rgba(153, 54, 49, 0.24), transparent 42%),
        linear-gradient(165deg, #363331, #202424);
}

.class-ninja {
    background:
        radial-gradient(circle at 50% 22%, rgba(122, 45, 48, 0.26), transparent 42%),
        linear-gradient(165deg, #332d2e, #202424);
}

.class-shaman {
    background:
        radial-gradient(circle at 50% 22%, rgba(59, 112, 131, 0.26), transparent 42%),
        linear-gradient(165deg, #2a3437, #202424);
}

.class-art {
    position: absolute;
    inset: 0 0 96px;
    display: grid;
    align-items: end;
    overflow: hidden;
}

.class-art::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 38%;
    background: linear-gradient(transparent, #252929);
    content: "";
}

.class-art img {
    width: 100%;
    height: 112%;
    object-fit: contain;
    object-position: center bottom;
    transition: transform 260ms ease;
}

.class-card:hover .class-art img {
    transform: scale(1.035) translateY(-4px);
}

.class-copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    padding: 19px 20px;
}

.class-copy h3 {
    margin-bottom: 5px;
    color: #f0e3c8;
    font-size: 1.35rem;
}

.class-copy p {
    margin-bottom: 0;
    color: #bcb6aa;
    font-size: 0.8rem;
    line-height: 1.45;
}

@media (max-width: 1180px) {
    .home-hero {
        width: min(760px, calc(100% - 40px));
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .home-hero-copy {
        max-width: 620px;
    }

    .live-broadcast {
        max-width: 760px;
    }
}

@media (max-width: 1040px) {
    .main-menu {
        top: 67px;
        background: rgba(24, 27, 27, 0.99);
    }

    .language-switcher-nav {
        width: 100%;
    }

    .language-switcher-nav summary {
        width: 100%;
        justify-content: start;
        padding-left: 12px;
    }

    .language-switcher-nav .language-menu {
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
    }

    .class-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .home-hero {
        min-height: 680px;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .home-start {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .home-hero {
        min-height: 620px;
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .home-hero-copy {
        padding: 24px 20px;
        background: rgba(24, 27, 27, 0.82);
    }

    .home-hero h1 {
        font-size: clamp(2.35rem, 11vw, 3.25rem);
    }

    .live-broadcast-header {
        min-height: 58px;
        padding: 9px 10px;
    }

    .live-signal > span:last-child,
    .live-broadcast-footer b {
        display: none;
    }

    .live-stage figcaption {
        right: 112px;
    }

    .live-player-button {
        width: 34px;
        padding: 5px;
        font-size: 0;
    }

    .live-player-button span {
        font-size: 0.88rem;
    }

    .live-stage figcaption small {
        display: none;
    }

    .section-heading h2,
    .page-heading h1 {
        font-size: clamp(1.9rem, 9vw, 2.7rem);
    }

    .class-grid {
        grid-template-columns: 1fr;
    }

    .class-card {
        min-height: 400px;
    }
}

/* --------------------------------------------------------------------------
   IMPERIVM cinematic home
   -------------------------------------------------------------------------- */

.home-cinematic {
    background: #080807;
}

.home-cinematic::before {
    background:
        radial-gradient(circle at 12% 28%, rgba(108, 24, 22, 0.18), transparent 30%),
        radial-gradient(circle at 82% 44%, rgba(109, 76, 33, 0.11), transparent 36%),
        linear-gradient(145deg, #070706, #10100e 48%, #070706);
}

.home-cinematic .site-header {
    height: 84px;
    border-bottom-color: rgba(194, 139, 57, 0.42);
    background:
        linear-gradient(180deg, rgba(17, 17, 15, 0.98), rgba(8, 9, 9, 0.96)),
        #0a0b0b;
    box-shadow:
        0 1px rgba(255, 220, 143, 0.05) inset,
        0 14px 32px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(16px);
}

.home-cinematic .site-header::after {
    position: absolute;
    right: 0;
    bottom: -2px;
    left: 0;
    height: 3px;
    background:
        linear-gradient(90deg, transparent 0 4%, rgba(127, 80, 24, 0.4) 12%, #c8943d 50%, rgba(127, 80, 24, 0.4) 88%, transparent 96%);
    box-shadow: 0 2px 12px rgba(176, 118, 38, 0.18);
    content: "";
}

.home-cinematic .nav-shell {
    width: min(1480px, calc(100% - 56px));
}

.home-cinematic .brand {
    width: 182px;
    height: 64px;
}

.home-cinematic .main-menu {
    gap: 8px;
}

.home-cinematic .main-menu a,
.home-cinematic .main-menu button {
    border-radius: 2px;
    font-family: var(--serif);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-cinematic .main-menu a[aria-current="page"] {
    position: relative;
    background: rgba(184, 129, 45, 0.08);
}

.home-cinematic .main-menu a[aria-current="page"]::after {
    position: absolute;
    right: 25%;
    bottom: 2px;
    left: 25%;
    height: 1px;
    background: var(--gold-bright);
    box-shadow: 0 0 8px rgba(240, 194, 100, 0.55);
    content: "";
}

.home-cinematic .main-menu .nav-cta {
    min-height: 46px;
    padding-inline: 18px;
    border-color: rgba(226, 178, 79, 0.72);
    background:
        linear-gradient(180deg, rgba(190, 135, 48, 0.2), rgba(85, 52, 16, 0.16)),
        #12110e;
    box-shadow:
        0 0 0 2px #0d0d0b,
        0 0 0 3px rgba(170, 116, 36, 0.56),
        inset 0 0 18px rgba(184, 126, 39, 0.08);
}

.home-cinematic main {
    overflow: hidden;
}

.imperivm-hero {
    position: relative;
    min-height: 830px;
    border-bottom: 1px solid rgba(194, 139, 57, 0.46);
    isolation: isolate;
    overflow: hidden;
}

.imperivm-hero::before,
.imperivm-hero::after {
    position: absolute;
    z-index: 2;
    right: 0;
    left: 0;
    height: 38px;
    pointer-events: none;
    content: "";
}

.imperivm-hero::before {
    top: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.64), transparent),
        repeating-linear-gradient(90deg, transparent 0 78px, rgba(205, 158, 73, 0.055) 79px 80px);
}

.imperivm-hero::after {
    bottom: 0;
    border-top: 1px solid rgba(209, 159, 70, 0.28);
    background:
        linear-gradient(180deg, rgba(10, 9, 7, 0.1), rgba(7, 7, 6, 0.96)),
        repeating-linear-gradient(135deg, transparent 0 13px, rgba(206, 158, 73, 0.045) 14px 15px);
}

.imperivm-hero-art,
.imperivm-hero-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.imperivm-hero-art {
    z-index: -2;
    background-image: url("../media/home-hero-imperivm.webp");
    background-position: center 46%;
    background-size: cover;
    filter: saturate(0.86) contrast(1.06);
    transform: scale(1.012);
}

.imperivm-hero-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 46%;
}

.imperivm-hero-shade {
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(4, 5, 5, 0.92) 0%, rgba(6, 7, 7, 0.72) 31%, rgba(7, 7, 6, 0.24) 58%, rgba(5, 6, 6, 0.42) 100%),
        linear-gradient(180deg, rgba(4, 5, 5, 0.38) 0%, transparent 24%, rgba(5, 5, 5, 0.24) 63%, rgba(6, 6, 5, 0.93) 100%),
        radial-gradient(circle at 76% 46%, transparent 0 29%, rgba(3, 3, 3, 0.3) 67%, rgba(3, 3, 3, 0.66) 100%);
}

.imperivm-hero-inner {
    position: relative;
    z-index: 3;
    display: grid;
    width: min(1480px, calc(100% - 72px));
    min-height: 720px;
    margin: 0 auto;
    padding: 92px 0 182px;
    align-items: center;
    grid-template-columns: minmax(410px, 0.82fr) minmax(570px, 1.18fr);
    gap: clamp(46px, 6vw, 104px);
}

.imperivm-hero-copy {
    max-width: 650px;
    padding-left: clamp(0px, 2vw, 24px);
}

.hero-kicker {
    display: flex;
    margin-bottom: 20px;
    align-items: center;
    gap: 13px;
    color: #e9bd69;
    font-family: var(--serif);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.hero-kicker span {
    position: relative;
    width: 46px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d39b45);
}

.hero-kicker span::after {
    position: absolute;
    top: 50%;
    right: -2px;
    width: 5px;
    height: 5px;
    border: 1px solid #e5b75b;
    background: #16110b;
    content: "";
    transform: translateY(-50%) rotate(45deg);
}

.imperivm-hero-copy h1 {
    max-width: 640px;
    margin: 0 0 22px;
    color: #f2e5c5;
    font-size: clamp(3.65rem, 5.9vw, 6.5rem);
    font-weight: 500;
    letter-spacing: -0.048em;
    line-height: 0.91;
    text-shadow:
        0 2px rgba(255, 255, 255, 0.06),
        0 5px 28px rgba(0, 0, 0, 0.72);
    text-transform: uppercase;
    text-wrap: balance;
}

.imperivm-hero-copy .hero-lead {
    max-width: 570px;
    margin-bottom: 0;
    color: #d0c8b6;
    font-family: var(--serif);
    font-size: clamp(1.04rem, 1.4vw, 1.24rem);
    line-height: 1.65;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.82);
}

.imperivm-hero-copy .hero-actions {
    display: flex;
    margin-top: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.button-imperial,
.button-relic {
    position: relative;
    min-height: 54px;
    padding-inline: 30px;
    border-radius: 1px;
    font-family: var(--serif);
    font-size: 0.84rem;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.button-imperial::before,
.button-relic::before {
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(52, 32, 8, 0.42);
    pointer-events: none;
    content: "";
}

.button-relic {
    border-color: rgba(218, 168, 76, 0.7);
    background:
        linear-gradient(180deg, rgba(33, 30, 23, 0.9), rgba(11, 12, 11, 0.96));
    box-shadow:
        inset 0 0 20px rgba(190, 133, 42, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.3);
    color: #f0d89e;
}

.button-relic::before {
    border-color: rgba(223, 177, 87, 0.14);
}

.button-relic:hover {
    border-color: #e8bd68;
    background:
        linear-gradient(180deg, rgba(61, 47, 25, 0.92), rgba(15, 15, 12, 0.98));
    color: #fff0c4;
    transform: translateY(-2px);
}

.hero-seals {
    display: flex;
    margin: 32px 0 0;
    padding: 21px 0 0;
    border-top: 1px solid rgba(218, 170, 80, 0.22);
    flex-wrap: wrap;
    gap: 14px 24px;
    list-style: none;
}

.hero-seals li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #c8c0ae;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.hero-seals i {
    width: 8px;
    height: 8px;
    border: 1px solid #c49342;
    box-shadow: inset 0 0 0 2px #14110c, 0 0 8px rgba(197, 142, 57, 0.28);
    transform: rotate(45deg);
}

.cinematic-oracle {
    position: relative;
    width: 100%;
    max-width: 760px;
    padding-top: 68px;
    justify-self: end;
}

.oracle-crown {
    position: absolute;
    z-index: 12;
    top: 0;
    left: 50%;
    display: flex;
    width: min(430px, 70%);
    height: 112px;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
}

.oracle-medallion {
    position: relative;
    z-index: 2;
    display: grid;
    width: 84px;
    height: 84px;
    border: 2px solid #b47d2f;
    border-radius: 50%;
    place-items: center;
    background:
        radial-gradient(circle at 38% 32%, #eab865 0 3%, #7c4e19 21%, #24170d 48%, #0d0d0c 72%);
    box-shadow:
        0 0 0 4px #0d0c0a,
        0 0 0 6px rgba(181, 124, 43, 0.7),
        0 12px 28px rgba(0, 0, 0, 0.6),
        inset 0 0 18px rgba(235, 180, 81, 0.24);
}

.oracle-medallion::before,
.oracle-medallion::after {
    position: absolute;
    border: 1px solid rgba(226, 174, 77, 0.62);
    content: "";
    transform: rotate(45deg);
}

.oracle-medallion::before {
    width: 30px;
    height: 30px;
}

.oracle-medallion::after {
    width: 17px;
    height: 17px;
    background: radial-gradient(circle at 35% 30%, #ff9c73, #8d161b 54%, #26090a);
    box-shadow: 0 0 17px rgba(196, 45, 42, 0.54);
}

.oracle-medallion i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffe5ac;
    box-shadow: 0 0 10px #ffd487;
}

.oracle-wing {
    position: relative;
    width: 145px;
    height: 34px;
    border-top: 2px solid rgba(196, 140, 51, 0.76);
    opacity: 0.92;
}

.oracle-wing::before,
.oracle-wing::after {
    position: absolute;
    height: 20px;
    border-top: 1px solid rgba(222, 172, 78, 0.48);
    border-radius: 50%;
    content: "";
}

.oracle-wing::before {
    top: 6px;
    width: 100%;
}

.oracle-wing::after {
    top: 13px;
    width: 80%;
}

.oracle-wing-left {
    margin-right: -9px;
    border-radius: 85% 0 0;
    transform: rotate(10deg);
}

.oracle-wing-right {
    margin-left: -9px;
    border-radius: 0 85% 0 0;
    transform: rotate(-10deg) scaleX(-1);
}

.oracle-title {
    position: absolute;
    z-index: 14;
    top: 70px;
    left: 50%;
    display: grid;
    min-width: 250px;
    padding: 8px 32px 9px;
    border: 1px solid rgba(195, 135, 46, 0.72);
    place-items: center;
    background:
        linear-gradient(180deg, rgba(42, 31, 18, 0.98), rgba(11, 12, 11, 0.98));
    box-shadow:
        0 0 0 3px #0a0b0a,
        0 0 0 4px rgba(187, 129, 42, 0.46),
        0 8px 20px rgba(0, 0, 0, 0.56);
    clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
    transform: translateX(-50%);
}

.oracle-title span,
.oracle-title strong {
    font-family: var(--serif);
    text-transform: uppercase;
}

.oracle-title span {
    color: #e7c06f;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.oracle-title strong {
    margin-top: 1px;
    color: #aaa18e;
    font-size: 0.58rem;
    letter-spacing: 0.13em;
}

.oracle-frame {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(206, 151, 60, 0.65);
    border-radius: 43% 43% 16% 16% / 24% 24% 8% 8%;
    background:
        linear-gradient(145deg, rgba(166, 111, 35, 0.7), rgba(32, 22, 13, 0.92) 18%, rgba(117, 77, 27, 0.82) 51%, rgba(27, 20, 13, 0.95) 82%),
        #15110d;
    box-shadow:
        0 0 0 4px rgba(7, 8, 7, 0.92),
        0 0 0 6px rgba(154, 99, 30, 0.48),
        0 26px 70px rgba(0, 0, 0, 0.56),
        inset 0 0 28px rgba(237, 183, 82, 0.12);
}

.oracle-frame::before,
.oracle-frame::after {
    position: absolute;
    z-index: 2;
    top: 36%;
    width: 36px;
    height: 92px;
    border: 1px solid rgba(204, 150, 60, 0.58);
    background:
        linear-gradient(135deg, #24170d, #8a5923 48%, #1b140d);
    box-shadow: inset 0 0 12px rgba(240, 187, 90, 0.14);
    content: "";
}

.oracle-frame::before {
    left: -18px;
    clip-path: polygon(45% 0, 100% 25%, 75% 50%, 100% 75%, 45% 100%, 0 50%);
}

.oracle-frame::after {
    right: -18px;
    clip-path: polygon(55% 0, 0 25%, 25% 50%, 0 75%, 55% 100%, 100% 50%);
}

.cinematic-slider {
    --slider-duration: 7600ms;
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(230, 190, 103, 0.52);
    border-radius: 40% 40% 13% 13% / 22% 22% 7% 7%;
    background: #0b0d0c;
    box-shadow:
        inset 0 0 26px rgba(0, 0, 0, 0.86),
        0 0 0 3px #0b0c0b;
    touch-action: pan-y;
}

.cinematic-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9.3;
    overflow: hidden;
    border-radius: 40% 40% 5% 5% / 22% 22% 3% 3%;
    background: #090a09;
}

.cinematic-viewport::before,
.cinematic-viewport::after {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    content: "";
}

.cinematic-viewport::before {
    border: 1px solid rgba(242, 202, 117, 0.26);
    box-shadow:
        inset 0 0 34px rgba(2, 3, 3, 0.72),
        inset 0 -48px 52px rgba(2, 3, 3, 0.78);
}

.cinematic-viewport::after {
    z-index: 2;
    background:
        radial-gradient(ellipse at center, transparent 42%, rgba(2, 3, 3, 0.24) 72%, rgba(2, 3, 3, 0.7) 100%),
        linear-gradient(180deg, rgba(8, 9, 9, 0.08), transparent 54%, rgba(5, 6, 6, 0.83));
}

.cinematic-slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity 850ms ease, transform 1400ms ease;
    visibility: hidden;
}

.cinematic-slide.is-active {
    z-index: 1;
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

.cinematic-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.9) contrast(1.04) brightness(0.83);
    transform: scale(1.02);
}

.cinematic-slider.is-playing .cinematic-slide.is-active img {
    animation: cinematic-drift var(--slider-duration) ease-out both;
}

.cinematic-slide figcaption {
    position: absolute;
    right: 86px;
    bottom: 22px;
    left: 30px;
    z-index: 4;
    display: grid;
    gap: 2px;
    color: rgba(239, 231, 216, 0.78);
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.9);
    transform: translateY(12px);
    opacity: 0;
    transition: opacity 620ms ease 180ms, transform 620ms ease 180ms;
}

.cinematic-slide.is-active figcaption {
    opacity: 1;
    transform: translateY(0);
}

.cinematic-slide figcaption small {
    color: #c89846;
    font-size: 0.55rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cinematic-slide figcaption strong {
    color: #f2d493;
    font-family: var(--serif);
    font-size: clamp(0.95rem, 1.6vw, 1.3rem);
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-transform: uppercase;
}

.cinematic-slide figcaption span {
    overflow: hidden;
    color: rgba(239, 233, 221, 0.72);
    font-size: 0.64rem;
    font-weight: 600;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cinematic-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: grid;
    width: 38px;
    height: 58px;
    padding: 0;
    border: 1px solid rgba(223, 177, 88, 0.46);
    place-items: center;
    background: linear-gradient(180deg, rgba(25, 21, 15, 0.9), rgba(8, 9, 8, 0.88));
    color: #e9c879;
    font: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.74;
    transform: translateY(-50%);
    transition: border-color 180ms ease, color 180ms ease, opacity 180ms ease, transform 180ms ease;
    backdrop-filter: blur(6px);
}

.cinematic-arrow:hover,
.cinematic-arrow:focus-visible {
    border-color: rgba(241, 202, 117, 0.82);
    color: #ffe1a0;
    opacity: 1;
}

.cinematic-arrow-prev {
    left: 14px;
    clip-path: polygon(18% 0, 100% 8%, 100% 92%, 18% 100%, 0 50%);
}

.cinematic-arrow-prev:hover,
.cinematic-arrow-prev:focus-visible {
    transform: translate(-2px, -50%);
}

.cinematic-arrow-next {
    right: 14px;
    clip-path: polygon(0 8%, 82% 0, 100% 50%, 82% 100%, 0 92%);
}

.cinematic-arrow-next:hover,
.cinematic-arrow-next:focus-visible {
    transform: translate(2px, -50%);
}

.cinematic-controls {
    position: relative;
    z-index: 6;
    display: grid;
    min-height: 54px;
    padding: 10px 18px 12px;
    border-top: 1px solid rgba(205, 151, 61, 0.42);
    align-items: center;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    background: linear-gradient(180deg, #181711, #090a09);
}

.cinematic-counter {
    display: inline-flex;
    align-items: baseline;
    color: #777164;
    font-family: var(--serif);
    font-size: 0.65rem;
    font-variant-numeric: tabular-nums;
    gap: 4px;
}

.cinematic-counter b {
    color: #efca7b;
    font-size: 1rem;
    font-weight: 700;
}

.cinematic-counter i {
    color: #8d7650;
    font-style: normal;
}

.cinematic-dots {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.cinematic-dot {
    display: grid;
    width: 34px;
    height: 30px;
    padding: 0;
    border: 0;
    place-items: center;
    background: transparent;
    cursor: pointer;
}

.cinematic-dot span {
    width: 20px;
    height: 2px;
    background: rgba(181, 166, 135, 0.35);
    transition: width 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.cinematic-dot:hover span,
.cinematic-dot:focus-visible span {
    background: rgba(236, 202, 131, 0.72);
}

.cinematic-dot.is-active span {
    width: 28px;
    background: #d5a44d;
    box-shadow: 0 0 9px rgba(213, 164, 77, 0.34);
}

.cinematic-toggle {
    display: grid;
    width: 34px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(204, 155, 70, 0.3);
    place-items: center;
    background: rgba(11, 11, 9, 0.72);
    color: #cbb57f;
    font: inherit;
    font-size: 0.62rem;
    cursor: pointer;
}

.cinematic-toggle:hover,
.cinematic-toggle:focus-visible {
    border-color: rgba(230, 188, 100, 0.68);
    color: #f0d18a;
}

.cinematic-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.cinematic-progress i {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #845119, #e0ad50 68%, #f6d78f);
    box-shadow: 0 0 8px rgba(222, 171, 79, 0.36);
    transform: scaleX(0);
    transform-origin: left;
}

.cinematic-slider.is-playing .cinematic-progress i {
    animation: cinematic-progress var(--slider-duration) linear both;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@keyframes cinematic-drift {
    from { transform: scale(1.02); }
    to { transform: scale(1.075); }
}

@keyframes cinematic-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .imperivm-hero-video {
        display: none;
    }

    .cinematic-slide,
    .cinematic-slide figcaption {
        transition: none;
    }

    .cinematic-slider .cinematic-slide img,
    .cinematic-slider .cinematic-progress i {
        animation: none !important;
    }
}

.hero-stat-rail {
    position: absolute;
    z-index: 5;
    bottom: 24px;
    left: 50%;
    display: grid;
    width: min(1360px, calc(100% - 72px));
    min-height: 106px;
    padding: 12px 34px;
    border: 1px solid rgba(205, 151, 62, 0.62);
    align-items: stretch;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background:
        linear-gradient(180deg, rgba(27, 25, 20, 0.97), rgba(9, 10, 9, 0.98)),
        #0e0e0c;
    box-shadow:
        0 0 0 4px rgba(7, 8, 7, 0.9),
        0 0 0 5px rgba(139, 91, 29, 0.48),
        0 20px 45px rgba(0, 0, 0, 0.48),
        inset 0 1px rgba(255, 220, 151, 0.08);
    clip-path: polygon(1.5% 0, 98.5% 0, 100% 26%, 100% 74%, 98.5% 100%, 1.5% 100%, 0 74%, 0 26%);
    transform: translateX(-50%);
}

.hero-stat {
    position: relative;
    display: flex;
    min-width: 0;
    padding: 10px clamp(12px, 2vw, 28px);
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.hero-stat + .hero-stat::before {
    position: absolute;
    top: 18%;
    bottom: 18%;
    left: 0;
    width: 1px;
    background: linear-gradient(transparent, rgba(217, 167, 78, 0.5), transparent);
    content: "";
}

.hero-stat-icon {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border: 1px solid rgba(205, 151, 61, 0.58);
    border-radius: 50%;
    place-items: center;
    background:
        radial-gradient(circle at 38% 30%, rgba(214, 161, 69, 0.19), transparent 35%),
        #15130f;
    box-shadow:
        inset 0 0 13px rgba(196, 137, 44, 0.12),
        0 0 0 3px #0a0b0a,
        0 0 0 4px rgba(139, 91, 29, 0.4);
}

.hero-stat-icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: #d9a950;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.hero-stat > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.hero-stat small {
    overflow: hidden;
    color: #c7b58f;
    font-family: var(--serif);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-stat strong {
    color: #e2b865;
    font-family: var(--serif);
    font-size: clamp(1.45rem, 2.2vw, 2.15rem);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.025em;
    line-height: 1.05;
}

.home-cinematic .home-section {
    width: min(1360px, calc(100% - 72px));
    margin-inline: auto;
    padding: 96px 0 104px;
}

.home-cinematic .class-section {
    width: min(1480px, calc(100% - 56px));
}

.imperial-section {
    position: relative;
}

.imperial-heading {
    display: grid;
    max-width: 980px;
    margin: 0 auto 48px;
    align-items: center;
    grid-template-columns: minmax(60px, 1fr) minmax(320px, 620px) minmax(60px, 1fr);
    gap: 26px;
    text-align: center;
}

.imperial-heading-line {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(209, 159, 70, 0.72));
}

.imperial-heading-line:last-child {
    transform: scaleX(-1);
}

.imperial-heading-line::after {
    position: absolute;
    top: 50%;
    right: -2px;
    width: 7px;
    height: 7px;
    border: 1px solid #ba8236;
    background: #0c0d0c;
    content: "";
    transform: translateY(-50%) rotate(45deg);
}

.imperial-heading .eyebrow {
    margin-bottom: 9px;
    color: #c89443;
    font-family: var(--serif);
    letter-spacing: 0.26em;
}

.imperial-heading h2 {
    margin-bottom: 12px;
    color: #eddfbd;
    font-size: clamp(2.55rem, 4vw, 4.15rem);
    font-weight: 500;
    text-transform: uppercase;
}

.imperial-heading p:last-child {
    max-width: 650px;
    margin: 0 auto;
    color: #a9a396;
    font-size: 0.94rem;
}

.home-cinematic .class-section {
    padding-top: 86px;
}

.home-cinematic .class-grid {
    gap: 16px;
}

.home-cinematic .class-card {
    min-height: 560px;
    border: 1px solid rgba(203, 150, 61, 0.48);
    border-radius: 1px;
    background: #0d0e0d;
    box-shadow:
        0 0 0 3px #090a09,
        0 0 0 4px rgba(115, 75, 25, 0.34),
        0 20px 44px rgba(0, 0, 0, 0.32);
    isolation: isolate;
    transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms ease;
}

.home-cinematic .class-card::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.05) 36%, rgba(5, 6, 6, 0.38) 58%, rgba(5, 6, 6, 0.98) 91%),
        radial-gradient(circle at 50% 30%, transparent 0 38%, rgba(2, 3, 3, 0.36) 100%);
    pointer-events: none;
    content: "";
}

.home-cinematic .class-card::after {
    position: absolute;
    z-index: 4;
    right: 18px;
    bottom: 18px;
    left: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(211, 161, 71, 0.58), transparent);
    content: "";
}

.home-cinematic .class-card:hover {
    z-index: 2;
    border-color: rgba(237, 190, 96, 0.9);
    box-shadow:
        0 0 0 3px #090a09,
        0 0 0 4px rgba(202, 144, 55, 0.68),
        0 25px 62px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(166, 106, 30, 0.09);
    transform: translateY(-8px);
}

.home-cinematic .class-art {
    inset: 0;
    align-items: stretch;
}

.home-cinematic .class-art::after {
    display: none;
}

.home-cinematic .class-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
    filter: saturate(0.88) contrast(1.03);
    transition: filter 350ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.home-cinematic .class-sura .class-art img {
    object-position: center 30%;
}

.home-cinematic .class-ninja .class-art img {
    object-position: center 31%;
}

.home-cinematic .class-shaman .class-art img {
    object-position: center 28%;
}

.home-cinematic .class-card:hover .class-art img {
    filter: saturate(1) contrast(1.03);
    transform: scale(1.045);
}

.class-roman {
    position: absolute;
    z-index: 3;
    top: 18px;
    left: 18px;
    display: grid;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(211, 161, 71, 0.52);
    place-items: center;
    background: rgba(8, 9, 8, 0.72);
    color: #d7a751;
    font-family: var(--serif);
    font-size: 0.72rem;
    box-shadow: inset 0 0 10px rgba(191, 131, 39, 0.1);
}

.home-cinematic .class-copy {
    z-index: 3;
    padding: 28px 30px 32px;
    text-align: center;
}

.home-cinematic .class-copy > p {
    margin-bottom: 6px;
    color: #b6873e;
    font-family: var(--serif);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.21em;
    text-transform: uppercase;
}

.home-cinematic .class-copy h3 {
    margin-bottom: 8px;
    color: #f0ddb2;
    font-size: clamp(1.75rem, 2.3vw, 2.45rem);
    font-weight: 500;
    letter-spacing: 0.045em;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.82);
    text-transform: uppercase;
}

.home-cinematic .class-copy > span {
    display: block;
    max-width: 280px;
    margin: 0 auto;
    color: #aaa397;
    font-size: 0.74rem;
    line-height: 1.55;
}

.class-corner {
    position: absolute;
    z-index: 5;
    width: 30px;
    height: 30px;
    pointer-events: none;
}

.class-corner::before,
.class-corner::after {
    position: absolute;
    background: #ca9341;
    content: "";
}

.class-corner::before {
    width: 100%;
    height: 1px;
}

.class-corner::after {
    width: 1px;
    height: 100%;
}

.class-corner-top {
    top: 7px;
    right: 7px;
}

.class-corner-bottom {
    bottom: 7px;
    left: 7px;
    transform: rotate(180deg);
}

.path-section::before,
.news-section::before {
    position: absolute;
    top: 0;
    right: 50%;
    left: 50%;
    width: 100vw;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 147, 58, 0.35), transparent);
    content: "";
    transform: translateX(-50%);
}

.home-cinematic .path-grid {
    gap: 20px;
}

.home-cinematic .path-card {
    min-height: 330px;
    padding: 42px 38px 34px;
    border: 1px solid rgba(196, 143, 56, 0.34);
    border-radius: 1px;
    background:
        radial-gradient(circle at 90% 4%, rgba(193, 134, 43, 0.09), transparent 32%),
        linear-gradient(145deg, rgba(29, 27, 22, 0.94), rgba(10, 11, 10, 0.98));
    box-shadow:
        0 0 0 3px #080908,
        0 0 0 4px rgba(115, 75, 25, 0.22),
        0 18px 40px rgba(0, 0, 0, 0.24);
}

.home-cinematic .path-card::before {
    position: absolute;
    top: 13px;
    right: 13px;
    bottom: 13px;
    left: 13px;
    border: 1px solid rgba(223, 175, 83, 0.1);
    pointer-events: none;
    content: "";
}

.home-cinematic .path-card::after {
    position: absolute;
    top: 0;
    left: 42px;
    width: 88px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c58b38, transparent);
    content: "";
}

.path-rune {
    position: absolute;
    top: 26px;
    right: 32px;
    color: rgba(209, 159, 70, 0.09);
    font-family: var(--serif);
    font-size: 7rem;
    line-height: 1;
}

.home-cinematic .path-index {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
    color: #c8913f;
    font-family: var(--serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.home-cinematic .path-card h3 {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
    color: #ebdbb8;
    font-size: clamp(1.6rem, 2vw, 2.1rem);
    font-weight: 500;
}

.home-cinematic .path-card > p:not(.path-index) {
    position: relative;
    z-index: 1;
    min-height: 78px;
    color: #a7a093;
    font-size: 0.9rem;
}

.home-cinematic .path-card a {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #dcb466;
    font-family: var(--serif);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.home-cinematic .path-card a span {
    font-size: 1.1rem;
    transition: transform 180ms ease;
}

.home-cinematic .path-card a:hover span {
    transform: translateX(4px);
}

.home-cinematic .story-whisper-section {
    padding-top: 22px;
}

.home-cinematic .story-whisper {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 46px;
    overflow: hidden;
    padding: 42px 48px;
    border: 1px solid rgba(183, 137, 70, .42);
    background:
        linear-gradient(100deg, rgba(18, 14, 11, .97), rgba(31, 22, 15, .9)),
        url('../media/home-hero-imperivm.webp') center 42% / cover;
    box-shadow: 0 22px 52px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 220, 151, .08);
}

.home-cinematic .story-whisper::before {
    content: "";
    position: absolute;
    inset: 9px;
    pointer-events: none;
    border: 1px solid rgba(238, 191, 107, .12);
}

.home-cinematic .story-whisper-copy,
.home-cinematic .story-whisper-fragments {
    position: relative;
    z-index: 1;
}

.home-cinematic .story-whisper h2 {
    max-width: 720px;
    margin: 8px 0 13px;
    color: #f2dfb5;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.4vw, 3.4rem);
    line-height: 1.02;
}

.home-cinematic .story-whisper-copy > p:last-of-type {
    max-width: 720px;
    color: #c7b99d;
    line-height: 1.75;
}

.home-cinematic .story-whisper-copy a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: #e5ba69;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.home-cinematic .story-whisper-fragments {
    display: grid;
    align-content: center;
    gap: 11px;
}

.home-cinematic .story-whisper-fragments span {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    min-height: 54px;
    padding: 10px 16px 10px 10px;
    border: 1px solid rgba(183, 137, 70, .24);
    background: rgba(7, 6, 5, .44);
    color: #d9ccb2;
    font-family: var(--font-display);
    font-size: 1.02rem;
}

.home-cinematic .story-whisper-fragments i {
    color: #a97b3d;
    font-family: var(--font-serif);
    font-size: .72rem;
    font-style: normal;
    letter-spacing: .08em;
}

.home-cinematic .news-layout {
    gap: 20px;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
}

.home-cinematic .news-card,
.home-cinematic .news-list-item,
.imperial-empty {
    border: 1px solid rgba(195, 142, 55, 0.34);
    border-radius: 1px;
    background:
        linear-gradient(145deg, rgba(28, 26, 21, 0.96), rgba(9, 10, 9, 0.98));
    box-shadow:
        0 0 0 3px #080908,
        0 0 0 4px rgba(115, 75, 25, 0.18);
}

.home-cinematic .news-card {
    min-height: 370px;
    padding: clamp(32px, 4vw, 54px);
}

.home-cinematic .news-card::before {
    position: absolute;
    top: 0;
    left: 44px;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #cb9340, transparent);
    content: "";
}

.news-card-topline {
    display: flex;
    margin-bottom: 24px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.news-card-topline time {
    color: #7f7b71;
    font-size: 0.73rem;
}

.home-cinematic .news-type {
    border: 0;
    background: transparent;
    color: #cb9846;
    font-family: var(--serif);
    letter-spacing: 0.16em;
}

.home-cinematic .news-card h3 {
    max-width: 720px;
    color: #ead9b4;
    font-size: clamp(2rem, 3vw, 3.2rem);
    font-weight: 500;
}

.home-cinematic .news-card > p {
    color: #aaa397;
}

.home-cinematic .news-actions {
    border-top-color: rgba(207, 157, 68, 0.18);
}

.home-cinematic .news-list {
    gap: 12px;
}

.home-cinematic .news-list-item {
    min-height: 112px;
    padding: 21px 24px;
    text-decoration: none;
    transition: border-color 180ms ease, transform 180ms ease;
}

.home-cinematic .news-list-item:hover {
    border-color: rgba(224, 174, 79, 0.68);
    transform: translateX(4px);
}

.home-cinematic .news-list-item > span,
.home-cinematic .news-list-item > small {
    color: #817b70;
    font-size: 0.67rem;
}

.home-cinematic .news-list-item h3 {
    margin: 8px 0;
    color: #d8c8a6;
    font-size: 1.18rem;
}

.imperial-empty {
    padding: 58px;
    text-align: center;
}

.home-cinematic .home-start {
    position: relative;
    min-height: 250px;
    padding: clamp(36px, 5vw, 68px);
    border: 1px solid rgba(205, 151, 61, 0.48);
    border-radius: 1px;
    background:
        linear-gradient(90deg, rgba(7, 8, 7, 0.98), rgba(16, 14, 11, 0.86)),
        url("../media/home-hero-imperivm.webp") center 62% / cover;
    box-shadow:
        0 0 0 4px #080908,
        0 0 0 5px rgba(115, 75, 25, 0.3),
        0 24px 60px rgba(0, 0, 0, 0.36);
}

.home-cinematic .home-start::before {
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(223, 175, 83, 0.13);
    pointer-events: none;
    content: "";
}

.home-start-copy {
    position: relative;
    z-index: 1;
    max-width: 730px;
}

.home-cinematic .home-start h2 {
    margin-bottom: 14px;
    color: #efdfbc;
    font-size: clamp(2.15rem, 3.7vw, 3.7rem);
    font-weight: 500;
    text-transform: uppercase;
}

.home-cinematic .home-start-copy > p:last-child {
    margin-bottom: 0;
    color: #aba497;
}

.home-cinematic .home-start .button-row {
    position: relative;
    z-index: 1;
}

@media (max-width: 1320px) {
    .home-cinematic .nav-toggle {
        display: block;
    }

    .home-cinematic .main-menu {
        position: absolute;
        top: 84px;
        right: 0;
        left: 0;
        display: none;
        max-height: calc(100vh - 84px);
        padding: 18px 28px 26px;
        border-bottom: 1px solid rgba(193, 140, 52, 0.36);
        align-items: stretch;
        flex-direction: column;
        overflow-y: auto;
        background: rgba(12, 13, 12, 0.99);
    }

    .home-cinematic .main-menu.is-open {
        display: flex;
    }

    .home-cinematic .main-menu a,
    .home-cinematic .main-menu button,
    .home-cinematic .nav-logout {
        width: 100%;
        justify-content: flex-start;
    }

    .home-cinematic .nav-divider {
        width: 100%;
        height: 1px;
        margin: 8px 0;
    }
}

@media (max-width: 1260px) {
    .imperivm-hero-inner {
        width: min(1160px, calc(100% - 56px));
        grid-template-columns: minmax(380px, 0.85fr) minmax(500px, 1.15fr);
        gap: 44px;
    }

    .cinematic-oracle {
        max-width: 650px;
    }

    .imperivm-hero-copy h1 {
        font-size: clamp(3.45rem, 5.4vw, 5.7rem);
    }

    .hero-stat-rail {
        width: min(1120px, calc(100% - 56px));
    }

    .hero-stat {
        padding-inline: 12px;
    }

    .hero-stat-icon {
        width: 48px;
        height: 48px;
    }

    .home-cinematic .class-card {
        min-height: 510px;
    }
}

@media (max-width: 1040px) {
    .home-cinematic .story-whisper {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .home-cinematic .site-header {
        height: 72px;
    }

    .home-cinematic .nav-shell {
        width: min(100% - 36px, 920px);
    }

    .home-cinematic .brand {
        width: 158px;
        height: 56px;
    }

    .home-cinematic .main-menu {
        top: 72px;
        border: 1px solid rgba(193, 140, 52, 0.34);
        border-top: 0;
        background: rgba(12, 13, 12, 0.99);
    }

    .imperivm-hero {
        min-height: 1240px;
    }

    .imperivm-hero-inner {
        width: min(820px, calc(100% - 48px));
        min-height: auto;
        padding: 78px 0 210px;
        grid-template-columns: 1fr;
        gap: 86px;
    }

    .imperivm-hero-copy {
        max-width: 680px;
        padding-left: 0;
    }

    .cinematic-oracle {
        max-width: 760px;
        justify-self: center;
    }

    .imperivm-hero-art {
        background-position: 64% center;
    }

    .imperivm-hero-video {
        object-position: 64% center;
    }

    .imperivm-hero-shade {
        background:
            linear-gradient(180deg, rgba(4, 5, 5, 0.72), rgba(4, 5, 5, 0.38) 45%, rgba(5, 5, 5, 0.9) 100%),
            linear-gradient(90deg, rgba(4, 5, 5, 0.84), rgba(4, 5, 5, 0.2) 74%, rgba(4, 5, 5, 0.5));
    }

    .hero-stat-rail {
        width: min(820px, calc(100% - 48px));
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-stat {
        justify-content: flex-start;
    }

    .hero-stat:nth-child(3)::before {
        display: none;
    }

    .hero-stat:nth-child(n + 3) {
        border-top: 1px solid rgba(211, 161, 71, 0.17);
    }

    .home-cinematic .class-grid {
        gap: 20px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-cinematic .class-card {
        min-height: 640px;
    }

    .home-cinematic .news-layout {
        grid-template-columns: 1fr;
    }

    .home-cinematic .news-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-cinematic .news-list-item:hover {
        transform: translateY(-3px);
    }
}

@media (max-width: 760px) {
	.home-cinematic .story-whisper {
		padding: 32px 24px;
	}

    .home-cinematic .nav-shell {
        width: calc(100% - 28px);
    }

    .imperivm-hero {
        min-height: auto;
        padding-bottom: 32px;
    }

    .imperivm-hero-inner {
        width: calc(100% - 34px);
        padding: 62px 0 64px;
        gap: 72px;
    }

    .imperivm-hero-copy h1 {
        font-size: clamp(3.05rem, 13.2vw, 5rem);
    }

    .hero-kicker {
        font-size: 0.68rem;
        letter-spacing: 0.22em;
    }

    .imperivm-hero-copy .hero-lead {
        font-size: 1rem;
    }

    .hero-seals {
        display: grid;
    }

    .cinematic-oracle {
        padding-top: 52px;
    }

    .oracle-crown {
        width: 76%;
        height: 86px;
    }

    .oracle-medallion {
        width: 66px;
        height: 66px;
    }

    .oracle-wing {
        width: 105px;
    }

    .oracle-title {
        top: 51px;
        min-width: 210px;
        padding-inline: 22px;
    }

    .oracle-frame {
        padding: 10px;
        border-radius: 34% 34% 10% 10% / 18% 18% 5% 5%;
    }

    .cinematic-oracle .cinematic-slider,
    .cinematic-oracle .cinematic-viewport {
        border-radius: 31% 31% 5% 5% / 16% 16% 3% 3%;
    }

    .cinematic-slide figcaption {
        right: 70px;
        left: 22px;
    }

    .cinematic-arrow {
        width: 34px;
        height: 52px;
    }

    .cinematic-arrow-prev {
        left: 10px;
    }

    .cinematic-arrow-next {
        right: 10px;
    }

    .hero-stat-rail {
        position: relative;
        bottom: auto;
        left: auto;
        width: calc(100% - 34px);
        margin: 0 auto;
        padding: 10px 16px;
        transform: none;
    }

    .hero-stat {
        gap: 10px;
    }

    .hero-stat-icon {
        width: 44px;
        height: 44px;
    }

    .hero-stat small {
        font-size: 0.55rem;
    }

    .hero-stat strong {
        font-size: 1.45rem;
    }

    .home-cinematic .home-section,
    .home-cinematic .class-section {
        width: calc(100% - 34px);
        padding: 72px 0 78px;
    }

    .imperial-heading {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .imperial-heading-line {
        width: min(240px, 70%);
        margin: 0 auto;
    }

    .imperial-heading-line:last-child {
        display: none;
    }

    .imperial-heading h2 {
        font-size: clamp(2.1rem, 10vw, 3.25rem);
    }

    .home-cinematic .path-grid {
        grid-template-columns: 1fr;
    }

    .home-cinematic .path-card {
        min-height: 280px;
    }

    .home-cinematic .news-list {
        grid-template-columns: 1fr;
    }

    .home-cinematic .home-start {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .imperivm-hero-inner {
        padding-top: 48px;
    }

    .imperivm-hero-copy .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .imperivm-hero-copy .button {
        width: 100%;
    }

    .cinematic-oracle {
        width: calc(100% + 10px);
        margin-left: -5px;
    }

    .oracle-frame::before,
    .oracle-frame::after {
        display: none;
    }

    .oracle-title span {
        font-size: 0.64rem;
    }

    .oracle-title strong {
        font-size: 0.5rem;
    }

    .cinematic-slide figcaption span {
        display: none;
    }

    .cinematic-slide figcaption {
        right: 58px;
        bottom: 14px;
        left: 18px;
    }

    .cinematic-counter {
        display: none;
    }

    .cinematic-controls {
        min-height: 46px;
        padding-inline: 10px;
        grid-template-columns: 1fr auto;
        gap: 6px;
    }

    .cinematic-dots {
        justify-content: flex-start;
    }

    .cinematic-dot {
        width: 30px;
    }

    .cinematic-arrow {
        width: 31px;
        height: 46px;
    }

    .hero-stat-rail {
        grid-template-columns: 1fr 1fr;
        clip-path: none;
    }

    .hero-stat {
        padding: 10px 6px;
    }

    .hero-stat-icon {
        display: none;
    }

    .hero-stat:nth-child(odd)::before {
        display: none;
    }

    .hero-stat:nth-child(even)::before {
        display: block;
    }

    .home-cinematic .class-grid {
        grid-template-columns: 1fr;
    }

    .home-cinematic .class-card {
        min-height: min(650px, 145vw);
    }

    .home-cinematic .class-copy {
        padding: 24px 22px 28px;
    }

    .home-cinematic .path-card {
        padding: 36px 26px 30px;
    }

    .home-cinematic .news-card {
        min-height: 0;
        padding: 30px 25px;
    }

    .news-card-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .home-cinematic .home-start {
        padding: 36px 26px;
    }

    .home-cinematic .home-start .button-row {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   IMPERIVM sitewide visual system · v12
   Extends the cinematic home language to every shared public/account page.
   -------------------------------------------------------------------------- */

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) {
    --site-gold: #d6a34b;
    --site-gold-bright: #f0ca78;
    --site-gold-dark: #6e451b;
    --site-lacquer: #701f22;
    --site-stone: #111210;
    --site-stone-raised: #181916;
    --site-ivory: #f0e4c7;
    background: #080807;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page)::before {
    background:
        linear-gradient(180deg, rgba(7, 7, 6, 0.68), #080807 690px),
        linear-gradient(90deg, rgba(6, 7, 6, 0.95), rgba(8, 8, 7, 0.58) 47%, rgba(7, 7, 6, 0.9)),
        url("../media/home-hero-imperivm.webp") center top / max(1680px, 100vw) auto no-repeat,
        #080807;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) main {
    position: relative;
    isolation: isolate;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) main::before {
    position: absolute;
    z-index: -1;
    top: 0;
    right: 0;
    left: 0;
    height: 390px;
    border-bottom: 1px solid rgba(203, 151, 60, 0.13);
    background:
        linear-gradient(180deg, rgba(7, 7, 6, 0.04), rgba(8, 8, 7, 0.72) 76%, #080807),
        repeating-linear-gradient(90deg, transparent 0 92px, rgba(218, 168, 77, 0.022) 93px 94px);
    pointer-events: none;
    content: "";
}

/* Shared navigation */

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .site-header {
    height: 84px;
    border-bottom-color: rgba(194, 139, 57, 0.42);
    background:
        linear-gradient(180deg, rgba(17, 17, 15, 0.985), rgba(8, 9, 9, 0.97)),
        #0a0b0b;
    box-shadow:
        inset 0 1px rgba(255, 220, 143, 0.05),
        0 14px 34px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(16px);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .site-header::after {
    position: absolute;
    right: 0;
    bottom: -2px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 3%, rgba(127, 80, 24, 0.42) 12%, #c8943d 50%, rgba(127, 80, 24, 0.42) 88%, transparent 97%);
    box-shadow: 0 2px 12px rgba(176, 118, 38, 0.18);
    content: "";
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .nav-shell {
    width: min(1480px, calc(100% - 56px));
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .brand {
    width: 182px;
    height: 64px;
    border-radius: 0;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .brand img {
    object-fit: contain;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu {
    gap: 8px;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu a,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu button {
    position: relative;
    min-height: 44px;
    border-radius: 1px;
    color: #d8cdb7;
    font-family: var(--serif);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu a:hover,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu button:hover,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu a[aria-current="page"] {
    background: rgba(184, 129, 45, 0.08);
    color: var(--site-gold-bright);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu a[aria-current="page"]::after {
    position: absolute;
    right: 25%;
    bottom: 2px;
    left: 25%;
    height: 1px;
    background: var(--site-gold-bright);
    box-shadow: 0 0 8px rgba(240, 194, 100, 0.55);
    content: "";
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu .nav-cta {
    min-height: 46px;
    padding-inline: 18px;
    border-color: rgba(226, 178, 79, 0.72);
    background:
        linear-gradient(180deg, rgba(190, 135, 48, 0.2), rgba(85, 52, 16, 0.16)),
        #12110e;
    box-shadow:
        0 0 0 2px #0d0d0b,
        0 0 0 3px rgba(170, 116, 36, 0.56),
        inset 0 0 18px rgba(184, 126, 39, 0.08);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .language-switcher summary {
    min-height: 44px;
    border-radius: 1px;
    background: rgba(184, 129, 45, 0.04);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .language-menu {
    border-radius: 2px;
    border-color: rgba(201, 149, 58, 0.44);
    background:
        linear-gradient(145deg, rgba(40, 31, 20, 0.3), transparent 40%),
        #0d0f0e;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .language-menu a {
    border-radius: 1px;
}

/* Page rhythm and title system */

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .content-shell {
    width: min(1240px, calc(100% - 56px));
    padding-top: 78px;
    padding-bottom: 112px;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .content-shell.wide {
    width: min(1420px, calc(100% - 56px));
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .content-shell.narrow {
    width: min(900px, calc(100% - 56px));
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .page-heading {
    position: relative;
    max-width: 880px;
    margin-bottom: 48px;
    padding: 8px 0 22px 28px;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .page-heading::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background:
        linear-gradient(180deg, transparent, #d4a04a 18%, #83511d 82%, transparent);
    box-shadow: 0 0 16px rgba(204, 147, 53, 0.2);
    content: "";
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .page-heading::after {
    position: absolute;
    bottom: 0;
    left: 28px;
    width: min(340px, 60vw);
    height: 1px;
    background: linear-gradient(90deg, rgba(220, 170, 80, 0.78), transparent);
    content: "";
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .page-heading h1 {
    max-width: 850px;
    margin-bottom: 14px;
    color: var(--site-ivory);
    font-size: clamp(3rem, 6vw, 5.8rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.94;
    text-shadow: 0 5px 28px rgba(0, 0, 0, 0.74);
    text-transform: uppercase;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .page-lead {
    max-width: 730px;
    margin-bottom: 0;
    color: #cbc1ae;
    font-family: var(--serif);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.7;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .eyebrow {
    margin-bottom: 12px;
    color: #e1af58;
    font-family: var(--serif);
    font-size: 0.72rem;
    letter-spacing: 0.24em;
}

/* Ornate surfaces */

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .wiki-card,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .news-list-item,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .summary-card,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .requirement-card,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .mobile-platform-card,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .referral-state {
    border-color: rgba(195, 142, 55, 0.36);
    border-radius: 2px;
    background:
        linear-gradient(145deg, rgba(116, 71, 26, 0.09), transparent 33%),
        radial-gradient(circle at 82% 12%, rgba(114, 28, 27, 0.06), transparent 28%),
        linear-gradient(180deg, rgba(22, 23, 20, 0.98), rgba(12, 13, 12, 0.985));
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.38),
        inset 0 1px rgba(255, 226, 162, 0.035);
    backdrop-filter: none;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel {
    padding: clamp(28px, 4vw, 44px);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel::before {
    position: absolute;
    inset: 7px;
    width: auto;
    height: auto;
    border: 1px solid rgba(211, 160, 68, 0.12);
    background: none;
    pointer-events: none;
    content: "";
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 52px;
    border-top: 2px solid rgba(226, 177, 86, 0.72);
    border-right: 2px solid rgba(226, 177, 86, 0.72);
    background: linear-gradient(135deg, transparent 46%, rgba(203, 151, 59, 0.12) 47% 49%, transparent 50%);
    pointer-events: none;
    content: "";
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel h1,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel h2,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel h3 {
    color: #f0e1bf;
    font-weight: 500;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel h2 {
    font-size: clamp(1.9rem, 3vw, 2.85rem);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel p,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .muted {
    color: #bdb5a5;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .ornament {
    color: #cf9440;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .ornament::before,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .ornament::after {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(221, 169, 76, 0.62));
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .ornament::after {
    background: linear-gradient(90deg, rgba(221, 169, 76, 0.62), transparent);
}

/* Buttons and form controls */

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .button,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) button.button {
    position: relative;
    min-height: 50px;
    padding-inline: 24px;
    border-color: rgba(226, 178, 79, 0.75);
    border-radius: 1px;
    background:
        linear-gradient(180deg, #d5a64e, #936125),
        #a8752e;
    box-shadow:
        0 0 0 2px #0e0e0c,
        0 0 0 3px rgba(178, 121, 37, 0.52),
        inset 0 1px rgba(255, 237, 190, 0.25),
        0 12px 28px rgba(0, 0, 0, 0.3);
    color: #160f07;
    font-family: var(--serif);
    font-size: 0.78rem;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .button::before,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) button.button::before {
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(57, 34, 8, 0.38);
    pointer-events: none;
    content: "";
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .button-secondary {
    background:
        linear-gradient(180deg, rgba(42, 37, 28, 0.96), rgba(13, 14, 12, 0.98)),
        #11120f;
    color: #eed394;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .button-secondary::before {
    border-color: rgba(226, 178, 79, 0.16);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .button-danger {
    border-color: rgba(189, 72, 67, 0.82);
    background: linear-gradient(180deg, #9f3b3f, #5f1d20);
    color: #fff1dc;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .button-small {
    min-height: 42px;
    padding-inline: 16px;
    font-size: 0.7rem;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-grid {
    gap: 20px 18px;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-field {
    gap: 9px;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-field label,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .field-label {
    color: #e3d4b6;
    font-family: var(--serif);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-field input,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-field textarea,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-field select,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .search-field,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .referral-copy-row input {
    min-height: 52px;
    border-color: rgba(199, 145, 54, 0.42);
    border-radius: 1px;
    background:
        linear-gradient(180deg, rgba(4, 5, 5, 0.92), rgba(10, 10, 9, 0.96));
    box-shadow:
        inset 0 0 18px rgba(0, 0, 0, 0.34),
        0 0 0 3px rgba(193, 140, 52, 0.025);
    color: #f0e5cf;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-field input:focus,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-field textarea:focus,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-field select:focus,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .search-field:focus,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .referral-copy-row input:focus {
    border-color: #d6a34b;
    background: #090a09;
    box-shadow:
        0 0 0 3px rgba(214, 163, 75, 0.12),
        0 0 22px rgba(179, 115, 33, 0.08);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .field-note {
    color: #aaa394;
    line-height: 1.55;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .password-toggle {
    right: 8px;
    min-width: 46px;
    min-height: 40px;
    border-left: 1px solid rgba(202, 149, 58, 0.22);
    border-radius: 0;
    color: #e5b65f;
    font-family: var(--serif);
    text-transform: uppercase;
}

/* Authentication and recovery */

.auth-page::before {
    background:
        linear-gradient(180deg, rgba(7, 7, 6, 0.42), #080807 920px),
        linear-gradient(90deg, rgba(5, 5, 5, 0.93), rgba(44, 12, 12, 0.46) 52%, rgba(5, 5, 5, 0.88)),
        url("../media/home-hero-imperivm.webp") center 28% / cover fixed no-repeat,
        #080807 !important;
}

.site-body.auth-page .auth-shell {
    width: min(1180px, calc(100% - 56px));
    min-height: 720px;
    padding: 78px 0 112px;
    grid-template-columns: minmax(390px, 1.04fr) minmax(460px, 0.96fr);
}

.site-body.auth-page .auth-story,
.site-body.auth-page .auth-panel {
    border-radius: 2px;
}

.site-body.auth-page .auth-story {
    padding: clamp(38px, 5vw, 66px);
    border-color: rgba(201, 146, 56, 0.44);
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0.02) 16%, rgba(6, 6, 6, 0.36) 52%, rgba(7, 7, 7, 0.98) 92%),
        radial-gradient(circle at 68% 26%, rgba(151, 28, 29, 0.16), transparent 48%),
        url("../media/register-sura-imperivm.webp") center 8% / cover no-repeat,
        #090a09;
    box-shadow: -18px 26px 64px rgba(0, 0, 0, 0.4);
}

.site-body.auth-page .auth-story::before {
    inset: 9px;
    border-color: rgba(218, 166, 72, 0.25);
    border-radius: 1px;
}

.site-body.auth-page .auth-story::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 72px;
    height: 72px;
    border-top: 2px solid rgba(229, 180, 84, 0.72);
    border-right: 2px solid rgba(229, 180, 84, 0.72);
    content: "";
}

.site-body.auth-page .auth-story h1 {
    max-width: 560px;
    margin-bottom: 16px;
    color: #f2e2bd;
    font-size: clamp(2.8rem, 5vw, 5.2rem);
    font-weight: 500;
    line-height: 0.94;
    text-transform: uppercase;
}

.site-body.auth-page .auth-story p:not(.eyebrow) {
    color: #d0c6b3;
    font-family: var(--serif);
    line-height: 1.7;
}

.site-body.auth-page .auth-panel {
    position: relative;
    padding: clamp(34px, 4.5vw, 58px);
    border-color: rgba(201, 146, 56, 0.44);
    background:
        linear-gradient(145deg, rgba(112, 67, 22, 0.08), transparent 32%),
        #0d0f0e;
    box-shadow: 22px 26px 64px rgba(0, 0, 0, 0.44);
}

.site-body.auth-page .auth-panel::before {
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(218, 166, 72, 0.15);
    pointer-events: none;
    content: "";
}

.site-body.auth-page .auth-panel > * {
    position: relative;
}

.site-body.auth-page .auth-panel h2 {
    color: #f0dfbb;
    font-size: clamp(2rem, 3.4vw, 3.25rem);
    font-weight: 500;
}

.site-body.auth-page .auth-links {
    border-top-color: rgba(204, 151, 60, 0.25);
}

/* Rankings and data-heavy areas */

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .tabs {
    margin-bottom: 28px;
    padding: 7px;
    border-color: rgba(199, 145, 54, 0.4);
    border-radius: 2px;
    background:
        linear-gradient(180deg, rgba(20, 20, 17, 0.98), rgba(9, 10, 9, 0.98));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.27);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .tab-button {
    position: relative;
    min-height: 46px;
    border-radius: 1px;
    color: #bcb3a2;
    font-family: var(--serif);
    font-size: 0.76rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .tab-button:hover,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .tab-button.is-active {
    background:
        linear-gradient(180deg, rgba(198, 143, 50, 0.16), rgba(96, 58, 18, 0.12));
    box-shadow: inset 0 -1px #d9a64b;
    color: #efd08d;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .table-wrap {
    border-color: rgba(199, 145, 54, 0.36);
    border-radius: 1px;
    background: rgba(6, 7, 6, 0.58);
    scrollbar-color: #8e6126 #11120f;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .data-table {
    color: #d8d0c0;
    font-size: 0.9rem;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .data-table th {
    height: 48px;
    padding: 13px 16px;
    border-bottom-color: rgba(223, 173, 78, 0.55);
    background:
        linear-gradient(180deg, rgba(87, 62, 26, 0.42), rgba(35, 28, 18, 0.46)),
        #161713;
    color: #efcc83;
    font-family: var(--serif);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .data-table td {
    min-height: 52px;
    padding: 15px 16px;
    border-bottom-color: rgba(205, 152, 60, 0.14);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .data-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.012);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .data-table tbody tr:hover {
    background: rgba(201, 145, 54, 0.075);
}

.ranking-page .data-table tbody tr:nth-child(1) {
    background: linear-gradient(90deg, rgba(197, 145, 51, 0.16), transparent 68%);
}

.ranking-page .data-table tbody tr:nth-child(2) {
    background: linear-gradient(90deg, rgba(177, 183, 181, 0.09), transparent 62%);
}

.ranking-page .data-table tbody tr:nth-child(3) {
    background: linear-gradient(90deg, rgba(151, 88, 42, 0.12), transparent 58%);
}

.ranking-page .data-table tbody tr:nth-child(-n + 3) .rank {
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 0 14px rgba(223, 169, 71, 0.28);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .empire-mark,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .badge,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .news-type,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .preset-pill,
.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .coming-badge {
    min-height: 28px;
    border-radius: 1px;
    font-family: var(--serif);
    letter-spacing: 0.09em;
}

/* Wiki, news, download and account components */

.site-body.wiki-page .wiki-shell {
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 26px;
}

.site-body.wiki-page .wiki-sidebar {
    top: 112px;
    padding: 28px;
}

.site-body.wiki-page .wiki-sidebar h2 {
    margin-top: 26px;
    color: #e4c887;
    font-family: var(--serif);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
}

.site-body.wiki-page .category-list a,
.site-body.account-page .account-nav a {
    min-height: 46px;
    padding: 0 14px;
    border-left: 2px solid transparent;
    border-radius: 1px;
    color: #bdb4a4;
    font-family: var(--serif);
}

.site-body.wiki-page .category-list a:hover,
.site-body.wiki-page .category-list a.is-active,
.site-body.account-page .account-nav a:hover,
.site-body.account-page .account-nav a.is-active {
    border-left-color: #d4a14b;
    background: linear-gradient(90deg, rgba(205, 151, 58, 0.14), transparent);
    color: #efcf8d;
}

.site-body.wiki-page .wiki-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.site-body.wiki-page .wiki-card {
    position: relative;
    min-height: 154px;
    padding: 26px;
    overflow: hidden;
}

.site-body.wiki-page .wiki-card::after {
    position: absolute;
    right: -42px;
    bottom: -42px;
    width: 104px;
    height: 104px;
    border: 1px solid rgba(211, 159, 67, 0.2);
    transform: rotate(45deg);
    content: "";
}

.site-body.wiki-page .wiki-card:hover {
    border-color: rgba(229, 178, 82, 0.78);
    background:
        linear-gradient(145deg, rgba(139, 82, 25, 0.15), transparent 40%),
        #141512;
    transform: translateY(-3px);
}

.site-body.wiki-page .wiki-article {
    font-family: var(--serif);
    font-size: 1.02rem;
    line-height: 1.78;
}

.site-body.wiki-page .wiki-article > h1 {
    margin: 18px 0 12px;
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    text-transform: uppercase;
}

.site-body.news-page .content-shell.narrow {
    width: min(980px, calc(100% - 56px));
}

.site-body.news-page .panel > h1 {
    margin: 22px 0 14px;
    font-size: clamp(2.5rem, 5vw, 4.7rem);
    line-height: 0.98;
}

.site-body.news-page .panel > p {
    font-family: var(--serif);
    font-size: 1.02rem;
    line-height: 1.8;
}

.site-body.news-page .news-list-item {
    padding: 20px 22px;
}

.site-body.download-page .download-grid {
    grid-template-columns: minmax(340px, 0.78fr) minmax(0, 1.22fr);
    gap: 24px;
}

.site-body.download-page .download-main {
    background:
        linear-gradient(180deg, rgba(13, 14, 12, 0.36), rgba(9, 9, 8, 0.94)),
        radial-gradient(circle at 80% 22%, rgba(141, 34, 32, 0.18), transparent 34%),
        url("../media/class-warrior-metin2.webp") 96% 12% / auto 82% no-repeat,
        #11120f;
}

.site-body.download-page .download-main > * {
    position: relative;
    max-width: 78%;
}

.site-body.download-page .download-size {
    border-radius: 1px;
    background: rgba(9, 9, 8, 0.74);
}

.site-body.download-page .requirement-cards {
    gap: 16px;
}

.site-body.download-page .requirement-card {
    padding: 22px;
}

.site-body.download-page .requirement-card.is-recommended {
    border-color: rgba(229, 178, 82, 0.68);
    background:
        linear-gradient(145deg, rgba(151, 92, 31, 0.14), transparent 42%),
        #10110f;
}

.site-body.download-page .spec-list div {
    border-bottom-color: rgba(205, 152, 60, 0.16);
}

.site-body.download-page .mobile-platform-card {
    min-height: 132px;
}

.site-body.download-page .platform-mark {
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(208, 156, 65, 0.18), transparent 64%),
        #0b0c0b;
}

.site-body.account-page .account-layout {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 26px;
}

.site-body.account-page .account-nav {
    top: 112px;
    padding: 18px;
}

.site-body.account-page .summary-card {
    position: relative;
    min-height: 112px;
    padding: 22px;
    overflow: hidden;
}

.site-body.account-page .summary-card::after {
    position: absolute;
    right: -24px;
    bottom: -24px;
    width: 70px;
    height: 70px;
    border: 1px solid rgba(208, 156, 65, 0.15);
    transform: rotate(45deg);
    content: "";
}

.site-body.account-page .summary-card strong {
    color: #f0d89e;
    font-size: 1.9rem;
}

.site-body.account-page .security-status,
.site-body.account-page .referral-state {
    border-radius: 1px;
    background: #0b0c0b;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .empty-state {
    border: 1px solid rgba(203, 151, 60, 0.32);
    border-radius: 1px;
    background:
        repeating-linear-gradient(135deg, transparent 0 12px, rgba(210, 158, 67, 0.022) 13px 14px),
        rgba(7, 8, 7, 0.54);
}

/* Alerts, cookie notice and footer */

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .alert {
    border-radius: 1px;
    border-color: rgba(200, 147, 57, 0.48);
    background:
        linear-gradient(145deg, rgba(103, 60, 19, 0.1), transparent 42%),
        #10120f;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .cookie-banner {
    border-radius: 2px;
    border-color: rgba(218, 167, 75, 0.65);
    background:
        linear-gradient(145deg, rgba(113, 68, 23, 0.12), transparent 40%),
        #0d0f0e;
    box-shadow:
        0 0 0 5px rgba(7, 7, 6, 0.88),
        0 0 0 6px rgba(180, 124, 38, 0.34),
        0 24px 60px rgba(0, 0, 0, 0.48);
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .site-footer {
    position: relative;
    border-top-color: rgba(199, 145, 54, 0.46);
    background:
        radial-gradient(circle at 12% 20%, rgba(114, 31, 29, 0.08), transparent 28%),
        repeating-linear-gradient(135deg, transparent 0 18px, rgba(207, 157, 67, 0.018) 19px 20px),
        #070807;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .site-footer::before {
    position: absolute;
    top: -3px;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 4%, rgba(126, 79, 22, 0.5) 15%, #c8943d 50%, rgba(126, 79, 22, 0.5) 85%, transparent 96%);
    content: "";
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-grid {
    width: min(1320px, calc(100% - 56px));
    padding-top: 72px;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-brand img {
    width: 206px;
    height: 78px;
    border-radius: 0;
    object-fit: contain;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-grid h2 {
    position: relative;
    padding-bottom: 12px;
    color: #e8bf6d;
    font-family: var(--serif);
    letter-spacing: 0.18em;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-grid h2::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 54px;
    height: 1px;
    background: linear-gradient(90deg, #c9923c, transparent);
    content: "";
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-grid a:hover {
    padding-left: 4px;
}

.site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-bottom {
    width: min(1320px, calc(100% - 56px));
    border-top-color: rgba(202, 149, 58, 0.16);
}

/* Global navigation breakpoint: long translated labels stay inside the viewport. */

@media (max-width: 1320px) {
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .nav-toggle {
        display: block;
        border-radius: 1px;
        border-color: rgba(203, 151, 60, 0.44);
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu {
        position: absolute;
        top: 84px;
        right: 0;
        left: 0;
        display: none;
        max-height: calc(100dvh - 84px);
        padding: 18px 28px 26px;
        border-bottom: 1px solid rgba(193, 140, 52, 0.36);
        align-items: stretch;
        flex-direction: column;
        overflow-y: auto;
        background:
            linear-gradient(145deg, rgba(78, 48, 19, 0.08), transparent 36%),
            rgba(10, 11, 10, 0.992);
        box-shadow: 0 24px 42px rgba(0, 0, 0, 0.42);
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu.is-open {
        display: flex;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu a,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu button,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .nav-logout {
        width: 100%;
        min-height: 48px;
        justify-content: flex-start;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .nav-divider {
        width: 100%;
        height: 1px;
        margin: 8px 0;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .language-switcher summary {
        width: 100%;
        justify-content: flex-start;
        padding-inline: 12px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .language-menu {
        position: static;
        width: 100%;
        margin-top: 7px;
        box-shadow: none;
    }
}

@media (max-width: 940px) {
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .content-shell,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .content-shell.wide,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .content-shell.narrow {
        width: min(100% - 36px, 860px);
        padding-top: 60px;
        padding-bottom: 82px;
    }

    .site-body.auth-page .auth-shell {
        width: min(100% - 36px, 760px);
        padding-top: 56px;
        padding-bottom: 82px;
        grid-template-columns: 1fr;
    }

    .site-body.auth-page .auth-story {
        min-height: 430px;
        border-right: 1px solid rgba(201, 146, 56, 0.44);
        border-bottom: 0;
        background-position: center 10%;
    }

    .site-body.auth-page .auth-panel {
        border-radius: 2px;
    }

    .site-body.wiki-page .wiki-shell,
    .site-body.account-page .account-layout,
    .site-body.download-page .download-grid {
        grid-template-columns: 1fr;
    }

    .site-body.wiki-page .wiki-sidebar,
    .site-body.account-page .account-nav {
        position: static;
    }

    .site-body.account-page .account-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-body.download-page .download-main {
        min-height: 480px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-grid {
        grid-template-columns: 1.5fr repeat(3, 1fr);
        gap: 28px;
    }
}

@media (max-width: 720px) {
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .site-header {
        height: 72px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .nav-shell {
        width: calc(100% - 28px);
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .brand {
        width: 154px;
        height: 54px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .main-menu {
        top: 72px;
        max-height: calc(100dvh - 72px);
        padding: 14px 18px 24px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .content-shell,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .content-shell.wide,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .content-shell.narrow {
        width: calc(100% - 28px);
        padding-top: 46px;
        padding-bottom: 66px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .page-heading {
        margin-bottom: 32px;
        padding-left: 20px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .page-heading::after {
        left: 20px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .page-heading h1 {
        font-size: clamp(2.45rem, 12vw, 4.2rem);
        line-height: 0.96;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .page-lead {
        font-size: 0.98rem;
        line-height: 1.62;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel {
        padding: 28px 20px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel::before {
        inset: 6px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel::after {
        width: 38px;
        height: 38px;
    }

    .site-body.auth-page .auth-shell {
        width: calc(100% - 28px);
        padding-top: 40px;
        padding-bottom: 66px;
    }

    .site-body.auth-page .auth-story {
        min-height: 340px;
        padding: 28px 24px;
        background-position: center 9%;
    }

    .site-body.auth-page .auth-story h1 {
        font-size: clamp(2.35rem, 11vw, 3.7rem);
    }

    .site-body.auth-page .auth-panel {
        padding: 32px 22px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-grid,
    .site-body.download-page .requirement-cards,
    .site-body.download-page .mobile-platform-grid,
    .site-body.wiki-page .wiki-grid,
    .site-body.account-page .account-summary,
    .site-body.account-page .referral-copy-grid,
    .site-body.account-page .referral-stats {
        grid-template-columns: 1fr;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-field.full {
        grid-column: auto;
    }

    .site-body.account-page .account-nav {
        grid-template-columns: 1fr;
    }

    .site-body.download-page .download-main {
        min-height: 0;
        background:
            linear-gradient(180deg, rgba(11, 12, 10, 0.84), rgba(9, 9, 8, 0.97)),
            url("../media/class-warrior-metin2.webp") 112% 18% / auto 68% no-repeat,
            #11120f;
    }

    .site-body.download-page .download-main > * {
        max-width: 100%;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .data-table {
        min-width: 680px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .table-wrap {
        margin-right: -6px;
        margin-left: -6px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .table-wrap::after {
        position: sticky;
        right: 8px;
        display: block;
        width: max-content;
        margin: 8px 8px 8px auto;
        padding: 4px 7px;
        border: 1px solid rgba(199, 145, 54, 0.24);
        background: rgba(8, 9, 8, 0.86);
        color: #bda36f;
        content: "↔";
        font-size: 0.72rem;
        pointer-events: none;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-grid,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-bottom {
        width: calc(100% - 28px);
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-grid {
        padding: 54px 0 38px;
        grid-template-columns: 1fr 1fr;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 500px) {
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .panel,
    .site-body.auth-page .auth-panel {
        padding: 26px 18px;
    }

    .site-body.auth-page .auth-story {
        min-height: 300px;
        padding: 24px 20px;
    }

    .site-body.auth-page .auth-story p:not(.eyebrow) {
        font-size: 0.9rem;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .button,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) button.button {
        width: 100%;
        min-height: 50px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .button-row,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .form-actions,
    .site-body.account-page .referral-copy-row,
    .site-body.account-page .security-status {
        align-items: stretch;
        flex-direction: column;
    }

    .site-body.download-page .mobile-platform-card {
        padding: 16px;
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 12px;
    }

    .site-body.download-page .coming-badge {
        grid-column: 2;
        justify-self: start;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .cookie-banner {
        right: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
        padding: 18px;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-grid {
        grid-template-columns: 1fr;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-brand,
    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-grid > div {
        grid-column: 1;
    }

    .site-body:not(.home-cinematic):not(.presentation-page):not(.admin-page) .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Keep Wiki V3's archive rhythm above the generic inner-page spacing rules. */
.site-body.wiki-v3-page .wiki-v3-hero .wiki-v3-hero-inner {
    padding-top: 92px;
    padding-bottom: 56px;
}

.site-body.wiki-v3-page .wiki-v3-shell {
    padding-top: 38px;
    padding-bottom: 92px;
}

@media (max-width: 680px) {
    .site-body.wiki-v3-page .wiki-v3-hero .wiki-v3-hero-inner {
        padding-top: 76px;
        padding-bottom: 42px;
    }
    .wiki-chest-content-grid { grid-template-columns: 1fr; }
}

/* IMPERIVM Wiki V5: an archive reader, not a narrow tooltip. */
.wiki-v4-page .wiki-v3-shell { max-width: 1460px; }
.wiki-v4-page .wiki-v3-reader { grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.wiki-v4-page .wiki-v3-reader-index { border: 1px solid rgba(171, 126, 57, .28); background: #0e0c09; box-shadow: inset 0 0 38px rgba(139, 81, 25, .08); }
.wiki-v4-page .wiki-v3-reader-index dt { font-size: .7rem; color: #887c68; }
.wiki-v4-page .wiki-v3-reader-index dd { color: #e0cfaa; font-size: 1rem; }
.wiki-v4-page .wiki-v3-article,.community-reading-article { min-height: 760px; padding: clamp(38px, 5.6vw, 82px); border: 1px solid rgba(184, 137, 63, .42); background: radial-gradient(circle at 75% 4%, rgba(143, 83, 24, .12), transparent 27%),#100e0b; box-shadow: 0 34px 80px rgba(0, 0, 0, .48), inset 0 0 72px rgba(104, 57, 15, .08); color: #d6cbb8; }
.wiki-v4-page .wiki-v3-article>header,.community-reading-article>header { max-width: 940px; margin-inline: auto; }
.wiki-v4-page .wiki-v3-article>header>p,.community-reading-article>header>p { color: #b88a3c; font-size: .76rem; }
.wiki-v4-page .wiki-v3-article>header h1,.community-reading-article>header h1 { margin: 13px 0 24px; color: #f0e2c5; font: 700 clamp(2.65rem, 5vw, 5rem)/1.02 var(--serif); letter-spacing: -.035em; }
.wiki-v4-page .wiki-v3-rule::before,.wiki-v4-page .wiki-v3-rule::after,.community-reading-article .wiki-v3-rule::before,.community-reading-article .wiki-v3-rule::after { background: #5d4425; }
.wiki-v4-page .wiki-v3-blocks,.community-reading-article .wiki-v3-blocks { max-width: 900px; margin-top: 42px; }
.wiki-v4-page .wiki-v3-heading,.community-reading-article .wiki-v3-heading { color: #dfc485; font-size: 1.72rem; }
.wiki-v4-page .wiki-v3-paragraph,.community-reading-article .wiki-v3-paragraph { color: #d4c9b5; font: 1.18rem/1.86 var(--serif); }
.wiki-v4-page .wiki-v3-callout,.community-reading-article .wiki-v3-callout { border-color: #564223; background: #18130d; }
.wiki-v4-page .wiki-v3-callout strong,.community-reading-article .wiki-v3-callout strong { color: #e5c98e; }
.wiki-v4-page .wiki-v3-callout p,.community-reading-article .wiki-v3-callout p { color: #c7bba7; }
.wiki-v4-page .wiki-v3-steps h2,.wiki-v4-page .wiki-v3-facts h2,.community-reading-article .wiki-v3-steps h2,.community-reading-article .wiki-v3-facts h2 { color: #dfc485; }
.wiki-v4-page .wiki-v3-steps li,.community-reading-article .wiki-v3-steps li { border-color: rgba(157, 117, 56, .22); color: #d4c9b5; }
.wiki-v4-page .wiki-v3-steps li::before,.community-reading-article .wiki-v3-steps li::before { border-color: #745329; color: #d6b56f; }
.wiki-v4-page .wiki-v3-facts dl,.community-reading-article .wiki-v3-facts dl { border-color: #4a361d; background: #4a361d; }
.wiki-v4-page .wiki-v3-facts dl div,.community-reading-article .wiki-v3-facts dl div { background: #17120d; }
.wiki-v4-page .wiki-v3-facts dt,.community-reading-article .wiki-v3-facts dt { color: #8d7b60; }
.wiki-v4-page .wiki-v3-facts dd,.community-reading-article .wiki-v3-facts dd { color: #e5d4b3; }

.wiki-v3-entity { position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 20px; align-items: center; min-height: 128px; margin: 24px 0; padding: 16px 18px; overflow: hidden; border: 1px solid #57401f; background: #0b0907; color: #d9ccb4; box-shadow: inset 0 0 34px rgba(116, 68, 20, .08); }
.wiki-v3-entity::after { position: absolute; inset: 5px; border: 1px solid rgba(153, 106, 42, .12); pointer-events: none; content: ""; }
.wiki-v3-entity-visual { position: relative; z-index: 1; display: grid; width: 96px; height: 96px; place-items: center; border-right: 1px solid #3d2c18; }
.wiki-v3-entity-icon { display: block; width: 64px; height: 64px; background-repeat: no-repeat; background-size: 2048px 2048px; image-rendering: auto; }
.wiki-v3-entity-render { display: block; width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 9px 7px rgba(0, 0, 0, .7)); }
.wiki-v3-entity-fallback { display: grid; width: 62px; height: 62px; place-items: center; border: 1px solid #745323; border-radius: 50%; color: #d6af60; font: 700 1.7rem/1 var(--serif); }
.wiki-v3-entity-copy { position: relative; z-index: 1; }
.wiki-v3-entity-kind { display: inline-block; padding: 0; background: none; color: #a77c39; font-size: .69rem; letter-spacing: .14em; }
.wiki-v3-entity h3 { margin: 5px 0 8px; color: #f0dfbd; font: 700 1.42rem/1.12 var(--serif); }
.wiki-v3-entity p { margin: 0 0 10px; color: #aaa08f; font-size: .92rem; line-height: 1.55; }
.wiki-v3-entity dl { display: flex; flex-wrap: wrap; gap: 5px 20px; margin: 0; }
.wiki-v3-entity dl div { display: flex; gap: 7px; font-size: .76rem; }
.wiki-v3-entity dt { color: #786f62; }
.wiki-v3-entity dd { margin: 0; color: #d8bd82; }
.wiki-v3-entity code { position: relative; z-index: 1; align-self: start; color: #755f3c; font-size: .68rem; }
@media (max-width: 920px) { .wiki-v4-page .wiki-v3-reader { grid-template-columns: 1fr; } .wiki-v4-page .wiki-v3-article,.community-reading-article { padding: 34px 24px; } }
@media (max-width: 620px) { .wiki-v3-entity { grid-template-columns: 82px minmax(0, 1fr); padding: 13px; } .wiki-v3-entity-visual { width: 76px; height: 82px; } .wiki-v3-entity code { display: none; } }
