html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: 100dvh;
    height: auto;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #0a0f1a;
    background-image: url('/Images/blanc001.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

html::-webkit-scrollbar {
    width: 12px;
}

html::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.28);
}

html::-webkit-scrollbar-thumb {
    background: rgba(232, 223, 208, 0.55);
    border-radius: 8px;
}

#app {
    min-height: 100dvh;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}


h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Duel game */
.setup-page,
.battle-page {
    max-width: 1600px;
    width: 100%;
    color: #f3efe6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

.setup-page {
    flex: 1 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.setup-page__body {
    flex: 0 0 auto;
    overflow: visible;
}

.setup-page__footer {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-top: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-top: 1px solid rgba(232, 223, 208, 0.25);
    background: rgba(10, 15, 26, 0.82);
}

.battle-page {
    flex: 1 0 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    max-width: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
    box-sizing: border-box;
    padding-bottom: 0.5rem;
}

.setup-page__header,
.battle-page__header,
.setup-page__mode > h2,
.setup-page__first > h2,
.battle-empty,
.battle-page__phase {
    color: inherit;
    text-shadow: inherit;
}

.setup-page__header p,
.battle-page__header p,
.setup-hint {
    opacity: 0.92;
}

.first-attacker label {
    cursor: pointer;
}

.setup-page__header {
    margin-bottom: 0.6rem;
}

.setup-page__header h1 {
    margin: 0;
    font-size: 1.6rem;
}

.setup-page__header p {
    margin: 0.25rem 0 0;
}

.battle-page__header {
    flex: 0 0 auto;
    margin-bottom: 0.2rem;
}

.battle-page__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.battle-page__log-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.battle-page__log-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(240, 212, 138, 0.2);
    color: #f0d48a;
    font-size: 0.75rem;
    font-weight: 700;
}

.battle-action-log {
    flex: 0 0 18rem;
    width: 18rem;
    max-width: 100%;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(232, 223, 208, 0.28);
    background: rgba(10, 15, 26, 0.82);
    align-self: stretch;
    max-height: calc(100svh - 7rem);
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    box-sizing: border-box;
}

.battle-page__body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
}

.battle-page__body .battle-page__arena {
    flex: 1 1 auto;
    min-width: 0;
}

.battle-page__body--with-log .battle-page__arena {
    flex: 1 1 0;
}

.battle-page__body--with-log .warrior-panel {
    --warrior-panel-height: calc(100svh - 10.5rem);
    width: min(100%, calc(var(--warrior-panel-height) * 640 / 1138));
    max-height: var(--warrior-panel-height);
}

@media (max-width: 1100px) {
    .battle-page__body--with-log {
        flex-direction: column;
    }

    .battle-action-log {
        flex: 0 0 auto;
        width: 100%;
        max-height: 12rem;
        order: 2;
    }

    .battle-page__body--with-log .battle-page__arena {
        order: 1;
    }
}

.battle-action-log__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.battle-action-log__header h2 {
    margin: 0;
    font-size: 0.95rem;
}

.battle-action-log__empty {
    margin: 0;
    opacity: 0.75;
    font-size: 0.85rem;
}

.battle-action-log__list {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.battle-action-log__item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.5rem;
    border-left: 3px solid rgba(232, 223, 208, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.battle-action-log__item--player {
    border-left-color: #6fbf73;
}

.battle-action-log__item--computer {
    border-left-color: #d17a6a;
}

.battle-action-log__item--system {
    border-left-color: #f0d48a;
}

.battle-action-log__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.72rem;
    opacity: 0.8;
}

.battle-action-log__actor {
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.battle-action-log__item--player .battle-action-log__actor {
    color: #8fd49a;
}

.battle-action-log__item--computer .battle-action-log__actor {
    color: #e0a295;
}

.battle-action-log__item--system .battle-action-log__actor {
    color: #f0d48a;
}

.battle-action-log__text {
    font-size: 0.86rem;
    line-height: 1.35;
}

.battle-page__header h1 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
}

.battle-page__phase {
    margin: 0.15rem 0 0;
    font-size: 0.88rem;
}

.setup-page__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    align-items: start;
}

@media (max-width: 767px) {
    .setup-page__columns {
        grid-template-columns: 1fr;
    }
}

.setup-card {
    position: relative;
    overflow: hidden;
    color: #2b2116;
    text-shadow: none;
    background: linear-gradient(160deg, #f7f3ea 0%, #e8e0d2 100%);
    border: 1px solid #c9bba5;
    padding: 0.7rem 0.85rem 0.85rem;
}

.setup-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--setup-card-image);
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.42;
    z-index: 0;
}

.setup-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        165deg,
        rgba(247, 243, 234, 0.9) 0%,
        rgba(232, 224, 210, 0.94) 45%,
        rgba(232, 224, 210, 0.97) 100%);
    z-index: 0;
}

.setup-card > * {
    position: relative;
    z-index: 1;
}

.setup-card--player {
    border-top: 4px solid #2f6f4f;
}

.setup-card--computer {
    border-top: 4px solid #8b3a2f;
}

.setup-card h2 {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
}

.setup-card__owner {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.setup-card--player .setup-card__owner {
    background: #2f6f4f;
    color: #f3efe6;
}

.setup-card--computer .setup-card__owner {
    background: #8b3a2f;
    color: #f3efe6;
}

.setup-page__first {
    margin: 0;
    min-width: 16rem;
    flex: 1 1 18rem;
}

.setup-page__first h2 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.setup-page__mode {
    margin-bottom: 0.65rem;
}

.setup-page__mode > h2 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
}

.mode-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 767px) {
    .mode-options {
        grid-template-columns: 1fr;
    }
}

.mode-option {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid #c9bba5;
    background: #f7f3ea;
    color: #2b2116;
    text-shadow: none;
    cursor: pointer;
}

.mode-option.is-selected {
    border-color: #2f6f4f;
    box-shadow: inset 0 0 0 1px #2f6f4f;
}

.mode-option span {
    font-size: 0.9rem;
    opacity: 0.85;
}

.setup-hint {
    margin-top: 0.35rem;
    margin-bottom: 0;
    font-size: 0.82rem;
}

.body-scheme__dmg {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.85rem;
    color: #f0d48a;
}

.first-attacker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
}

.setup-page__start {
    margin: 0;
    flex: 0 0 auto;
}

.preset-editor__label {
    display: block;
    margin-bottom: 0.45rem;
}

.preset-editor__portrait {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
}

.preset-editor__portrait img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 2px solid #5c4a32;
}

.preset-editor__faction {
    display: block;
    margin-top: 0.35rem;
    opacity: 0.75;
    font-size: 0.85rem;
}

.preset-editor__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.4rem 0.55rem;
    margin-bottom: 0.55rem;
}

.preset-editor h4 {
    margin: 0.15rem 0 0.35rem;
    font-size: 0.95rem;
}

.preset-editor__grid label,
.preset-editor__grid > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.battle-page__arena {
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.battle-page__fighters {
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.7fr) minmax(0, 1.05fr);
    grid-template-rows: auto;
    grid-auto-flow: row;
    gap: 0.75rem;
    align-items: stretch;
}

.battle-page__fighters > * {
    min-width: 0;
    min-height: 0;
    max-width: 100%;
}

.battle-page__actions {
    position: relative;
    height: auto;
    min-height: 100%;
    overflow: visible;
}

.battle-page__actions .battle-action {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.battle-page__actions .attack-cards {
    justify-content: center;
}

.battle-page__actions .body-part-buttons {
    flex-direction: column;
    align-items: stretch;
}

.battle-page__actions .attack-card {
    width: 3.8rem;
    height: 5.2rem;
    font-size: 0.78rem;
}

.battle-page__actions .attack-card__back {
    font-size: 1.35rem;
}

/* Stack only on narrow screens; keep 3 columns on typical desktop/PROD widths */
@media (max-width: 767.98px) {
    .battle-page__fighters {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        height: auto;
    }

    .battle-page__actions {
        order: 0;
        aspect-ratio: 640 / 900;
        max-width: 24rem;
        margin: 0 auto;
        width: 100%;
        height: auto;
        min-height: 16rem;
    }

    .battle-page__actions .battle-action {
        position: relative;
        inset: auto;
    }

    .battle-page__side--player {
        order: -1;
        max-width: 24rem;
        margin: 0 auto;
        width: 100%;
    }

    .battle-page__side--computer {
        order: 1;
        max-width: 24rem;
        margin: 0 auto;
        width: 100%;
    }

    .battle-page__actions .body-part-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

.battle-page__side {
    min-width: 0;
    min-height: 0;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.warrior-panel {
    --warrior-panel-height: calc(100svh - 9rem);
    position: relative;
    overflow: hidden;
    background-color: #1f2a24;
    color: #f3efe6;
    padding: 0.65rem 0.75rem;
    border: 1px solid #3d5347;
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 640 / 1138;
    width: min(100%, calc(var(--warrior-panel-height) * 640 / 1138));
    height: auto;
    max-width: 100%;
    max-height: var(--warrior-panel-height);
    display: flex;
    flex-direction: column;
}

.warrior-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--warrior-panel-image);
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.78;
    z-index: 0;
}

.warrior-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(12, 18, 16, 0.22) 0%,
        rgba(12, 18, 16, 0.48) 42%,
        rgba(12, 18, 16, 0.62) 100%);
    z-index: 0;
}

.warrior-panel > * {
    position: relative;
    z-index: 1;
}

.warrior-panel__owner {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    margin-bottom: 0;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.warrior-panel--player {
    border-top: none;
    border-bottom: 4px solid #6fbf73;
}

.warrior-panel--player::after {
    background: linear-gradient(
        180deg,
        rgba(20, 36, 28, 0.18) 0%,
        rgba(16, 28, 22, 0.5) 42%,
        rgba(12, 22, 18, 0.64) 100%);
}

.warrior-panel--player .warrior-panel__owner {
    background: #2f6f4f;
    color: #f3efe6;
}

.warrior-panel--computer {
    border-top: none;
    border-bottom: 4px solid #d17a6a;
}

.warrior-panel--computer::after {
    background: linear-gradient(
        180deg,
        rgba(40, 24, 22, 0.18) 0%,
        rgba(32, 20, 18, 0.5) 42%,
        rgba(24, 16, 14, 0.64) 100%);
}

.warrior-panel--computer .warrior-panel__owner {
    background: #8b3a2f;
    color: #f3efe6;
}

.warrior-panel__header {
    flex: 0 0 auto;
    margin-bottom: 0.35rem;
}

.warrior-panel__name {
    margin: 0;
    font-size: 1.1rem;
}

.warrior-panel__role {
    margin: 0.15rem 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

.warrior-panel__mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.warrior-panel__magic {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin-top: 0.4rem;
    font-size: 0.72rem;
    opacity: 0.9;
}

.warrior-panel__effect {
    color: #f0d48a;
}

.spell-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.spell-card {
    text-align: left;
    background: rgba(20, 24, 22, 0.55);
    border: 1px solid rgba(243, 239, 230, 0.35);
    color: #f3efe6;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
}

.spell-card strong {
    display: block;
}

.spell-card span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.85;
}

.spell-card small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

.spell-card.is-selected {
    border-color: #f0d48a;
    box-shadow: inset 0 0 0 1px #f0d48a;
}

.spell-card:disabled {
    opacity: 0.45;
    cursor: default;
}

.spell-select__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.spell-cast-btn {
    margin-top: 0.75rem;
    width: 100%;
}

.battle-page__spell-log {
    font-size: 0.85rem;
    opacity: 0.9;
    color: #f0d48a;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin: 0.25rem 0;
}

.shield-row {
    flex: 0 0 auto;
    margin-top: 0.35rem;
}

.shield-row strong {
    color: #f0d48a;
}

.body-scheme {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    margin: 0.25rem auto 0;
    display: grid;
    place-items: center;
    container-type: size;
}

.body-scheme__stage {
    position: relative;
    aspect-ratio: 1 / 1;
    width: min(100cqw, 100cqh);
    height: min(100cqw, 100cqh);
}

@supports not (width: 1cqw) {
    .body-scheme__stage {
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: 100%;
    }
}

.body-scheme__svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.body-scheme__pentagon-shape {
    fill: rgba(255, 255, 255, 0.03);
    stroke: #f0ebe3;
    stroke-width: 3;
    stroke-linejoin: miter;
}

.body-scheme__torso-rect {
    fill: rgba(16, 20, 18, 0.95);
    stroke: #f0ebe3;
    stroke-width: 1.5;
}

.body-scheme__slot-rect {
    stroke-width: 1.5;
}

.body-scheme__slot-rect.is-intact {
    fill: rgba(47, 111, 79, 0.75);
    stroke: #8fd49a;
}

.body-scheme__slot-rect.is-pierced {
    fill: rgba(90, 30, 28, 0.9);
    stroke: #c07068;
}

.is-shielded .body-scheme__slot-rect {
    stroke: #f0d48a;
    stroke-width: 2.5;
}

@keyframes body-part-flash {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.2;
        filter: brightness(2.2);
    }
}

.is-flashing .body-scheme__slot-rect,
.body-scheme__slot-rect.is-flashing,
.body-scheme__torso-rect.is-flashing,
.body-scheme__slot-label.is-flashing,
.body-scheme__torso-label.is-flashing {
    animation: body-part-flash 0.35s ease-in-out infinite;
}

.body-scheme__labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.body-scheme__torso-label {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    color: #f3efe6;
    line-height: 1.1;
    text-align: center;
}

.body-scheme__torso-label span {
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0.8;
}

.body-scheme__torso-label strong {
    font-size: 1.05rem;
}

.body-scheme__slot-label {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    color: #f3efe6;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    pointer-events: auto;
}

.body-scheme__slot-label strong {
    color: #f0d48a;
    font-size: 0.78rem;
}

.body-scheme__slot-label.is-pierced span {
    text-decoration: line-through;
    opacity: 0.85;
}

.battle-action {
    background: rgba(247, 243, 234, 0.22);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(201, 187, 165, 0.35);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    color: #f3efe6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
}


.body-part-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.body-part-button {
    color: #f3efe6;
    border-color: rgba(243, 239, 230, 0.75);
    background: rgba(20, 24, 22, 0.35);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.body-part-button:hover,
.body-part-button:focus {
    color: #fff;
    border-color: #f0d48a;
    background: rgba(47, 111, 79, 0.55);
}

.attack-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
    justify-content: flex-start;
}

.attack-card {
    width: 5.5rem;
    height: 7.5rem;
    border: 2px solid #3d2f1f;
    background: linear-gradient(160deg, #5b4630, #2f2418);
    color: #f7f3ea;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.35rem;
    cursor: pointer;
}

.attack-card--disabled,
.attack-card:disabled {
    opacity: 0.75;
    cursor: default;
}

.attack-card__back {
    font-size: 2rem;
    font-weight: 700;
}

.attack-card--revealed {
    background: #efe6d6;
    color: #2b2116;
    cursor: default;
}

.attack-card--hit {
    border-color: #b33a2b;
    box-shadow: 0 0 0 2px rgba(179, 58, 43, 0.35);
}

.battle-resolve__message {
    font-size: 1.05rem;
}

.battle-finished h2 {
    margin-bottom: 0.75rem;
}

.battle-empty {
    padding: 2rem 0;
}

.auth-top-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.5rem;
}

.auth-status__email {
    color: #f3efe6;
    font-size: 0.95rem;
}

.auth-status__login,
.auth-status__logout {
    color: #f0d48a;
    text-decoration: none;
}

.auth-status__logout {
    padding: 0;
    border: 0;
    background: transparent;
}

.account-page {
    max-width: 28rem;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.account-page__header h1 {
    color: #f3efe6;
    margin-bottom: 0.35rem;
}

.account-page__header p {
    color: rgba(243, 239, 230, 0.85);
    margin-bottom: 1.25rem;
}

.account-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.account-tabs__btn {
    flex: 1;
    border: 1px solid rgba(243, 239, 230, 0.35);
    background: rgba(20, 24, 22, 0.45);
    color: #f3efe6;
    padding: 0.55rem 0.75rem;
    border-radius: 0.35rem;
}

.account-tabs__btn.is-active {
    border-color: #f0d48a;
    background: rgba(47, 111, 79, 0.55);
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.account-form__field label {
    display: block;
    color: #f3efe6;
    margin-bottom: 0.25rem;
}

.account-form .form-control {
    width: 100%;
    background: rgba(20, 24, 22, 0.65);
    border: 1px solid rgba(243, 239, 230, 0.35);
    color: #f3efe6;
}

.account-form__resend {
    align-self: flex-start;
    color: #f0d48a;
    padding-left: 0;
}

.account-message {
    padding: 0.65rem 0.85rem;
    border-radius: 0.35rem;
    margin-bottom: 1rem;
}

.account-message--success {
    background: rgba(47, 111, 79, 0.45);
    color: #dff5e8;
}

.account-message--error {
    background: rgba(179, 58, 43, 0.45);
    color: #ffe3df;
}
