:root { --gold: var(--accent); --blue: #6bbfd7; --red: #e87681; --portrait: 62px; --equip: 32px; --stat: 34px; --money: 64px; }
#view-2d {
    display: grid;
    grid-template-columns: minmax(0,1fr) clamp(350px,36vw,500px);
    min-height: 0;
    overflow: hidden;
}
.arena {
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    container-type: size;
    border-right: 1px solid var(--line);
    background: #131f29;
    overflow: hidden;
}
#map {
    position: relative;
    width: min(100cqw,100cqh);
    aspect-ratio: 1;
    isolation: isolate;
    overflow: hidden;
}
#map-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
#map-image.flipped {
    transform: rotate(180deg);
}
#markers {
    position: absolute;
    inset: 0;
}
#map-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 13px;
}
.scoreboard {
    display: grid;
    grid-template-rows: 28px minmax(0,1fr);
    min-height: 0;
    min-width: 0;
    background: linear-gradient(125deg,#162c38,#101d28);
}
.score-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding: 0 12px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .6px;
}
.stats {
    display: grid;
    grid-template-columns: repeat(3,var(--stat)) var(--money);
    text-align: center;
    align-items: center;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.heroes {
    display: grid;
    grid-auto-rows: minmax(0,1fr);
    min-height: 0;
    overflow: auto;
}
.hero-row {
    display: grid;
    grid-template-columns: var(--portrait) minmax(0,1fr);
    gap: 10px;
    align-content: center;
    padding: 5px 12px;
    border-bottom: 1px solid #29404c;
    text-align: left;
    width: 100%;
    position: relative;
    min-height: 96px;
}
.hero-row:last-child {
    border-bottom: 0;
}
.hero-row:hover {
    background: #ffffff04;
}
.hero-row.selected {
    background: #ffffff08;
    box-shadow: inset 2px 0 var(--gold);
}
.hero-badge {
    position: relative;
    width: var(--portrait);
    height: var(--portrait);
    align-self: center;
    border: 1px solid #806c64;
    box-shadow: 0 0 0 2px #091924;
}
.hero-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-badge .level {
    position: absolute;
    bottom: -1px;
    left: -1px;
    min-width: 17px;
    font-size: 11px;
    background: #0c1826d9;
    padding: 0 3px;
    text-align: center;
    color: #e8dfc7;
}
.hero-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hero-top {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 6px;
}
.hero-names {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}
.hero-name {
    font-size: 16px;
    color: #c2d6e6;
    flex-shrink: 0;
}
.nickname {
    color: #dc7c88;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-top .stats {
    font-size: 17px;
    font-weight: 400;
    color: #c7d7e4;
}
.loadout {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: var(--equip);
}
.item-slot,.summoner {
    height: var(--equip);
    width: var(--equip);
    flex-shrink: 0;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #081a26a6;
    box-shadow: inset 0 0 0 1px #233c4b;
    overflow: hidden;
}
.item-slot img,.summoner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.summoner {
    margin-right: 5px;
    box-shadow: 0 0 0 1px #82764d;
}
.summoner b {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: #081420ad;
    font-size: 12px;
    color: #fff;
    text-shadow: 0 1px 2px #000;
}
.item-slot span {
    font-size: 9px;
    color: #9cb1bd;
}
.cooldowns {
    display: flex;
    color: #7794a6;
    white-space: nowrap;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    overflow: visible;
    gap: 6px;
    min-height: 22px;
}
.cooldown {
    text-overflow: ellipsis;
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px #315263;
}
.cooldown b {
    font-weight: 400;
    margin-left: 4px;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    color: #fff;
    background: #081420aa;
    font-size: 10px;
    text-shadow: 0 1px 2px #000;
}
.cooldown.ready b {
    color: #7dacb6;
    background: none;
}
.empty {
    color: var(--muted);
    margin: 0;
    display: grid;
    place-items: center;
    min-height: 40px;
    font-size: 12px;
}
.ally,.self {
    --team: var(--blue);
}
.enemy {
    --team: var(--red);
}
.unknown {
    --team: #aab3c5;
}
.marker {
    --hp: 1turn;
    position: absolute;
    transform: translate(-50%,-50%);
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(var(--team) var(--hp),#14232bc9 0);
    box-shadow: 0 1px 5px #000a;
    z-index: 4;
    transition: opacity .12s;
}
.marker .portrait {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.marker.selected {
    z-index: 6;
    filter: drop-shadow(0 0 3px #fff9);
}
.marker.unseen {
    opacity: .38;
}
.marker.dead {
    opacity: .6;
}
.unit-marker {
    position: absolute;
    transform: translate(-50%,-50%);
    pointer-events: none;
    z-index: 2;
    width: 8px;
    height: 8px;
}
.unit-marker.soldier {
    width: 5px;
    height: 5px;
    background: var(--team);
    border: 1px solid #ffffff60;
    border-radius: 50%;
    box-shadow: 0 1px 2px #0007;
}
.unit-marker.tower {
    width: 36px;
    height: 36px;
}
.unit-marker.monster {
    width: 17px;
    height: 17px;
}
.unit-marker.monster.boss {
    width: 64px;
    height: 64px;
    z-index: 3;
}
.unit-marker img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px #0009);
}
.tower-fill,.tower-outline {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.unit-marker.cooling img {
    opacity: .32;
    filter: grayscale(1);
}
.respawn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    color: #efd899;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 1px 3px #000,0 0 3px #000;
    line-height: 1;
}
.boss .respawn {
    font-size: 15px;
}
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-thumb {
    background: #354855;
}
.cooldown img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cooldown.no-art {
    width: auto;
    border-radius: 2px;
    padding: 3px 5px;
    box-shadow: none;
    display: flex;
    gap: 4px;
    font-size: 9px;
    background: #0b1e29;
}
.cooldown.no-art b {
    position: static;
    background: none;
}
@media(min-width:1600px) {
    :root {
        --portrait: 76px;
        --equip: 38px;
        --stat: 44px;
        --money: 84px;
    }
    .hero-name {
        font-size: 19px;
    }
    .nickname {
        font-size: 17px;
    }
    .hero-top .stats {
        font-size: 21px;
    }
    .cooldowns {
        font-size: 12px;
    }
    .hero-info {
        gap: 9px;
    }
}
@media(max-width:1100px) {
    :root {
        --portrait: 48px;
        --equip: 27px;
        --stat: 25px;
        --money: 49px;
    }
    .hero-row {
        gap: 7px;
        padding: 4px 8px;
        min-height: 83px;
    }
    .hero-name {
        font-size: 13px;
    }
    .nickname {
        font-size: 11px;
    }
    .hero-top .stats {
        font-size: 14px;
    }
    .hero-names {
        gap: 5px;
    }
    .loadout {
        gap: 5px;
    }
    .hero-info {
        gap: 5px;
    }
    .score-heading {
        padding: 0 8px;
    }
    .connection {
        max-width: 120px;
    }
    .cooldown {
        width: 19px;
        height: 19px;
    }
    .cooldowns {
        min-height: 19px;
    }
}
@media(max-height:700px) and (min-width:701px) {
    :root {
        --header: 38px;
        --portrait: 48px;
        --equip: 26px;
    }
    .hero-row {
        min-height: 79px;
    }
    .hero-info {
        gap: 3px;
    }
    .marker {
        width: 40px;
        height: 40px;
    }
    .cooldowns {
        font-size: 9px;
        min-height: 18px;
    }
    .cooldown {
        width: 18px;
        height: 18px;
    }
}
@media(max-width:700px) {
    :root {
        --portrait: 42px;
        --equip: 24px;
        --stat: 27px;
        --money: 48px;
    }
    #view-2d {
        grid-template-columns: 1fr;
        grid-template-rows: 48% minmax(0,1fr);
    }
    .arena {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .scoreboard {
        grid-template-rows: 22px minmax(0,1fr);
    }
    .hero-row {
        min-height: 79px;
    }
    .hero-name {
        font-size: 12px;
    }
    .nickname {
        font-size: 11px;
    }
    .hero-top .stats {
        font-size: 13px;
    }
    .loadout {
        gap: 6px;
    }
    .hero-info {
        gap: 3px;
    }
    .hero-names {
        gap: 8px;
    }
    .cooldowns {
        font-size: 9px;
        gap: 6px;
    }
    .marker {
        width: 34px;
        height: 34px;
        padding: 2.5px;
    }
    .unit-marker.tower {
        width: 29px;
        height: 29px;
    }
    .unit-marker.monster.boss {
        width: 48px;
        height: 48px;
    }
}

