.arcane-page .arcane-active-profile {
    margin: 12px 0 8px;
    color: #e7ded2;
    font: 600 12px/1.6 Inter, Arial, sans-serif;
}

.arcane-page .arcane-xp-panel {
    max-width: 430px;
    margin: 9px 0 16px;
}

.arcane-page .arcane-campaign-lore {
    max-width: 760px;
    border-left: 2px solid rgb(203 168 120 / 55%);
    margin: 0 0 16px;
    padding: 8px 0 8px 13px;
    color: #c6b8c8;
    font: italic 13px/1.75 Georgia, "Times New Roman", serif;
}

.arcane-page .arcane-xp-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    color: #bdb1c1;
    font: 700 8px/1.4 Inter, Arial, sans-serif;
    letter-spacing: .1em;
}

.arcane-page .arcane-xp-track {
    height: 6px;
    overflow: hidden;
    border: 1px solid rgb(203 168 120 / 25%);
    background: #100e15;
}

.arcane-page .arcane-xp-track > span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #73518b, #d6b77f);
    box-shadow: 0 0 12px rgb(195 148 217 / 46%);
    transition: width 350ms ease;
}

.arcane-page .arcane-save-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 10px 0 18px;
}

.arcane-page .arcane-save-chip {
    border: 1px solid rgb(203 168 120 / 20%);
    border-radius: 3px;
    background: rgb(7 8 13 / 27%);
    padding: 6px 9px;
    color: #a9a0aa;
    font: 700 8px/1.4 Inter, Arial, sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.arcane-page .arcane-save-chip.is-active {
    border-color: rgb(203 168 120 / 62%);
    color: #ecd8b9;
}

.arcane-page .arcane-opponent-heading {
    display: block;
    margin: 12px 0 8px;
}

.arcane-page .arcane-info-screen > .arcane-kicker {
    display: inline-block;
    margin-bottom: 5px;
}

.arcane-page .arcane-name-field {
    display: grid;
    max-width: 470px;
    gap: 8px;
    margin: 16px 0;
    color: #d7cbd7;
    font: 700 10px/1.4 Inter, Arial, sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.arcane-page .arcane-name-field input,
.arcane-page .arcane-name-field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgb(203 168 120 / 34%);
    border-radius: 3px;
    background: #17141d;
    padding: 0 12px;
    color: #f0e5d4;
    font: 13px/1.4 Inter, Arial, sans-serif;
    letter-spacing: normal;
    text-transform: none;
}

.arcane-page .arcane-name-field input:focus-visible,
.arcane-page .arcane-name-field select:focus-visible {
    outline: 2px solid #e8c890;
    outline-offset: 2px;
}

.arcane-page .arcane-class-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    margin: 19px 0;
}

.arcane-page .arcane-class-card {
    display: grid;
    min-width: 0;
    align-content: start;
    justify-items: start;
    gap: 9px;
    border: 1px solid rgb(203 168 120 / 30%);
    border-radius: 4px;
    background:
        radial-gradient(ellipse at 95% 0, rgb(255 255 255 / 3%), transparent 62%),
        rgb(8 8 13 / 42%);
    padding: 15px;
    color: #d8ced8;
    cursor: pointer;
    text-align: left;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.arcane-page .arcane-class-card:hover {
    transform: translateY(-2px);
    border-color: var(--class-color);
}

.arcane-page .arcane-class-card.is-selected {
    border-color: var(--class-color);
    background:
        radial-gradient(ellipse at 95% 0, rgb(255 255 255 / 6%), transparent 64%),
        rgb(8 8 13 / 58%);
    box-shadow: inset 0 0 28px rgb(255 255 255 / 3%), 0 0 17px rgb(255 255 255 / 4%);
}

.arcane-page .arcane-class-card:focus-visible {
    outline: 2px solid #e8c890;
    outline-offset: 3px;
}

.arcane-page .arcane-class-card strong {
    color: #f0e5d4;
    font: 600 16px/1.2 Georgia, "Times New Roman", serif;
}

.arcane-page .arcane-class-card > span:not(.arcane-class-sigil) {
    color: #b8adb9;
    font: 11px/1.6 Inter, Arial, sans-serif;
}

.arcane-page .arcane-class-card small,
.arcane-page .arcane-class-spells {
    color: var(--class-color);
    font: 700 8px/1.6 Inter, Arial, sans-serif;
    letter-spacing: .06em;
}

.arcane-page .arcane-class-sigil {
    display: grid;
    min-width: 58px;
    min-height: 30px;
    place-items: center;
    border: 1px solid var(--class-color);
    color: var(--class-color);
    font: 800 8px/1 Inter, Arial, sans-serif;
    letter-spacing: .15em;
}

.arcane-page .arcane-local-save-note {
    color: #a9a0aa;
    font: 11px/1.6 Inter, Arial, sans-serif;
}

.arcane-page .arcane-local-save-note[role="status"] {
    color: #e5c993;
}

.arcane-page .arcane-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0;
}

.arcane-page .arcane-save-slots {
    display: grid;
    gap: 9px;
    margin: 18px 0;
}

.arcane-page .arcane-save-slot {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--arcane-line);
    background: rgb(7 8 13 / 30%);
    padding: 15px;
}

.arcane-page .arcane-save-slot.is-active {
    border-color: rgb(203 168 120 / 62%);
}

.arcane-page .arcane-save-slot > div {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.arcane-page .arcane-save-slot strong {
    color: #eee4d8;
    font: 600 17px/1.25 Georgia, "Times New Roman", serif;
}

.arcane-page .arcane-save-slot small {
    color: #aaa0ad;
    font: 10px/1.5 Inter, Arial, sans-serif;
}

.arcane-page .arcane-deck-count {
    margin: 12px 0;
    color: #ddc69f;
    font: 800 9px/1.5 Inter, Arial, sans-serif;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.arcane-page .arcane-spell-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.arcane-page .arcane-spell-filters select {
    min-width: 0;
    min-height: 40px;
    border: 1px solid rgb(203 168 120 / 30%);
    border-radius: 3px;
    background: #17141d;
    padding: 0 9px;
    color: #d7cbd7;
    font: 10px/1.3 Inter, Arial, sans-serif;
}

.arcane-page .arcane-spell-filters select:focus-visible {
    outline: 2px solid #e8c890;
    outline-offset: 2px;
}

.arcane-page .arcane-deck-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 24px;
}

.arcane-page .arcane-deck-entry {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 9px;
    border: 1px solid var(--arcane-line);
    background: rgb(7 8 13 / 24%);
    padding: 9px;
}

.arcane-page .arcane-deck-entry .arcane-card {
    width: 100%;
}

.arcane-page .arcane-card.is-sealed {
    filter: saturate(.35);
}

.arcane-page .arcane-card-lock {
    font: 700 7px/1.4 Inter, Arial, sans-serif;
    letter-spacing: .08em;
}

.arcane-page .arcane-card-rarity {
    color: #c9b894;
    font: 700 7px/1.35 Inter, Arial, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.arcane-page .arcane-tower-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.arcane-page .arcane-tower-card {
    position: relative;
    display: grid;
    min-height: 172px;
    align-content: end;
    gap: 7px;
    overflow: hidden;
    border: 1px solid var(--arcane-line);
    background:
        linear-gradient(0deg, rgb(12 10 16 / 96%), rgb(12 10 16 / 12%) 90%),
        radial-gradient(ellipse at 70% 22%, rgb(181 93 58 / 34%), transparent 58%),
        linear-gradient(135deg, #29202b, #131219);
    padding: 18px;
    color: #e8dfd1;
    text-align: left;
}

.arcane-page .arcane-tower-card.is-locked {
    filter: saturate(.35);
}

.arcane-page button.arcane-tower-card {
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease;
}

.arcane-page button.arcane-tower-card:hover {
    transform: translateY(-2px);
    border-color: #d2b185;
}

.arcane-page button.arcane-tower-card:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.arcane-page .arcane-tower-card > span {
    color: #d6b77f;
    font: 800 8px/1.5 Inter, Arial, sans-serif;
    letter-spacing: .16em;
}

.arcane-page .arcane-tower-card strong {
    font: 600 21px/1.1 Georgia, "Times New Roman", serif;
}

.arcane-page .arcane-tower-card small {
    color: #b7adba;
    font: 11px/1.55 Inter, Arial, sans-serif;
}

.arcane-page .arcane-encounter-list {
    display: grid;
    gap: 8px;
    margin: 20px 0;
}

.arcane-page .arcane-encounter {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--arcane-line);
    background: rgb(7 8 13 / 32%);
    padding: 12px;
}

.arcane-page .arcane-encounter.is-complete {
    border-color: rgb(145 199 131 / 48%);
}

.arcane-page .arcane-encounter > span:first-child {
    color: #d6b77f;
    font: 800 9px/1 Inter, Arial, sans-serif;
}

.arcane-page .arcane-encounter > div {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 4px;
}

.arcane-page .arcane-encounter strong {
    color: #eee4d8;
    font: 600 15px/1.2 Georgia, "Times New Roman", serif;
}

.arcane-page .arcane-encounter small {
    color: #aaa0ad;
    font: 10px/1.45 Inter, Arial, sans-serif;
}

.arcane-page .arcane-boss-phase {
    color: #f0a36d !important;
}

.arcane-page .arcane-arena {
    min-height: 320px;
}

.arcane-page #arcane-3d-scene {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    background: #100d18;
    visibility: hidden;
    pointer-events: none;
}

.arcane-page #arcane-3d-scene.is-ready {
    visibility: visible;
    pointer-events: auto;
}

.arcane-page #arcane-3d-scene[hidden] {
    display: none;
}

.arcane-page .arcane-arena.has-3d-scene #arcane-scene {
    visibility: hidden;
}

.arcane-page .arcane-battle.is-dragon-battle {
    border-color: rgb(224 112 69 / 58%);
    box-shadow: 0 25px 75px rgb(0 0 0 / 35%), 0 0 32px rgb(205 77 44 / 15%);
}

.arcane-page .arcane-battle.is-dragon-battle .arcane-battle-top {
    background: linear-gradient(90deg, rgb(95 43 33 / 25%), transparent 75%);
}

.arcane-page .arcane-battle.is-dragon-battle[data-dragon-phase="2"] .arcane-arena {
    box-shadow: inset 0 0 80px rgb(231 94 49 / 12%);
}

.arcane-page .arcane-battle.is-dragon-battle[data-dragon-phase="3"] .arcane-arena {
    box-shadow: inset 0 0 100px rgb(244 80 38 / 22%);
}

@media (max-width: 780px) {
    .arcane-page .arcane-arena {
        min-height: 300px;
    }

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

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

@media (max-width: 520px) {
    .arcane-page .arcane-class-grid,
    .arcane-page .arcane-deck-grid,
    .arcane-page .arcane-tower-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .arcane-page .arcane-spell-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .arcane-page .arcane-class-card {
        padding: 13px;
    }

    .arcane-page .arcane-save-slot {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 13px;
    }

    .arcane-page .arcane-save-slot .arcane-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .arcane-page .arcane-class-card,
    .arcane-page .arcane-xp-track > span {
        transition: none;
    }
}
