/* DARK2 CHRONICLE — THE CHRONICLE
   Standalone production theme. No legacy portal stylesheet is required. */
:root {
    --ink: #0d0b08;
    --ink-soft: #12100c;
    --panel: #17130e;
    --panel-soft: #1d1811;
    --gold: #c9a564;
    --gold-bright: #e4c986;
    --paper: #eee5d6;
    --muted: #afa493;
    --line: rgba(215, 186, 127, .23);
    --line-strong: rgba(215, 186, 127, .48);
    --danger: #d36d62;
    --good: #76c78a;
    --serif: Georgia, "Times New Roman", serif;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
    background: var(--ink);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--paper);
    background:
        radial-gradient(circle at 50% -10rem, rgba(133, 99, 47, .12), transparent 42rem),
        var(--ink);
    font: 400 16px/1.65 var(--sans);
}

body::before,
body::after {
    display: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

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

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

/* Header — same composition as design 3 */
.chronicle-header {
    position: relative;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    min-height: 106px;
    align-items: center;
    padding: 0 clamp(20px, 6vw, 100px);
    border-bottom: 1px solid var(--line);
    background: rgba(13, 11, 8, .98);
}

.chronicle-brand {
    display: inline-flex;
    width: max-content;
    align-items: center;
}

.chronicle-brand img {
    width: clamp(108px, 10vw, 136px);
    height: auto;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45));
}

.chronicle-nav {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(18px, 2.3vw, 34px);
}

.chronicle-nav > a:not(.chronicle-account) {
    position: relative;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: #b8ae9c;
    font: 600 11px/1 var(--serif);
    letter-spacing: .11em;
    text-transform: uppercase;
    white-space: nowrap;
}

.chronicle-nav > a:not(.chronicle-account)::after {
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    height: 1px;
    content: "";
    background: var(--gold);
    transform: scaleX(0);
    transition: transform .2s ease;
}

.chronicle-nav > a:hover,
.chronicle-nav > a.active {
    color: #fff3d9;
}

.chronicle-nav > a:hover::after,
.chronicle-nav > a.active::after {
    transform: scaleX(1);
}

.chronicle-account {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--gold);
    color: var(--gold-bright);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.language-toggle {
    display: inline-flex;
    min-width: 66px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 9px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.language-toggle i {
    position: relative;
    display: inline-block;
    width: 21px;
    height: 11px;
    border: 1px solid var(--line-strong);
    border-radius: 99px;
}

.language-toggle i::after {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    content: "";
    background: var(--gold-bright);
    transition: transform .2s ease;
}

body[data-language="en"] .language-toggle i::after {
    transform: translateX(10px);
}

.language-toggle b {
    font-weight: inherit;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    color: var(--gold-bright);
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 17px;
    height: 1px;
    background: currentColor;
}

.chronicle-site-main {
    width: 100%;
    min-height: 64vh;
}

/* Buttons and shared actions */
.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .13em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    transition: transform .2s ease, color .2s ease, background .2s ease, border-color .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button.primary {
    border-color: var(--gold);
    color: #17120a;
    background: var(--gold);
}

.button.primary:hover {
    border-color: var(--gold-bright);
    background: var(--gold-bright);
}

.button.ghost,
.button.discord {
    border-color: var(--line-strong);
    color: #e8dcc5;
    background: rgba(10, 8, 5, .25);
}

.button.discord:hover,
.button.ghost:hover {
    border-color: var(--gold-bright);
    color: #fff3d9;
}

.button.full {
    width: 100%;
}

.hero-actions,
.c3-actions,
.presentation-cta-actions,
.install-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.eyebrow,
.kicker,
.section-heading small,
.portal-card-head small {
    margin: 0;
    color: var(--gold-bright);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.text-link {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    margin-top: 24px;
    color: var(--gold-bright);
    border-bottom: 1px solid var(--line-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Home — exact Chronicle composition */
.site-shell {
    min-height: 100vh;
    overflow: clip;
}

.c3 {
    color: var(--paper);
    background: var(--ink-soft);
}

.c3-hero {
    position: relative;
    display: grid;
    min-height: 720px;
    place-items: center;
    overflow: hidden;
    padding: 100px 6vw;
    text-align: center;
}

.c3-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: .56;
    background:
        linear-gradient(rgba(13, 11, 7, .7), var(--ink) 96%),
        url("/assets/media-dungeons.webp") center / cover no-repeat;
    filter: sepia(.34);
}

.c3-hero::after {
    position: absolute;
    content: "D";
    color: rgba(210, 176, 103, .075);
    font: 600 min(62vw, 780px)/1 var(--serif);
    pointer-events: none;
}

.c3-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    width: min(950px, 100%);
    flex-direction: column;
    align-items: center;
}

.c3-hero .site-logo {
    width: clamp(118px, 11vw, 156px);
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .55));
}

.c3-ornament {
    margin-top: 12px;
    color: var(--gold);
    font-size: 28px;
}

.c3-hero h1 {
    max-width: 950px;
    margin: 22px 0;
    color: #f3eadb;
    font: 400 clamp(58px, 8vw, 116px)/.92 var(--serif);
    letter-spacing: -.045em;
    text-wrap: balance;
}

.c3-hero p {
    max-width: 650px;
    margin: 0 auto;
    color: #c2b8a5;
    font: 400 18px/1.75 var(--serif);
    text-wrap: balance;
}

.c3-actions {
    justify-content: center;
    margin-top: 36px;
}

.c3-section {
    padding: clamp(76px, 9vw, 140px) clamp(20px, 7vw, 120px);
}

.c3-story {
    display: grid;
    max-width: 1260px;
    grid-template-columns: .72fr 1.28fr;
    gap: clamp(40px, 8vw, 130px);
    margin: 0 auto;
}

.c3-index {
    min-width: 0;
    padding-right: clamp(24px, 4vw, 60px);
    border-right: 1px solid var(--line);
}

.c3-index > span {
    display: block;
    margin-bottom: 15px;
    color: #8c806b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.c3-index > strong {
    display: block;
    color: #eee4d3;
    font: 400 clamp(34px, 4vw, 54px)/1.08 var(--serif);
}

.c3-story-copy {
    min-width: 0;
}

.c3-story-copy > p {
    margin: 0;
    color: #bcb2a1;
    font: 400 17px/1.9 var(--serif);
}

.c3-chapters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 50px;
    border: 1px solid var(--line);
}

.c3-chapter {
    min-width: 0;
    padding: 28px;
    border-right: 1px solid var(--line);
}

.c3-chapter:last-child {
    border-right: 0;
}

.c3-chapter b {
    display: block;
    color: var(--gold-bright);
    font: 400 24px/1.1 var(--serif);
}

.c3-chapter span {
    display: block;
    margin-top: 24px;
    color: #aaa08f;
    font-size: 13px;
    line-height: 1.6;
}

.c3-footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 46px clamp(20px, 6vw, 100px);
    border-top: 1px solid var(--line);
    background: #0d0b08;
}

.c3-footer-cta > strong {
    max-width: 760px;
    font: 400 clamp(27px, 4vw, 46px)/1.08 var(--serif);
}

.c3-footer-cta .c3-actions {
    flex: 0 0 auto;
    margin: 0;
}

/* Shared inner-page frame */
.page-hero,
.simple-page,
.form-layout,
.auth-page,
.account-hero,
.account-message,
.account-stats,
.account-grid,
.account-section,
.account-settings,
.account-security-grid,
.ranking-live,
.download-layout,
.requirements,
.status-board,
.shop-grid,
.news-page-grid,
.patchnote-timeline,
.notice,
.wiki-shell,
.journey-road,
.install-banner,
.events-page,
.content-detail,
.recovery-codes,
.admin-hero,
.admin-grid {
    width: min(1260px, calc(100% - 44px));
    margin-right: auto;
    margin-left: auto;
}

.page-hero,
.simple-page,
.form-layout,
.auth-page,
.account-hero,
.admin-hero {
    margin-top: clamp(40px, 6vw, 84px);
}

.page-hero,
.simple-page,
.account-hero,
.auth-page-copy,
.form-intro,
.admin-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(42px, 7vw, 88px);
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 90% 0, rgba(201, 165, 100, .12), transparent 42%),
        var(--panel);
}

.page-hero h1,
.simple-page h1,
.account-hero h1,
.auth-page-copy h1,
.form-intro h1,
.admin-hero h1 {
    max-width: 950px;
    margin: 14px 0 18px;
    color: #f0e6d5;
    font: 400 clamp(44px, 6vw, 78px)/.98 var(--serif);
    letter-spacing: -.04em;
    text-wrap: balance;
}

.page-hero > p:last-child,
.simple-page > p:not(.eyebrow):not(.updated),
.account-hero p,
.auth-page-copy > p:not(.eyebrow),
.form-intro > p:not(.eyebrow),
.admin-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.simple-page .hero-actions,
.page-hero .hero-actions {
    margin-top: 30px;
}

/* New presentation — no legacy long-image page */
.presentation-page {
    width: 100%;
    margin: 0;
}

.presentation-hero {
    position: relative;
    display: flex;
    min-height: 680px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(80px, 10vw, 140px) 24px;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: center;
    background:
        linear-gradient(180deg, rgba(10, 8, 5, .48), rgba(10, 8, 5, .93)),
        url("/assets/media-citadel.webp") center / cover no-repeat;
}

.presentation-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background: radial-gradient(circle at 50% 42%, transparent 0 18%, rgba(5, 4, 3, .5) 100%);
    pointer-events: none;
}

.presentation-hero > * {
    position: relative;
    z-index: 1;
}

.presentation-hero > img {
    width: clamp(130px, 14vw, 200px);
    height: auto;
    margin-bottom: 18px;
}

.presentation-hero h1 {
    max-width: 1000px;
    margin: 14px 0 22px;
    color: #f4ead9;
    font: 400 clamp(56px, 8vw, 112px)/.92 var(--serif);
    letter-spacing: -.05em;
}

.presentation-hero > p:not(.eyebrow) {
    max-width: 720px;
    margin: 0;
    color: #c2b8a5;
    font: 400 18px/1.8 var(--serif);
}

.presentation-hero .hero-actions {
    justify-content: center;
    margin-top: 34px;
}

.presentation-facts {
    display: grid;
    width: min(1260px, calc(100% - 44px));
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: -38px auto 0;
    border: 1px solid var(--line);
    background: var(--panel);
    position: relative;
    z-index: 2;
}

.presentation-facts article {
    min-width: 0;
    padding: 28px;
    border-right: 1px solid var(--line);
    text-align: center;
}

.presentation-facts article:last-child {
    border-right: 0;
}

.presentation-facts small {
    display: block;
    color: #8f8370;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
}

.presentation-facts strong {
    display: block;
    margin-top: 8px;
    color: var(--gold-bright);
    font: 400 25px/1.2 var(--serif);
}

.presentation-story {
    display: grid;
    width: min(1260px, calc(100% - 44px));
    gap: clamp(70px, 9vw, 130px);
    margin: 0 auto;
    padding: clamp(90px, 11vw, 160px) 0;
}

.presentation-feature {
    display: grid;
    min-width: 0;
    grid-template-columns: 1.12fr .88fr;
    align-items: center;
    gap: clamp(38px, 7vw, 105px);
}

.presentation-feature.reverse {
    grid-template-columns: .88fr 1.12fr;
}

.presentation-feature.reverse > img {
    order: 2;
}

.presentation-feature > img {
    width: 100%;
    min-height: 430px;
    object-fit: cover;
    border: 1px solid var(--line);
    filter: sepia(.12) saturate(.86) contrast(1.05);
}

.presentation-feature > div {
    min-width: 0;
}

.presentation-feature h2,
.presentation-cta h2,
.section-heading h2 {
    margin: 14px 0 22px;
    color: #f0e6d5;
    font: 400 clamp(38px, 5vw, 64px)/1 var(--serif);
    letter-spacing: -.035em;
}

.presentation-feature p:not(.eyebrow),
.presentation-cta p:not(.eyebrow) {
    color: var(--muted);
    font: 400 17px/1.9 var(--serif);
}

.presentation-principles {
    display: grid;
    width: min(1260px, calc(100% - 44px));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 auto clamp(90px, 10vw, 140px);
    border: 1px solid var(--line);
}

.presentation-principles article {
    min-width: 0;
    padding: clamp(30px, 4vw, 52px);
    border-right: 1px solid var(--line);
}

.presentation-principles article:last-child {
    border-right: 0;
}

.presentation-principles strong {
    color: var(--gold-bright);
    font: 400 27px/1.15 var(--serif);
}

.presentation-principles p {
    margin: 26px 0 0;
    color: var(--muted);
}

.presentation-cta {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    padding: clamp(50px, 7vw, 95px) clamp(22px, 7vw, 120px);
    border-top: 1px solid var(--line);
    background: #0b0906;
}

.presentation-cta > div:first-child {
    max-width: 760px;
}

.presentation-cta-actions {
    flex: 0 0 auto;
}

/* Forms and authentication */
.form-layout,
.auth-page {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    align-items: start;
    gap: 1px;
    margin-bottom: clamp(80px, 10vw, 140px);
    background: var(--line);
}

.form-intro,
.auth-page-copy {
    width: 100%;
    min-height: 100%;
    margin: 0;
    border: 0;
    background: var(--panel);
}

.form-card,
.portal-card,
.account-panel,
.settings-card,
.security-card,
.admin-card,
.download-card,
.requirements,
.ranking-live,
.status-main,
.shop-feature,
.notice,
.recovery-codes,
.content-detail {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--panel);
    box-shadow: none;
}

.form-card,
.auth-card {
    min-width: 0;
    padding: clamp(30px, 5vw, 62px);
    border: 0;
}

.portal-card-head {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.portal-card-head h2,
.account-panel > h2,
.settings-card > h2,
.security-card > h2,
.admin-card > h2 {
    margin: 6px 0 0;
    color: #ede3d2;
    font: 400 clamp(26px, 3vw, 38px)/1.1 var(--serif);
}

.portal-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--gold-bright);
}

.form-card form,
.compact-form,
.account-panel form,
.settings-card form,
.security-card form,
.admin-card form {
    display: grid;
    min-width: 0;
    gap: 18px;
}

label {
    min-width: 0;
}

.form-card form > label:not(.check),
.compact-form > label,
.account-panel form > label,
.settings-card form > label,
.security-card form > label,
.admin-card form > label {
    display: grid;
    gap: 8px;
    color: #d4c8b3;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 49px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 0;
    color: #f3eadb;
    background: #0b0907;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(201, 165, 100, .11);
}

label small,
.download-card small,
.form-support {
    color: #8f8677;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
    text-transform: none;
}

.password-wrap {
    position: relative;
    display: block;
    min-width: 0;
}

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

.password-wrap .reveal {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 82px;
    border: 0;
    color: var(--gold-bright);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.check {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 11px;
    align-items: start;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.check input {
    width: 18px;
    min-height: 18px;
    margin: 2px 0 0;
    accent-color: var(--gold);
}

.check a,
.form-row-links a {
    color: var(--gold-bright);
}

.form-row-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

.honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.error-box,
.success-box,
.notice {
    padding: 18px 20px;
    border: 1px solid rgba(211, 109, 98, .45);
    color: #e8c1bb;
    background: rgba(97, 35, 29, .24);
}

.success-box {
    border-color: rgba(118, 199, 138, .4);
    color: #c8ebd0;
    background: rgba(28, 88, 44, .23);
}

.notice {
    margin-top: 28px;
    border-color: var(--line);
    color: var(--muted);
    background: var(--panel);
}

.error-box p,
.success-box p,
.notice p {
    margin-bottom: 0;
}

.error-box ul {
    margin-bottom: 0;
}

.account-welcome > strong {
    color: var(--gold-bright);
    font: 400 34px/1.1 var(--serif);
}

.account-welcome p {
    color: var(--muted);
}

/* Ranking */
.ranking-live {
    margin-top: 26px;
    margin-bottom: clamp(80px, 10vw, 140px);
    padding: clamp(24px, 4vw, 48px);
}

.ranking-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.ranking-tabs button,
.wiki-filters button {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ranking-tabs button.active,
.ranking-tabs button:hover,
.wiki-filters button.active,
.wiki-filters button:hover {
    color: #17120a;
    background: var(--gold);
}

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

.ranking-columns,
.ranking-row {
    display: grid;
    min-width: 0;
    grid-template-columns: 72px minmax(0, 1fr) minmax(110px, auto);
    gap: 18px;
    align-items: center;
}

.ranking-columns {
    grid-template-columns: 72px minmax(0, 1fr) minmax(110px, auto);
    padding: 0 16px 12px;
    color: #837968;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ranking-columns span:first-child {
    grid-column: 1 / 3;
}

.ranking-row {
    min-height: 82px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
}

.rank-number {
    color: var(--gold-bright);
    font: 400 26px/1 var(--serif);
}

.rank-identity,
.rank-score {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.rank-identity strong,
.rank-score strong {
    overflow: hidden;
    color: #eee3cf;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-identity span,
.rank-score span {
    color: #8e8577;
    font-size: 12px;
}

.rank-score {
    text-align: right;
}

.ranking-empty {
    padding: 30px;
    border: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

/* Download */
.download-layout {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 1px;
    margin-top: 26px;
    background: var(--line);
}

.download-card {
    display: grid;
    min-width: 0;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 30px;
    align-items: center;
    padding: clamp(32px, 5vw, 66px);
    border: 0;
}

.download-emblem img {
    width: 110px;
}

.download-card h2 {
    margin: 9px 0 13px;
    color: #f0e6d5;
    font: 400 clamp(30px, 4vw, 48px)/1 var(--serif);
}

.download-card p:not(.kicker) {
    color: var(--muted);
}

.download-button {
    margin: 12px 0;
}

.steps {
    display: grid;
    background: var(--panel-soft);
}

.steps article {
    display: grid;
    min-width: 0;
    grid-template-columns: 46px 1fr;
    gap: 18px;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--line);
}

.steps article:last-child {
    border-bottom: 0;
}

.steps b {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line-strong);
    color: var(--gold-bright);
    font: 400 20px/1 var(--serif);
}

.steps h3 {
    margin: 0;
    color: #e9decb;
    font: 400 20px/1.2 var(--serif);
}

.steps p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.requirements {
    margin-top: 1px;
    margin-bottom: clamp(80px, 10vw, 140px);
    padding: clamp(34px, 5vw, 60px);
}

.requirement-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 30px;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.requirement-grid article {
    min-width: 0;
    padding: 22px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.requirement-grid small {
    display: block;
    color: #887e6d;
    font-size: 10px;
    font-weight: 800;
}

.requirement-grid strong {
    display: block;
    margin-top: 7px;
    color: #dfd4c1;
}

/* Account and character tools */
.account-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.account-hero > div {
    min-width: 0;
}

.account-hero form {
    flex: 0 0 auto;
}

.account-message {
    margin-top: 24px;
}

.account-stats,
.account-grid,
.account-settings,
.account-security-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

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

.account-stats article,
.account-panel,
.settings-card,
.security-card,
.admin-card {
    min-width: 0;
    padding: clamp(24px, 4vw, 42px);
}

.account-stats article {
    border: 1px solid var(--line);
    background: var(--panel);
}

.account-stats small,
.account-panel dt {
    color: #897f6f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.account-stats strong {
    display: block;
    margin-top: 8px;
    color: var(--gold-bright);
    font: 400 24px/1.2 var(--serif);
}

.account-section {
    margin-top: 20px;
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--line);
    background: var(--panel);
}

.account-panel > p,
.settings-card > p,
.security-card > p,
.admin-card > p,
.unstuck-note {
    color: var(--muted);
}

.account-panel dl {
    margin: 24px 0;
}

.account-panel dl div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 18px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
}

.account-panel dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.state-good,
.security-active {
    color: var(--good) !important;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.character-card {
    position: relative;
    display: grid;
    min-width: 0;
    gap: 10px;
    overflow: hidden;
    padding: 26px;
    border: 1px solid var(--line);
    background: #100d09;
}

.character-card.empire-red {
    border-color: rgba(168, 72, 65, .5);
}

.character-card.empire-blue {
    border-color: rgba(75, 105, 157, .55);
}

.character-aura {
    position: absolute;
    top: -80px;
    right: -70px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    opacity: .14;
    background: var(--gold);
    filter: blur(35px);
    pointer-events: none;
}

.character-job {
    color: #8f8370;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.character-card > strong {
    overflow: hidden;
    color: #eee3cf;
    font: 400 26px/1.15 var(--serif);
    text-overflow: ellipsis;
}

.character-card small,
.character-card em {
    color: #948a7b;
    font-size: 12px;
    font-style: normal;
}

.character-level {
    display: grid;
    gap: 8px;
}

.character-level > span {
    display: block;
    width: 100%;
    height: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
}

.character-level > span i {
    display: block;
    width: var(--character-progress);
    height: 100%;
    background: var(--gold);
}

.character-unstuck {
    width: 100%;
    margin-top: 8px;
}

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

.character-row {
    display: grid;
    min-width: 0;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-top: 1px solid var(--line);
}

.character-class {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--gold-bright);
    font: 400 20px/1 var(--serif);
}

.character-row > div {
    display: grid;
    min-width: 0;
}

.character-row span,
.character-row small {
    color: #8f8678;
    font-size: 12px;
}

.character-row > div:last-child {
    text-align: right;
}

.dark2-dialog {
    width: min(480px, calc(100% - 30px));
    padding: 34px;
    border: 1px solid var(--line-strong);
    color: var(--paper);
    background: var(--panel);
}

.dark2-dialog::backdrop {
    background: rgba(4, 3, 2, .82);
    backdrop-filter: blur(6px);
}

.dark2-dialog h2 {
    margin: 10px 0;
    font: 400 34px/1.1 var(--serif);
}

.dark2-dialog > p:not(.eyebrow) {
    color: var(--muted);
}

.dark2-dialog > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

/* Status, shop, wiki and editorial routes */
.status-board {
    margin-top: 24px;
    margin-bottom: clamp(80px, 10vw, 140px);
}

.status-main {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: clamp(25px, 4vw, 45px);
}

.status-main > i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
}

.status-main.online > i {
    background: var(--good);
    box-shadow: 0 0 15px rgba(118, 199, 138, .8);
}

.status-main h2 {
    margin: 3px 0 0;
    font: 400 30px/1.1 var(--serif);
}

.status-main small,
.online-total span {
    color: #8b8171;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.online-total {
    display: grid;
    text-align: right;
}

.online-total strong {
    color: var(--gold-bright);
    font: 400 30px/1 var(--serif);
}

.shop-grid,
.news-page-grid,
.wiki-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
    margin-bottom: clamp(80px, 10vw, 140px);
}

.shop-feature,
.news-card,
.wiki-card,
.admin-card {
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.shop-feature h2,
.news-card h3,
.wiki-card h3 {
    margin: 10px 0;
    color: #e9decb;
    font: 400 27px/1.15 var(--serif);
}

.shop-feature p,
.news-card p,
.wiki-card p {
    color: var(--muted);
}

.wiki-shell {
    margin-top: 24px;
    margin-bottom: clamp(80px, 10vw, 140px);
}

.wiki-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.wiki-toolbar input {
    flex: 1 1 260px;
}

.wiki-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wiki-section {
    padding-top: 72px;
}

.wiki-grid {
    margin-bottom: 0;
}

.wiki-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
}

.wiki-icon {
    color: var(--gold-bright);
    font-size: 25px;
}

.section-heading {
    max-width: 800px;
}

.section-heading > p {
    color: var(--muted);
}

.patchnote-timeline,
.journey-road {
    margin-top: 24px;
    margin-bottom: clamp(80px, 10vw, 140px);
    border: 1px solid var(--line);
    background: var(--panel);
}

.patchnote-timeline article,
.journey-road article,
.event-entry,
.content-list article {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 28px;
    padding: 28px;
    border-bottom: 1px solid var(--line);
}

.patchnote-timeline article:last-child,
.journey-road article:last-child {
    border-bottom: 0;
}

.patchnote-timeline article > span,
.journey-road article > b,
.content-date {
    color: var(--gold-bright);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
}

.patchnote-timeline h2,
.journey-road h2 {
    margin-top: 0;
    font: 400 29px/1.15 var(--serif);
}

.patchnote-timeline p,
.journey-road p,
.content-body {
    color: var(--muted);
}

.install-banner,
.event-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: clamp(80px, 10vw, 140px);
    padding: clamp(32px, 5vw, 60px);
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.install-banner h2,
.event-panel h2 {
    margin: 9px 0;
    font: 400 36px/1.1 var(--serif);
}

.install-banner p,
.event-panel p {
    color: var(--muted);
}

.maintenance-ribbon {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px clamp(20px, 6vw, 100px);
    border-bottom: 1px solid var(--line);
    background: #21170a;
}

.maintenance-ribbon[hidden] {
    display: none;
}

.maintenance-ribbon small,
.maintenance-ribbon time {
    color: var(--gold-bright);
    font-size: 10px;
    letter-spacing: .1em;
}

.maintenance-ribbon p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

/* Footer */
.site-footer {
    display: grid;
    grid-template-columns: .8fr 1.6fr;
    column-gap: clamp(35px, 7vw, 100px);
    row-gap: 24px;
    align-items: start;
    padding: clamp(50px, 7vw, 90px) clamp(22px, 6vw, 100px) 28px;
    border-top: 1px solid var(--line);
    background: #090805;
}

.footer-brand {
    display: flex;
    align-self: start;
    align-items: center;
    gap: 15px;
}

.footer-brand img {
    width: 54px;
    height: 54px;
}

.footer-brand div {
    display: grid;
}

.footer-brand strong {
    color: var(--gold-bright);
    font: 400 25px/1 var(--serif);
}

.footer-brand span {
    margin-top: 6px;
    color: #7f7565;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.footer-links section {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-links h2 {
    margin: 0 0 8px;
    color: var(--gold-bright);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.footer-links a {
    color: #958b7b;
    font-size: 13px;
}

.footer-links a:hover {
    color: #f0e2c9;
}

.footer-verification,
.footer-note {
    grid-column: 1 / -1;
}

.footer-verification {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.footer-verification img {
    width: auto;
    max-height: 54px;
}

.footer-note {
    margin: 0;
    color: #71695d;
    font-size: 12px;
}

.back-to-top {
    position: fixed;
    z-index: 80;
    right: 18px;
    bottom: 18px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    opacity: 0;
    pointer-events: none;
    color: var(--gold-bright);
    background: var(--panel);
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.reveal-on-scroll,
.reveal {
    opacity: 1;
    transform: none;
}

@media (max-width: 1050px) {
    .chronicle-header {
        padding: 0 26px;
    }

    .chronicle-nav {
        gap: 16px;
    }

    .chronicle-nav > a:not(.chronicle-account) {
        font-size: 10px;
    }

    .presentation-feature,
    .presentation-feature.reverse,
    .form-layout,
    .auth-page,
    .download-layout {
        grid-template-columns: 1fr;
    }

    .presentation-feature.reverse > img {
        order: 0;
    }

    .presentation-feature > img {
        min-height: 360px;
    }

    .presentation-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .presentation-cta-actions {
        flex: 0 1 auto;
    }

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

    .character-grid,
    .shop-grid,
    .news-page-grid,
    .wiki-grid,
    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .chronicle-header {
        min-height: 78px;
        grid-template-columns: 1fr auto;
        padding: 0 18px;
    }

    .chronicle-brand img {
        width: 102px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .chronicle-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        width: 100%;
        max-height: calc(100vh - 78px);
        overflow-y: auto;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        padding: 12px 18px 22px;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        background: rgba(13, 11, 8, .995);
    }

    .chronicle-nav.open {
        display: flex;
    }

    .chronicle-nav > a:not(.chronicle-account) {
        width: 100%;
        min-height: 48px;
        border-bottom: 1px solid rgba(215, 186, 127, .12);
    }

    .language-toggle {
        margin: 14px 0;
    }

    .chronicle-account {
        width: 100%;
        min-height: 48px;
        border: 1px solid var(--line-strong);
    }

    .c3-story {
        grid-template-columns: 1fr;
    }

    .c3-index {
        padding: 0 0 30px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .c3-footer-cta,
    .account-hero,
    .install-banner,
    .event-panel {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .presentation-facts article:nth-child(2) {
        border-right: 0;
    }

    .presentation-facts article:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }

    .presentation-principles,
    .requirement-grid,
    .footer-links {
        grid-template-columns: 1fr;
    }

    .presentation-principles article {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .presentation-principles article:last-child {
        border-bottom: 0;
    }

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

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .c3-hero {
        min-height: 680px;
        padding: 78px 20px;
    }

    .c3-hero h1 {
        font-size: clamp(54px, 16vw, 76px);
    }

    .c3-hero p,
    .presentation-hero > p:not(.eyebrow) {
        font-size: 17px;
    }

    .c3-actions,
    .hero-actions,
    .presentation-cta-actions,
    .install-banner-actions {
        width: 100%;
    }

    .c3-actions .button,
    .hero-actions .button,
    .presentation-cta-actions .button,
    .install-banner-actions .button {
        width: 100%;
    }

    .c3-section {
        padding: 76px 20px;
    }

    .c3-chapters {
        grid-template-columns: 1fr;
    }

    .c3-chapter {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .c3-chapter:last-child {
        border-bottom: 0;
    }

    .c3-footer-cta {
        padding: 38px 20px;
    }

    .page-hero,
    .simple-page,
    .form-layout,
    .auth-page,
    .account-hero,
    .account-message,
    .account-stats,
    .account-grid,
    .account-section,
    .account-settings,
    .account-security-grid,
    .ranking-live,
    .download-layout,
    .requirements,
    .status-board,
    .shop-grid,
    .news-page-grid,
    .patchnote-timeline,
    .notice,
    .wiki-shell,
    .journey-road,
    .install-banner,
    .events-page,
    .content-detail,
    .recovery-codes,
    .admin-hero,
    .admin-grid,
    .presentation-facts,
    .presentation-story,
    .presentation-principles {
        width: calc(100% - 24px);
    }

    .page-hero,
    .simple-page,
    .auth-page-copy,
    .form-intro,
    .account-hero,
    .admin-hero {
        padding: 34px 22px;
    }

    .presentation-hero {
        min-height: 640px;
        padding: 70px 20px;
    }

    .presentation-hero h1 {
        font-size: clamp(54px, 15vw, 78px);
    }

    .presentation-facts {
        margin-top: 0;
    }

    .presentation-facts article {
        padding: 20px 12px;
    }

    .presentation-story {
        gap: 72px;
        padding: 80px 0;
    }

    .presentation-feature,
    .presentation-feature.reverse {
        gap: 28px;
    }

    .presentation-feature > img {
        min-height: 245px;
    }

    .presentation-principles {
        margin-bottom: 80px;
    }

    .presentation-cta {
        padding: 45px 20px;
    }

    .account-stats,
    .account-grid,
    .account-settings,
    .account-security-grid,
    .character-grid,
    .shop-grid,
    .news-page-grid,
    .wiki-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .download-card {
        grid-template-columns: 1fr;
    }

    .download-emblem img {
        width: 82px;
    }

    .ranking-columns {
        display: none;
    }

    .ranking-row {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
        padding: 16px 4px;
    }

    .rank-score {
        grid-column: 2;
        text-align: left;
    }

    .character-row {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .character-row > div:last-child {
        grid-column: 2;
        text-align: left;
    }

    .status-main {
        grid-template-columns: 18px minmax(0, 1fr);
    }

    .online-total {
        grid-column: 2;
        text-align: left;
    }

    .patchnote-timeline article,
    .journey-road article,
    .event-entry,
    .content-list article {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 22px;
    }

    .account-panel dl div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .maintenance-ribbon {
        grid-template-columns: 22px 1fr;
    }

    .maintenance-ribbon time {
        grid-column: 2;
    }

    .site-footer {
        padding: 48px 20px 25px;
    }
}

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