.main {
    max-width: 500px;
    margin: .5rem auto;
    padding: 0 .5rem;
}
p {
    margin: 0;
}
a, a:visited, a:hover {color: #0000FF; text-decoration: underline;}
h1 {font-size: 2rem}
ul, li {
    margin: 0;
    padding: 0;
    list-style: none;
}
ul.sub > li{
    margin-left: 2rem;
    list-style: disc;
}

.warning, .error, .red {color: red !important;}
.success, .green {color: green !important;}

.link {
    color: #0000FF;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 1rem;
    background: none;
    text-decoration: underline;
}

.map {
    font-family: monospace;
    padding: 10px;
    background-color: black;
    max-width: fit-content;
    line-height: 16px;
}

.tile {
    display: inline-block;
    width: 16px;
    height: 16px;
    font-family: "Noto Mono", "IBM Plex Mono", "WenQuanYi Micro Hei Mono", monospace;
    font-size: 17px;
    text-align: center;
}

.eq_0 { color:#000000; }
.eq_1 { color:#008800; }
.eq_2 { color:#880088; }
.eq_3 { color:#CC0000; }
.eq_4 { color:#FF6600; }
.eq_5 { color:#FFD700; }

a:has(.eq_0) { text-decoration-color: #000000; }
a:has(.eq_1) { text-decoration-color: #008800; }
a:has(.eq_2) { text-decoration-color: #880088; }
a:has(.eq_3) { text-decoration-color: #CC0000; }
a:has(.eq_4) { text-decoration-color: #FF6600; }
a:has(.eq_5) { text-decoration-color: #FFD700; }
.battle-layout {
    display: flex;
    justify-content: space-between;
    gap: 0.3rem;
    margin: 0.5rem 0;
    font-size: 0.75rem;
    line-height: 1.2;
}
.battle-side {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}
.battle-row {
    display: flex;
    justify-content: space-between;
    gap: 0.15rem;
}
.battle-unit {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 0.15rem 0.05rem;
    border: 1px solid #ddd;
    border-radius: 0.1rem;
    background: #fafafa;
    overflow: hidden;
}
.battle-unit.empty {
    visibility: hidden;
    border-color: transparent;
    background: transparent;
}
.battle-name {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.72rem;
}
.battle-hpbar {
    height: 3px;
    background: #e0e0e0;
    border-radius: 1px;
    margin: 0.15rem 0;
    overflow: hidden;
}
.battle-hpbar > div {
    height: 100%;
    background: #ff4444;
}
.battle-nums {
    font-size: 0.7rem;
    white-space: nowrap;
}
.battle-hp {
    color: #d00;
}
.battle-mp {
    color: #06c;
}
.battle-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #c00;
    flex-shrink: 0;
    padding: 0 0.15rem;
    font-size: 0.8rem;
}

.boss-section {
    margin: 0.5rem 0;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    background: #fafafa;
}

.boss-name {
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 0.3rem;
}

.boss-hpbar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 0.3rem 0;
    overflow: hidden;
}

.boss-hpbar > div {
    height: 100%;
    background: #ff4444;
}

.boss-nums {
    text-align: center;
    font-size: 0.8rem;
}
