:root {
    color-scheme: light;
    --ink: #182019;
    --muted: #667067;
    --paper: #f4f1e8;
    --paper-strong: #fffdf6;
    --pine: #1f4c38;
    --pine-dark: #10281f;
    --moss: #7d986c;
    --gold: #b38b44;
    --line: rgba(31, 76, 56, 0.18);
}

html, body {
    min-height: 100%;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
}

a, .btn-link {
    color: var(--pine);
}

a:hover {
    color: var(--pine-dark);
}

.btn-primary {
    color: white;
    background-color: var(--pine);
    border-color: var(--pine);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--pine-dark);
    border-color: var(--pine-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--paper-strong), 0 0 0 0.25rem rgba(125, 152, 108, 0.7);
}

.content {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

h1, h2, h3 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -0.02em;
}

h1 {
    max-width: 900px;
    margin-bottom: 1.25rem;
}

h1:focus {
    outline: none;
}

.eyebrow {
    margin-bottom: 0.55rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.portal-hero {
    position: relative;
    overflow: hidden;
    max-width: 1120px;
    padding: clamp(2.25rem, 6vw, 5.5rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at 85% 15%, rgba(179, 139, 68, 0.24), transparent 32%),
        linear-gradient(140deg, #10281f, #1f4c38 65%, #315c43);
    box-shadow: 0 22px 60px rgba(16, 40, 31, 0.18);
    color: white;
}

.portal-hero::after {
    position: absolute;
    right: -4rem;
    bottom: -10rem;
    width: 22rem;
    height: 22rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
}

.portal-hero h1 {
    max-width: 800px;
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 0.98;
}

.portal-hero .lead {
    max-width: 760px;
    margin: 1.5rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.portal-hero .btn-primary {
    background: #d2ad65;
    border-color: #d2ad65;
    color: #14221a;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 1120px;
    margin-top: 1.25rem;
}

.feature-card, .content-panel, .status-strip {
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: rgba(255, 253, 246, 0.85);
}

.feature-card {
    min-height: 220px;
    padding: 1.5rem;
}

.feature-card h2 {
    margin: 0.55rem 0 0.85rem;
}

.feature-card p {
    color: var(--muted);
    line-height: 1.6;
}

.feature-card a {
    font-weight: 700;
}

.feature-card.muted {
    opacity: 0.72;
}

.feature-kicker {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.feature-kicker.ready {
    color: var(--pine);
}

.content-panel {
    max-width: 850px;
    padding: 1.75rem;
}

.content-panel p, .status-strip {
    line-height: 1.65;
}

.status-strip {
    max-width: 850px;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--gold);
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    max-width: 850px;
    margin: 1rem 0 0;
    padding: 1px;
    border-radius: 0.9rem;
    background: var(--line);
}

.data-grid > div {
    min-width: 0;
    padding: 1.15rem 1.25rem;
    background: var(--paper-strong);
}

.data-grid dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.data-grid dd {
    margin: 0.35rem 0 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.character-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.character-heading h2 {
    margin: 0.55rem 0 0;
    font-size: 2rem;
}

.character-heading p {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-badge.online {
    background: rgba(62, 116, 78, 0.14);
    color: #2f6a42;
}

.status-badge.offline {
    background: rgba(102, 112, 103, 0.14);
    color: var(--muted);
}

.level-mark {
    display: grid;
    width: 5rem;
    height: 5rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    text-align: center;
}

.section-gap {
    margin-top: 1rem;
}

.external-login-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.recovery-code-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 850px;
    margin-bottom: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--paper-strong);
}

.recovery-code-grid code {
    color: var(--ink);
    font-size: 1rem;
    letter-spacing: 0.06em;
}

.track-list {
    display: grid;
    gap: 0.75rem;
}

.track-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.track-row > div {
    display: grid;
    gap: 0.25rem;
}

.map-placeholder {
    display: grid;
    min-height: 52vh;
    max-width: 1120px;
    place-items: center;
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    background:
        linear-gradient(rgba(31, 76, 56, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 76, 56, 0.08) 1px, transparent 1px),
        #e8e3d4;
    background-size: 38px 38px;
    text-align: center;
}

.map-placeholder > div {
    max-width: 560px;
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(244, 241, 232, 0.92);
}

.map-mark {
    display: inline-grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-family: Georgia, serif;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #3e744e;
}

.invalid {
    outline: 1px solid #a93131;
}

.validation-message {
    color: #a93131;
}

.blazor-error-boundary {
    padding: 1rem;
    background: #8f2f2f;
    color: white;
}

.darker-border-checkbox.form-check-input {
    border-color: #7b857d;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

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

    .feature-card {
        min-height: 0;
    }

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

    .character-heading, .track-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .recovery-code-grid {
        grid-template-columns: 1fr;
    }
}
