:root {
    color-scheme: dark;
    --bg: #050509;
    --bg-elevated: rgba(18, 16, 27, 0.82);
    --bg-elevated-strong: rgba(25, 22, 37, 0.94);
    --border: rgba(186, 132, 255, 0.22);
    --border-strong: rgba(196, 149, 255, 0.45);
    --text: #f4efff;
    --muted: #b5abc8;
    --purple: #9d4edd;
    --purple-bright: #c77dff;
    --purple-deep: #5a189a;
    --danger: #ff7a9a;
    --success: #8ef6c1;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    --glow: 0 0 34px rgba(199, 125, 255, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 18%, rgba(157, 78, 221, 0.24), transparent 28rem),
        radial-gradient(circle at 82% 78%, rgba(90, 24, 154, 0.26), transparent 26rem),
        linear-gradient(135deg, #030306 0%, #11101a 48%, #050509 100%);
}

body::before {
    position: fixed;
    inset: 0;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 78%);
}


.site-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(58px, 7vw, 82px);
    height: clamp(58px, 7vw, 82px);
    border-radius: 18px;
    background: rgba(5, 5, 9, 0.18);
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.38));
    transition: transform 180ms ease, filter 180ms ease;
}

.site-logo:hover {
    transform: translateY(-1px) scale(1.03);
    filter: drop-shadow(0 12px 30px rgba(199, 125, 255, 0.32));
}

.site-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.elmor-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    place-items: center;
    overflow: hidden;
    padding: 32px;
}

.elmor-mist {
    position: fixed;
    width: 38rem;
    height: 38rem;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(22px);
    opacity: 0.22;
}

.elmor-mist-one {
    top: -12rem;
    left: -10rem;
    background: #7b2cbf;
}

.elmor-mist-two {
    right: -14rem;
    bottom: -16rem;
    background: #c77dff;
}

.hero-shell,
.auth-shell,
.dashboard-shell {
    position: relative;
    z-index: 1;
}

.hero-shell {
    width: min(100%, 1040px);
}

.auth-shell {
    width: min(100%, 480px);
}

.dashboard-shell {
    width: min(100%, 1180px);
}

.hero-card,
.auth-card,
.dashboard-card {
    border: 1px solid var(--border);
    border-radius: 28px;
    background: linear-gradient(145deg, var(--bg-elevated-strong), var(--bg-elevated));
    box-shadow: var(--shadow), var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.hero-card {
    min-height: 520px;
    padding: clamp(36px, 7vw, 84px);
}

.auth-card,
.dashboard-card {
    padding: clamp(28px, 5vw, 46px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--purple-bright);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    display: inline-block;
    width: 34px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--purple-bright));
}

h1 {
    margin: 0;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(2.5rem, 8vw, 6.2rem);
    line-height: 0.95;
    letter-spacing: 0.03em;
    text-shadow: 0 0 22px rgba(199, 125, 255, 0.42);
}

.auth-card h1,
.dashboard-card h1 {
    font-size: clamp(2.25rem, 6vw, 3.6rem);
}

.hero-subtitle {
    margin: 18px 0 0;
    color: #e9dcff;
    font-size: clamp(1.2rem, 2.4vw, 1.65rem);
    font-weight: 700;
}

.hero-copy,
.form-intro {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

.action-row,
.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--purple-deep), var(--purple), var(--purple-bright));
    box-shadow: 0 12px 34px rgba(157, 78, 221, 0.34);
}

.btn-primary:hover {
    box-shadow: 0 16px 42px rgba(199, 125, 255, 0.46);
}

.btn-secondary,
.btn-ghost {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover,
.btn-ghost:hover {
    background: rgba(199, 125, 255, 0.12);
}

.btn-landing-auth {
    width: 136px;
}

.btn-full {
    width: 100%;
    margin-top: 12px;
}

.btn-settings {
    white-space: nowrap;
}

.btn-dashboard-action {
    width: 136px;
    padding-right: 18px;
    padding-left: 18px;
    text-align: center;
}

.btn-icon {
    width: 1.08em;
    height: 1.08em;
    flex: 0 0 auto;
    fill: currentColor;
}

.back-link,
.form-link-row a,
.auth-switch a {
    color: var(--purple-bright);
    font-weight: 800;
    text-decoration: none;
}

.back-link:hover,
.form-link-row a:hover,
.auth-switch a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 26px;
    color: var(--muted);
    font-size: 0.92rem;
}

.elmor-form {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.elmor-form label {
    color: #e8ddfa;
    font-weight: 800;
}

.elmor-form input {
    width: 100%;
    min-height: 50px;
    margin-bottom: 8px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    color: var(--text);
    background: rgba(4, 4, 8, 0.62);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.elmor-form input:focus {
    border-color: var(--purple-bright);
    background: rgba(10, 8, 18, 0.92);
    box-shadow: 0 0 0 4px rgba(199, 125, 255, 0.13);
}

.elmor-form input.is-invalid {
    border-color: var(--danger);
}

.alert,
.field-error {
    color: #ffd3de;
}

.alert {
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 122, 154, 0.32);
    border-radius: 16px;
    background: rgba(255, 122, 154, 0.09);
}

.alert-success {
    color: #d8ffe9;
    border-color: rgba(142, 246, 193, 0.34);
    background: rgba(142, 246, 193, 0.08);
    box-shadow: 0 0 24px rgba(142, 246, 193, 0.08);
}

.field-error {
    margin: -2px 0 10px;
    font-size: 0.9rem;
}

.form-link-row {
    display: flex;
    justify-content: flex-end;
    margin: -2px 0 8px;
    font-size: 0.92rem;
}

.auth-switch {
    margin: 24px 0 0;
    color: var(--muted);
    text-align: center;
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.dashboard-title-block {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-greeting {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feature-card {
    flex: 1 1 260px;
    min-height: 132px;
    padding: 22px;
    border: 1px solid rgba(199, 125, 255, 0.2);
    border-radius: 22px;
    color: var(--text);
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    opacity: 0.76;
}

.feature-card strong,
.feature-card span {
    display: block;
}

.feature-card strong {
    margin-bottom: 10px;
    font-family: Cinzel, Georgia, serif;
    font-size: 1.25rem;
}

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

.elmor-fade-in {
    animation: elmorFadeIn 680ms ease both;
}

@keyframes elmorFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 720px) {
    .site-logo {
        top: 14px;
        left: 14px;
        width: 54px;
        height: 54px;
        border-radius: 14px;
    }

    .elmor-page {
        padding: 18px;
    }

    .hero-card,
    .auth-card,
    .dashboard-card {
        border-radius: 22px;
    }

    .dashboard-header {
        display: grid;
    }

    .dashboard-header form,
    .dashboard-header .btn,
    .dashboard-top-actions,
    .account-top-actions {
        width: 100%;
    }

    .dashboard-top-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-top-actions form,
    .dashboard-top-actions .btn-dashboard-action {
        width: 100%;
        min-width: 0;
    }

    .btn {
        width: 100%;
    }
}

.account-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1180px);
}

.account-card {
    width: 100%;
}

.dashboard-top-actions,
.account-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.dashboard-top-actions {
    flex-wrap: nowrap;
}

.account-top-actions {
    flex-wrap: wrap;
}

.dashboard-top-actions form,
.account-top-actions form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 20px;
    margin-top: 34px;
}

.settings-card {
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid rgba(199, 125, 255, 0.2);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        rgba(8, 7, 14, 0.48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 44px rgba(0, 0, 0, 0.22);
}

.settings-card-wide {
    grid-row: span 2;
}

.settings-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.settings-icon {
    display: inline-grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(199, 125, 255, 0.32);
    border-radius: 14px;
    color: var(--purple-bright);
    background: rgba(199, 125, 255, 0.1);
    box-shadow: 0 0 24px rgba(199, 125, 255, 0.16);
}

.settings-card h2 {
    margin: 0;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    letter-spacing: 0.03em;
}

.settings-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.settings-card strong {
    color: var(--text);
}

.settings-form {
    margin-top: 24px;
}

.account-info-list {
    display: grid;
    gap: 14px;
    margin: 24px 0 0;
}

.account-info-list div {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
}

.account-info-list dt {
    margin-bottom: 6px;
    color: var(--purple-bright);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.account-info-list dd {
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

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

    .settings-card-wide {
        grid-row: auto;
    }
}

@media (max-width: 720px) {
    .dashboard-top-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-top-actions form,
    .dashboard-top-actions .btn-dashboard-action {
        width: 100%;
        min-width: 0;
    }
}

.alert-warning {
    color: #ffe9bd;
    border-color: rgba(255, 214, 128, 0.34);
    background: rgba(255, 214, 128, 0.08);
    box-shadow: 0 0 24px rgba(255, 214, 128, 0.07);
}

.feature-card-link {
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.feature-card-link:hover {
    border-color: var(--border-strong);
    background: rgba(199, 125, 255, 0.11);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22), 0 0 28px rgba(199, 125, 255, 0.18);
    transform: translateY(-3px);
}

.character-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1180px);
}

.character-card {
    width: 100%;
}

.character-form {
    gap: 0;
    margin-top: 34px;
}

.character-name-panel,
.character-summary-card {
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid rgba(199, 125, 255, 0.2);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        rgba(8, 7, 14, 0.48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 44px rgba(0, 0, 0, 0.22);
}

.character-name-panel input {
    margin-bottom: 0;
}

.class-selection-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
}

.class-selection-heading h2,
.character-summary-card h2 {
    margin: 0;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    letter-spacing: 0.03em;
    text-shadow: 0 0 18px rgba(199, 125, 255, 0.28);
}

.class-selection-error {
    margin: 0 0 16px;
}

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

.elmor-form .class-radio {
    position: absolute;
    width: 1px;
    min-height: 0;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.class-card {
    position: relative;
    display: grid;
    gap: 16px;
    min-height: 100%;
    padding: 24px;
    border: 1px solid rgba(199, 125, 255, 0.22);
    border-radius: 24px;
    background:
        radial-gradient(circle at 20% 0%, rgba(199, 125, 255, 0.12), transparent 12rem),
        rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.class-card:hover,
.elmor-form .class-radio:focus-visible + .class-card {
    border-color: var(--border-strong);
    background:
        radial-gradient(circle at 20% 0%, rgba(199, 125, 255, 0.2), transparent 12rem),
        rgba(199, 125, 255, 0.08);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2), 0 0 26px rgba(199, 125, 255, 0.16);
    transform: translateY(-3px);
}

.elmor-form .class-radio:checked + .class-card {
    border-color: rgba(199, 125, 255, 0.78);
    background:
        radial-gradient(circle at 20% 0%, rgba(199, 125, 255, 0.28), transparent 12rem),
        rgba(199, 125, 255, 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26), 0 0 34px rgba(199, 125, 255, 0.3);
}

.elmor-form .class-radio:checked + .class-card .class-card-choice {
    color: #ffffff;
    border-color: rgba(142, 246, 193, 0.48);
    background: rgba(142, 246, 193, 0.16);
}

.class-card-choice {
    justify-self: start;
    padding: 7px 12px;
    border: 1px solid rgba(199, 125, 255, 0.28);
    border-radius: 999px;
    color: var(--purple-bright);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.class-card-title {
    font-family: Cinzel, Georgia, serif;
    font-size: 1.55rem;
    letter-spacing: 0.03em;
}

.class-card-description {
    color: var(--muted);
    line-height: 1.6;
}

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

.class-stats-grid span,
.class-attacks span,
.character-info-grid div {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
}

.class-stats-grid b,
.class-attacks b {
    display: block;
    margin-bottom: 5px;
    color: var(--purple-bright);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.class-attacks {
    display: grid;
    gap: 10px;
}

.character-submit-row {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 28px;
}

.character-summary-card {
    container-type: inline-size;
    margin-top: 34px;
}

.character-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.character-summary-header p {
    margin: 10px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.character-summary-header .btn:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.character-summary-header .btn:disabled:hover {
    transform: none;
}

.character-summary-content {
    display: grid;
    grid-template-columns: minmax(260px, 36%) minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(18px, 3vw, 28px);
    margin-top: 24px;
}

.character-class-portrait {
    display: grid;
    block-size: clamp(280px, 40cqw, 420px);
    min-block-size: 0;
    margin: 0;
    overflow: hidden;
    place-items: center;
    border: 1px solid rgba(199, 125, 255, 0.22);
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 18%, rgba(199, 125, 255, 0.2), transparent 12rem),
        rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.character-class-portrait img {
    display: block;
    inline-size: 84%;
    block-size: 84%;
    max-inline-size: 84%;
    max-block-size: 84%;
    object-fit: contain;
}

.character-class-portrait figcaption {
    padding: 24px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: center;
}

.character-class-portrait figcaption strong {
    display: block;
    margin-top: 8px;
    color: var(--purple-bright);
    overflow-wrap: anywhere;
}

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

.character-info-grid dt {
    display: block;
    margin-bottom: 5px;
    color: var(--purple-bright);
    font-size: clamp(1.12rem, 2cqw, 1.35rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.character-info-grid dt,
.character-info-grid dd {
    margin: 0;
}

.character-info-grid dd {
    color: var(--text);
    font-size: clamp(1.12rem, 2cqw, 1.35rem);
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .class-grid,
    .character-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .character-summary-content {
        grid-template-columns: 1fr;
    }

    .character-class-portrait {
        block-size: clamp(260px, 52cqw, 360px);
    }
}

@media (max-width: 720px) {
    .class-selection-heading,
    .character-summary-header,
    .character-submit-row {
        display: grid;
    }

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

    .character-class-portrait {
        block-size: clamp(220px, 72cqw, 320px);
    }
}

.character-creation-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
    gap: clamp(20px, 3vw, 32px);
}

.character-preview-column,
.class-picker-column {
    display: grid;
    min-width: 0;
    gap: 20px;
}

.character-name-panel-featured {
    position: relative;
    overflow: hidden;
    border-color: rgba(199, 125, 255, 0.36);
    background:
        radial-gradient(circle at 12% 0%, rgba(199, 125, 255, 0.24), transparent 15rem),
        linear-gradient(145deg, rgba(47, 30, 74, 0.72), rgba(9, 8, 16, 0.62));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 52px rgba(0, 0, 0, 0.3), 0 0 30px rgba(157, 78, 221, 0.16);
}

.character-name-panel-featured::after {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 82px;
    height: 82px;
    content: "";
    border: 1px solid rgba(199, 125, 255, 0.22);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.16), rgba(90, 24, 154, 0.08));
    box-shadow: 0 0 34px rgba(199, 125, 255, 0.16);
    transform: rotate(12deg);
}

.character-name-panel-featured .eyebrow,
.character-name-panel-featured label,
.character-name-panel-featured input,
.character-name-panel-featured .field-error {
    position: relative;
    z-index: 1;
}

.character-name-panel-featured label {
    display: block;
    margin-bottom: 12px;
    color: var(--purple-bright);
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(1.35rem, 3vw, 2.05rem);
    letter-spacing: 0.04em;
    text-shadow: 0 0 22px rgba(199, 125, 255, 0.34);
}

.character-name-panel-featured input {
    min-height: 62px;
    padding: 0 20px;
    border-color: rgba(199, 125, 255, 0.28);
    border-radius: 18px;
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    font-weight: 800;
    background: rgba(4, 4, 8, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.class-preview-panel,
.selected-class-details {
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid rgba(199, 125, 255, 0.22);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 0%, rgba(199, 125, 255, 0.14), transparent 18rem),
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        rgba(8, 7, 14, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 44px rgba(0, 0, 0, 0.22);
}

.class-preview-header h2,
.selected-class-copy h3 {
    margin: 0;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(1.7rem, 4vw, 2.55rem);
    letter-spacing: 0.04em;
    text-shadow: 0 0 20px rgba(199, 125, 255, 0.32);
}

.class-preview-header p,
.selected-class-copy p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.class-preview-portrait {
    inline-size: 100%;
    block-size: clamp(380px, 44vw, 540px);
    margin-top: 22px;
    padding: clamp(22px, 4vw, 44px);
    box-sizing: border-box;
    overflow: hidden;
    place-items: center;
}

.class-preview-portrait img {
    inline-size: 100%;
    block-size: 100%;
    max-inline-size: min(76%, 340px);
    max-block-size: 100%;
    object-fit: contain;
    object-position: center;
    image-rendering: pixelated;
}

.class-selection-heading-compact {
    margin-top: 0;
}

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

.class-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0 18px;
    border: 1px solid rgba(199, 125, 255, 0.24);
    border-radius: 18px;
    color: #eadcff;
    font-family: Cinzel, Georgia, serif;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(199, 125, 255, 0.12), transparent 8rem),
        rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.class-button:hover,
.elmor-form .class-radio:focus-visible + .class-button {
    border-color: var(--border-strong);
    background:
        radial-gradient(circle at 50% 0%, rgba(199, 125, 255, 0.22), transparent 8rem),
        rgba(199, 125, 255, 0.09);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22), 0 0 26px rgba(199, 125, 255, 0.15);
    transform: translateY(-2px);
}

.elmor-form .class-radio:checked + .class-button {
    border-color: rgba(218, 179, 255, 0.92);
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 0%, rgba(218, 179, 255, 0.36), transparent 9rem),
        linear-gradient(135deg, rgba(90, 24, 154, 0.92), rgba(157, 78, 221, 0.86), rgba(199, 125, 255, 0.72));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28), 0 0 34px rgba(199, 125, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.selected-class-details {
    display: grid;
    gap: 18px;
}

.selected-class-details > .class-card-choice {
    margin-bottom: -2px;
}

.selected-class-stats,
.selected-class-attacks {
    display: grid;
    gap: 12px;
    margin: 0;
}

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

.selected-class-stats div,
.selected-class-attacks div {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.035);
}

.selected-class-stats dt,
.selected-class-attacks dt {
    margin: 0 0 6px;
    color: var(--purple-bright);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.selected-class-stats dd,
.selected-class-attacks dd {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .character-creation-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .class-button-list,
    .selected-class-stats {
        grid-template-columns: 1fr;
    }
}
