:root {
    --bg: #120f17;
    --panel: rgba(31, 25, 39, .88);
    --panel-strong: #241b2d;
    --line: rgba(255, 255, 255, .12);
    --text: #f7f0e6;
    --muted: #c6b7a8;
    --gold: #f0b84b;
    --gold-dark: #a76d20;
    --red: #c9493f;
    --green: #65d18b;
    --ink: #18131f;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 10%, rgba(201, 73, 63, .28), transparent 28rem),
        radial-gradient(circle at 80% 0%, rgba(240, 184, 75, .18), transparent 32rem),
        linear-gradient(180deg, #17121f 0%, #120f17 42%, #0f0d13 100%);
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: rgba(18, 15, 23, .82);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(240, 184, 75, .55);
    border-radius: 8px;
    color: var(--gold);
    font-family: Cinzel, serif;
    font-size: 24px;
    background: linear-gradient(145deg, #33233c, #17101d);
}

.brand strong,
h1,
h2 {
    font-family: Cinzel, serif;
    letter-spacing: 0;
}

.brand strong {
    display: block;
    font-size: 18px;
}

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

.nav {
    display: flex;
    gap: 18px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

.nav a:hover {
    color: var(--gold);
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
    min-height: calc(100vh - 73px);
    padding: clamp(32px, 5vw, 72px) clamp(18px, 5vw, 72px);
    overflow: hidden;
}

.hero-art {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    opacity: .82;
}

.hero-art::before {
    content: "";
    position: absolute;
    inset: auto -5% -2px -5%;
    height: 34%;
    background:
        linear-gradient(170deg, transparent 0 52%, rgba(0, 0, 0, .34) 53%),
        linear-gradient(0deg, #211826, transparent);
}

.moon {
    position: absolute;
    top: 12%;
    right: 22%;
    width: 170px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 34%, #fff4cf, #f0b84b 52%, rgba(240, 184, 75, .15) 70%);
    box-shadow: 0 0 80px rgba(240, 184, 75, .4);
}

.castle {
    position: absolute;
    left: 8%;
    right: 36%;
    bottom: 13%;
    height: 250px;
    border-bottom: 56px solid rgba(32, 25, 39, .9);
    filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .42));
}

.castle span {
    position: absolute;
    bottom: 0;
    width: 18%;
    min-width: 80px;
    height: 66%;
    background: linear-gradient(180deg, #3b2a45, #18131f);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px 8px 0 0;
}

.castle span::before {
    content: "";
    position: absolute;
    inset: -34px 16px auto 16px;
    height: 34px;
    background: repeating-linear-gradient(90deg, #3b2a45 0 16px, transparent 16px 24px);
}

.castle span:nth-child(1) { left: 3%; height: 58%; }
.castle span:nth-child(2) { left: 24%; height: 88%; }
.castle span:nth-child(3) { left: 47%; height: 72%; }
.castle span:nth-child(4) { left: 70%; height: 64%; }

.runes {
    position: absolute;
    left: 8%;
    bottom: 42%;
    color: rgba(255, 255, 255, .06);
    font-family: Cinzel, serif;
    font-size: 92px;
    font-weight: 700;
}

.hero-content {
    max-width: 690px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .12em;
}

h1 {
    margin: 0;
    font-size: clamp(48px, 8vw, 108px);
    line-height: .92;
}

h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1;
}

.lead {
    max-width: 560px;
    color: #eadfce;
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.55;
}

.hero-actions,
.connection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.button.primary {
    color: #211106;
    border-color: #f3c76b;
    background: linear-gradient(180deg, #ffd77d, #e89b2f);
    box-shadow: 0 14px 30px rgba(232, 155, 47, .22);
}

.button.ghost {
    color: var(--text);
    background: rgba(255, 255, 255, .08);
}

.button.full {
    width: 100%;
}

.connection {
    width: fit-content;
    margin-top: 22px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, .24);
}

.connection span,
.fine-print {
    color: var(--muted);
}

.player-panel,
.news-list article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
}

.player-panel {
    padding: 22px;
}

.panel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-head span {
    color: var(--muted);
    font-weight: 700;
}

.panel-head strong {
    color: var(--gold);
    text-transform: uppercase;
}

.panel-tabs,
.account-meta,
.char-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.panel-tabs {
    margin-bottom: 16px;
}

.panel-tabs a,
.account-meta span,
.account-meta a,
.char-stats span {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(0, 0, 0, .18);
    font-size: 13px;
    font-weight: 800;
}

.panel-tabs a.active,
.account-meta a {
    color: var(--gold);
    border-color: rgba(240, 184, 75, .42);
}

.panel-subhead {
    color: var(--gold);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .08em;
}

.separated {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.compact {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.register-form {
    display: grid;
    gap: 13px;
}

.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

input,
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--text);
    background: rgba(10, 8, 13, .72);
    outline: none;
}

input:focus,
select:focus {
    border-color: rgba(240, 184, 75, .8);
    box-shadow: 0 0 0 3px rgba(240, 184, 75, .12);
}

select option {
    color: #1f1827;
}

.notice {
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 8px;
    line-height: 1.45;
}

.notice.success {
    border: 1px solid rgba(101, 209, 139, .45);
    color: #daf7e3;
    background: rgba(43, 132, 73, .24);
}

.notice.error {
    border: 1px solid rgba(201, 73, 63, .55);
    color: #ffe2dd;
    background: rgba(201, 73, 63, .18);
}

.characters {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.character-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, .2);
}

.character-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.character-head strong {
    display: block;
    font-size: 19px;
}

.character-head span,
.character-head em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.character-head em {
    color: var(--green);
    font-weight: 900;
}

.char-stats {
    margin-top: 12px;
}

.inventory {
    margin-top: 12px;
}

.inventory summary {
    cursor: pointer;
    color: var(--gold);
    font-weight: 900;
}

.inventory-list {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    margin-top: 10px;
    padding-right: 4px;
}

.inventory-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
}

.inventory-list strong {
    font-size: 14px;
}

.inventory-list span {
    color: var(--muted);
    text-align: right;
    font-size: 12px;
    white-space: nowrap;
}

.stats,
.section-grid,
.downloads,
.woe,
.footer {
    width: min(1180px, calc(100% - 36px));
    margin-inline: auto;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: -30px;
    position: relative;
}

.stats article,
.downloads,
.woe {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(36, 27, 45, .78);
}

.stats article {
    padding: 20px;
}

.stats span {
    display: block;
    color: var(--gold);
    font-family: Cinzel, serif;
    font-size: 32px;
    font-weight: 700;
}

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

.section-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
    gap: 28px;
    padding: 88px 0 42px;
}

.section-copy p {
    color: #e5d8c7;
    font-size: 18px;
    line-height: 1.65;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.feature-list span {
    padding: 9px 12px;
    border: 1px solid rgba(240, 184, 75, .28);
    border-radius: 8px;
    color: #ffe7b4;
    background: rgba(240, 184, 75, .08);
    font-weight: 700;
}

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

.news-list article {
    padding: 20px;
}

.news-list small {
    color: var(--gold);
    font-weight: 800;
}

.news-list h3 {
    margin: 8px 0;
    font-size: 22px;
}

.news-list p {
    color: var(--muted);
    line-height: 1.55;
}

.downloads {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
}

.downloads p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.6;
}

.woe {
    margin-top: 30px;
    padding: 28px;
}

.woe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.woe-grid article {
    padding: 18px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .22);
}

.woe-grid strong {
    display: block;
    color: var(--gold);
    font-size: 24px;
}

.woe-grid span {
    color: var(--muted);
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 32px 0 42px;
    color: var(--muted);
}

@media (max-width: 920px) {
    .hero,
    .section-grid {
        grid-template-columns: 1fr;
    }

    .player-panel {
        max-width: 620px;
    }

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

    .nav {
        display: none;
    }

    .castle {
        right: 8%;
        opacity: .52;
    }
}

@media (max-width: 580px) {
    .topbar {
        padding-inline: 14px;
    }

    .hero {
        padding-inline: 14px;
    }

    .two,
    .stats,
    .woe-grid {
        grid-template-columns: 1fr;
    }

    .downloads,
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .runes {
        font-size: 48px;
    }
}
