html, body, #app { height: 100%; overflow: hidden; }
html, body {
    margin: 0;
    background: #16130f;
    color: #f4ecdf;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
}

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: 0; }

.shell { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: baseline; gap: 1rem; padding: 0.85rem 1.25rem; border-bottom: 1px solid #3a3228; }
.brand { font-family: Palatino, "Iowan Old Style", Georgia, serif; letter-spacing: 0.12em; font-size: 1.2rem; }
.where { flex: 1; color: #cbbfa8; }
.top-actions { display: flex; gap: 0.25rem; }
.stage { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 22rem; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.stage > * { min-width: 0; min-height: 0; }
.kicker { margin: 0; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #a89880; }
.shell button { font: inherit; color: inherit; cursor: pointer; }
.shell button:disabled { cursor: default; }
.shell button:focus { outline: 2px solid #e6c27a; outline-offset: 2px; }
.ghost { background: transparent; border: 0; color: #cbbfa8; padding: 0.35rem 0.5rem; }
.map-stage { margin: 0.75rem; background: #7eb6d4; color: #241c14; border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; box-shadow: inset 0 0 0 1px #6b5344; }
.map-viewport { flex: 1; min-height: 0; overflow: hidden; touch-action: none; cursor: grab; }
.map-viewport.dragging { cursor: grabbing; }
.map { width: 100%; height: 100%; display: block; }
.map path.road { fill: none; stroke: #c4843a; stroke-width: 3; stroke-linecap: round; }
.map path.road.sea { stroke: #f4ecdf; stroke-dasharray: 6 5; }
.map text { fill: #241c14; font-family: Palatino, Georgia, serif; font-size: 13px; paint-order: stroke; stroke: #9ec47a; stroke-width: 4px; }
.sea { fill: #7eb6d4; }
.land, .isle { fill: #8fbf6a; }
.woods { fill: #3d7a48; }
.ridge { fill: #8d7356; }
.ring { fill: none; stroke-width: 3; }
.ring.owner-player { stroke: #2f6fed; }
.ring.owner-rival { stroke: #c44536; }
.ring.owner-neutral { stroke: #8a8175; }
.kind-villa { fill: #e4d3b0; }
.kind-bosque { fill: #2f6a45; }
.kind-cueva { fill: #4a453f; }
.kind-monte { fill: #8d7356; }
.kind-isla { fill: #d2c09a; }
.chalk { fill: #f4ecdf; stroke: none; }
.hole { fill: #1c1916; }
.ink { fill: #241c14; stroke: none; }
.wave { fill: none; stroke: #241c14; stroke-width: 1.5; }
.here-ring { fill: none; stroke: #241c14; stroke-width: 3; }
.city { cursor: pointer; }
.city.look .node { stroke: #241c14; stroke-width: 5; }
.city.pick { cursor: pointer; }
.city.pick .node { stroke: #241c14; stroke-width: 2; stroke-dasharray: 4 3; }
.city.chosen .node { stroke: #241c14; stroke-width: 5; stroke-dasharray: none; }
.legend { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; padding: 0 1.25rem 1rem; font-size: 0.85rem; }
.map-stage .legend { background: #e7d7b8; color: #4a3b2c; }
.board-wrap .legend { color: #cbbfa8; }
.swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: -1px; }
.swatch.owner-player { background: #2f6fed; }
.swatch.owner-rival { background: #c44536; }
.swatch.owner-neutral { background: #8a8175; }
.swatch.kind-villa { background: #e4d3b0; }
.swatch.kind-bosque { background: #2f6a45; }
.swatch.kind-cueva { background: #4a453f; }
.swatch.kind-monte { background: #8d7356; }
.swatch.kind-isla { background: #d2c09a; }
.swatch.zone-suelo { background: #c4b48a; }
.swatch.zone-lava { background: #e25b2a; }
.swatch.zone-agua { background: #3d7ec4; }
.seg { margin-top: 0.65rem; }
.dock { padding: 1rem 1.15rem 1.4rem; border-left: 1px solid #3a3228; overflow: auto; }
.tabs { display: flex; gap: 0.4rem; margin: 0.15rem 0 0.75rem; }
.tabs button { flex: 1; background: transparent; border: 0; border-bottom: 2px solid #3a3228; color: #a89880; padding: 0.45rem 0.2rem; }
.tabs button.on { color: #f4ecdf; border-bottom-color: #e6c27a; }
.slots { display: flex; flex-direction: column; gap: 0.45rem; }
.slot { background: #241c14; border: 1px solid #4a3d30; border-radius: 10px; padding: 0.7rem 0.85rem; }
.slot.empty { border-style: dashed; }
.slot.on { border-color: #e6c27a; }
.pair { position: relative; display: block; width: 100%; height: 7rem; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #1c1814; color: inherit; text-align: left; }
.pair.ficha { margin-top: 0.55rem; pointer-events: none; }
.half { position: absolute; inset: 0; display: flex; flex-direction: column; pointer-events: none; }
.half.warrior { clip-path: polygon(0 0, 68% 0, 40% 100%, 0 100%); justify-content: flex-start; align-items: flex-start; padding: 0.4rem 0.55rem; background: #2a2118; }
.half.warrior.tint-planta { background: #24382c; }
.half.warrior.tint-fuego { background: #3a241c; }
.half.warrior.tint-agua { background: #1c2c38; }
.half.mon { clip-path: polygon(68% 0, 100% 0, 100% 100%, 40% 100%); justify-content: flex-end; align-items: flex-end; text-align: right; padding: 0.4rem 0.55rem; background: #1c1814; }
.pair .wedge { position: relative; z-index: 1; max-width: 62%; }
.half.mon .wedge { max-width: 55%; }
.pair strong { display: block; font-family: Palatino, Georgia, serif; font-size: 1rem; line-height: 1.1; }
.pair .meta { font-size: 0.72rem; line-height: 1.25; }
.bust, .critter { position: absolute; width: 2.5rem; height: 2.5rem; top: 58%; transform: translateY(-50%); }
.bust { left: 0.3rem; fill: #f4ecdf; }
.tint-planta .bust { fill: #8fbf6a; }
.tint-fuego .bust { fill: #e07a45; }
.tint-agua .bust { fill: #7eb6e0; }
.critter { right: 0.3rem; top: 42%; fill: #f4ecdf; }
.pair .cut { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pair .cut line { stroke: #e6c27a; stroke-width: 0.8; }
.slot-head { display: block; width: 100%; background: transparent; border: 0; padding: 0; text-align: left; color: inherit; }
.slot-head strong { display: block; font-family: Palatino, Georgia, serif; font-size: 1.15rem; }
.slot.empty .slot-head { color: #a89880; }
.slot .meta { display: block; margin: 0.15rem 0 0; }
.slot-actions { margin-top: 0.55rem; }
.slot-actions button:disabled, .order-march:disabled { opacity: 0.4; }
.march { margin-top: 1rem; }
.order-march { background: #2c241c; color: #f4ecdf; border: 1px solid #4a3d30; border-radius: 8px; padding: 0.55rem 0.75rem; }
.order-march.on { background: #f4ecdf; color: #241c14; }
.card { background: #241c14; border-radius: 10px; padding: 0.9rem 1rem; margin: 0.45rem 0 1rem; }
.card h2 { margin: 0.15rem 0 0; font-size: 1.35rem; font-family: Palatino, Georgia, serif; }
.meta { margin: 0.2rem 0 0.7rem; color: #cbbfa8; }
.orders, .seg, .actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.orders button, .seg button, .actions button, .unit {
    background: #2c241c; color: #f4ecdf; border: 1px solid #4a3d30; border-radius: 8px; padding: 0.55rem 0.75rem;
}
.orders button.on, .seg button.on, .unit.on { background: #f4ecdf; color: #241c14; }
.note { min-height: 1.3rem; color: #cbbfa8; }
.go { width: 100%; margin-top: 0.8rem; background: #c44536; color: #fff; border: 0; border-radius: 8px; padding: 0.75rem; font-weight: 700; }
.go:disabled { opacity: 0.4; }
.energy { position: relative; width: 100%; margin-top: 0.35rem; }
.energy-scale { display: flex; height: 0.85rem; gap: 3px; }
.energy-scale span { flex: 1; border-radius: 2px; }
.band-1 { background: #8d4a3a; }
.band-2 { background: #c47a3a; }
.band-3 { background: #d4b24a; }
.band-4 { background: #7aaa55; }
.band-5 { background: #3d8c4a; }
.energy-mark { position: absolute; top: 0; width: 2px; height: 0.85rem; background: #f4ecdf; transform: translateX(-1px); }
.energy-label, .energy-caption { display: block; font-size: 0.85rem; color: #f4ecdf; }
.board-wrap { margin: 1rem; background: #241c14; border-radius: 10px; padding: 1.25rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.board-row { display: flex; gap: 6px; margin: 0 0 6px; }
.tile { width: 4.25rem; height: 4.25rem; border: 2px solid transparent; padding: 0; display: grid; place-items: center; border-radius: 6px; }
.tile:disabled { opacity: 1; }
.zone-suelo { background: #c4b48a; }
.zone-lava { background: #e25b2a; }
.zone-agua { background: #3d7ec4; }
.tile.reach { border-color: #e6c27a; border-width: 3px; }
.tile.picked { box-shadow: inset 0 0 0 3px #241c14; }
.token { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.side-0 { background: #2f6fed; }
.side-1 { background: #c44536; }
.roster { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }
.unit { text-align: left; }
.unit:disabled { opacity: 1; }
.hp { height: 0.4rem; background: #3a3228; border-radius: 3px; margin: 0.35rem 0; overflow: hidden; }
.hp i { display: block; height: 100%; background: #7aaa55; }
.unit small { color: #a89880; }
.unit.on small { color: #6d5c48; }
.log { list-style: none; padding: 0; margin: 0.4rem 0 0; max-height: 38vh; overflow: auto; line-height: 1.45; }
.log li + li { margin-top: 0.3rem; }
@media (max-width: 800px) {
    .stage { grid-template-columns: 1fr; }
    .dock { border-left: 0; border-top: 1px solid #3a3228; }
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8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gMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem 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;
}
