.building-city-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: -10px 0 32px;
}

.building-city-tabs button {
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid #dfe5ec;
    border-radius: 999px;
    background: #fff;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.building-city-tabs button:hover,
.building-city-tabs button:focus-visible {
    border-color: rgba(21, 59, 99, .34);
    color: #0d2948;
    outline: 0;
}

.building-city-tabs button.is-active,
.building-city-tabs button[aria-selected="true"] {
    border-color: #0d2948;
    background: #0d2948;
    color: #fff;
    box-shadow: 0 8px 20px rgba(13, 41, 72, .14);
}

/* 현장 카드의 가장 가까운 지하철은 내용 너비만 차지하는 컴팩트 정보로 표시합니다. */
.building-card__station {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-height: 31px;
    align-items: center;
    gap: 7px;
    margin: 12px 0 0;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f7f9fc;
    color: #506174;
    font-size: 11px;
    line-height: 1.2;
    vertical-align: top;
}

.building-card__station-icon,
.building-card__station-line {
    display: inline-grid;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    place-items: center;
    border-radius: 50%;
    background: #526177;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    box-shadow: 0 2px 7px rgba(16, 36, 62, .14);
}

.building-card__station-lines {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
}

.building-card__station strong {
    min-width: 0;
    overflow: hidden;
    color: #18314e;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.building-card__station-distance {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    color: #6f7d8f;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    white-space: nowrap;
}

.building-card__station-distance::before {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #a5afbc;
    content: "";
}

.building-card__station-distance-label {
    color: #929cab;
    font-size: 9px;
    font-weight: 500;
}

.building-card__station-line.is-line-1 {
    background: #0052a4;
}

.building-card__station-line.is-line-2 {
    background: #00a84d;
}

.building-card__station-line.is-line-3 {
    background: #ef7c1c;
}

.building-card__station-line.is-line-4 {
    background: #00a5de;
}

.building-card__station-line.is-line-5 {
    background: #996cac;
}

.building-card__station-line.is-line-6 {
    background: #cd7c2f;
}

.building-card__station-line.is-line-7 {
    background: #747f00;
}

.building-card__station-line.is-line-8 {
    background: #e6186c;
}

.building-card__station-line.is-line-9 {
    background: #bdb092;
    color: #172033;
}

.building-card__station-line.is-line-airport {
    background: #0090d2;
}

.building-card__station-line.is-line-gyeongui-jungang {
    background: #77c4a3;
    color: #16362e;
}

.building-card__station-line.is-line-gyeongchun {
    background: #0c8e72;
}

.building-card__station-line.is-line-suin-bundang {
    background: #f5a200;
    color: #2b2100;
}

.building-card__station-line.is-line-shinbundang {
    background: #d4003b;
}

.building-card__station-line.is-line-seohae {
    background: #8fc31f;
    color: #1d2a00;
}

.building-card__station-line.is-line-incheon-1 {
    background: #7ca8d5;
    color: #14263c;
}

.building-card__station-line.is-line-incheon-2 {
    background: #ed8b00;
}

.building-card__station-line.is-line-ui-sinseol {
    background: #b7c452;
    color: #263000;
}

.building-card__station-line.is-line-sillim {
    background: #6789ca;
}

.building-card__station-line.is-line-gimpo-gold {
    background: #a17800;
}

.building-card__station-line.is-line-other {
    background: #526177;
}

@media (max-width: 620px) {
    .building-city-tabs {
        width: calc(100% + 28px);
        margin: -6px -14px 25px;
        padding: 0 14px 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .building-city-tabs::-webkit-scrollbar {
        display: none;
    }

    .building-city-tabs button {
        min-height: 40px;
        flex: 0 0 auto;
        padding: 0 18px;
        font-size: 12px;
    }

    .building-card__station {
        max-width: 100%;
        margin-top: 10px;
    }

    .building-card__station strong {
        max-width: min(42vw, 160px);
    }

    .building-card__station-distance-label {
        display: none;
    }
}

@media (max-width: 380px) {
    .building-card__station {
        gap: 5px;
        padding-right: 7px;
        padding-left: 6px;
    }

    .building-card__station strong {
        max-width: 34vw;
    }
}
