.gender-map {
    position: relative;
    overflow: hidden;
    margin: 0 0 16px;
    border: 1px solid #d7e0eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(22, 32, 51, .12);
}

.gender-map__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 10px 16px 0;
}

.gender-map h1 {
    margin: 0;
    color: #162033;
    font-size: 26px;
    line-height: 1.05;
    font-weight: 800;
}

.gender-map__summary {
    margin: 3px 0 0;
    color: #657386;
    font-size: 14px;
    line-height: 1.45;
}

.gender-map__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.gender-map__toggle-pill {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid #d7e0eb;
    border-radius: 999px;
    background: #f8fbfd;
}

.gender-map__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 74px;
    min-height: 34px;
    border: 0;
    border-right: 1px solid #d7e0eb;
    background: rgba(255, 255, 255, .35);
    color: #657386;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.gender-map__toggle:last-child {
    border-right: 0;
}

.gender-map__toggle.is-active {
    background: #ffffff;
    color: #162033;
}

.gender-map__toggle span {
    min-width: 4.4ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.gender-map__toggle:not(.is-active) {
    opacity: .45;
}

.gender-map__toggle:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #162033;
    outline-offset: -2px;
}

.gender-map__dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    background: var(--dot);
}

.gender-map__icon {
    font-size: 18px;
    line-height: 1;
}

.gender-map__icon--man {
    color: #146bd8;
}

.gender-map__icon--woman {
    color: #d93f58;
}

.gender-map__controls {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(440px, 1.35fr);
    gap: 14px;
    align-items: center;
    padding: 6px 16px 2px;
}

.gender-map__field {
    display: grid;
    gap: 6px;
}

.gender-map__field label {
    margin: 0;
    color: #657386;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.gender-map__select {
    width: 100%;
    height: 38px;
    border: 1px solid #cfd9e5;
    border-radius: 6px;
    background: #fff;
    color: #162033;
    padding: 0 10px;
}

.gender-map__course-picker {
    position: relative;
    min-width: 0;
}

.gender-map__course-button {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #cfd9e5;
    border-radius: 6px;
    background: #fff;
    color: #162033;
    padding: 0 10px 0 14px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.gender-map__course-button:focus-visible {
    outline: 3px solid rgba(20, 107, 216, .18);
    outline-offset: 2px;
    border-color: #146bd8;
}

.gender-map__course-summary {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gender-map__course-caret {
    color: #657386;
    font-size: 21px;
    flex: 0 0 auto;
}

.gender-map__course-panel {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    z-index: 40;
    width: min(540px, calc(100vw - 32px));
    max-height: 392px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 8px;
    border: 1px solid #cfd9e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(22, 32, 51, .18);
    padding: 10px;
}

.gender-map__course-panel[hidden] {
    display: none;
}

.gender-map__course-search {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d7e1ec;
    border-radius: 6px;
    background: #f8fbfe;
    padding: 0 10px;
    margin: 0;
}

.gender-map__course-search .material-icons {
    color: #657386;
    font-size: 18px;
}

.gender-map__course-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #162033;
    font: inherit;
}

.gender-map__course-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #657386;
    font-size: 12px;
    font-weight: 700;
}

.gender-map__course-all,
.gender-map__course-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.gender-map__course-all input,
.gender-map__course-option input {
    width: 15px;
    height: 15px;
    accent-color: #146bd8;
}

.gender-map__course-list {
    max-height: 266px;
    overflow: auto;
    display: grid;
    gap: 2px;
    padding-right: 2px;
}

.gender-map__course-option {
    min-height: 30px;
    border-radius: 5px;
    padding: 4px 6px;
    color: #162033;
    font-size: 13px;
    line-height: 1.25;
}

.gender-map__course-option:hover,
.gender-map__course-option:has(input:focus-visible) {
    background: #eef5fc;
}

.gender-map__course-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gender-map__course-empty {
    border-top: 1px solid #e6edf5;
    color: #657386;
    font-size: 13px;
    padding: 8px 4px 2px;
}

.gender-map__years {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 0;
    align-items: center;
}

.gender-map__range-label {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #162033;
    font-size: 13px;
    font-weight: 700;
}

.gender-map__range-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}

.gender-map__play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #cfd9e5;
    border-radius: 999px;
    background: #ffffff;
    color: #162033;
    cursor: pointer;
    box-shadow: 0 3px 9px rgba(22, 32, 51, .08);
}

.gender-map__play i {
    display: block;
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 20px;
    text-align: center;
}

.gender-map__play:not(.is-playing) i {
    transform: translateX(1px);
}

.gender-map__play.is-playing {
    border-color: #657386;
    background: #657386;
    color: #ffffff;
}

.gender-map__play:focus-visible {
    outline: 2px solid #8b98a8;
    outline-offset: 2px;
}

.gender-map__range {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    height: 38px;
    min-width: 220px;
}

.gender-map__range-track {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 20px;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #d8e3ef;
    box-shadow: inset 0 1px 2px rgba(22, 32, 51, .14);
}

.gender-map__range-track span {
    position: absolute;
    left: var(--range-left, 0%);
    right: var(--range-right, 0%);
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: #8b98a8;
}

.gender-map__range-handle {
    position: absolute;
    left: 0;
    top: 13px;
    z-index: 5;
    width: 22px;
    height: 22px;
    transform: translateX(-50%) scale(.82);
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #657386;
    box-shadow: 0 3px 9px rgba(22, 32, 51, .3);
    opacity: 0;
    pointer-events: none;
}

.gender-map.is-playing-years .gender-map__range-handle {
    opacity: 1;
}

.gender-map__slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 38px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
}

.gender-map__slider--from {
    z-index: 3;
}

.gender-map__slider--to {
    z-index: 4;
}

.gender-map__slider::-webkit-slider-runnable-track {
    height: 8px;
    background: transparent;
}

.gender-map__slider::-moz-range-track {
    height: 8px;
    background: transparent;
}

.gender-map__slider::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -7px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #657386;
    box-shadow: 0 3px 9px rgba(22, 32, 51, .3);
    cursor: grab;
    pointer-events: auto;
    -webkit-appearance: none;
}

.gender-map.is-playing-years .gender-map__slider--to::-webkit-slider-thumb {
    opacity: 0;
}

.gender-map__slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #657386;
    box-shadow: 0 3px 9px rgba(22, 32, 51, .3);
    cursor: grab;
    pointer-events: auto;
}

.gender-map.is-playing-years .gender-map__slider--to::-moz-range-thumb {
    opacity: 0;
}

.gender-map__slider:active::-webkit-slider-thumb {
    cursor: grabbing;
}

.gender-map__slider:active::-moz-range-thumb {
    cursor: grabbing;
}

.gender-map__range-bubble {
    position: absolute;
    top: 0;
    z-index: 6;
    min-width: 42px;
    transform: translateX(-50%);
    border-radius: 999px;
    padding: 2px 7px;
    background: #657386;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

.gender-map__range-bubble--from {
    background: #657386;
}

.gender-map__range-bubble--to {
    background: #657386;
}

.gender-map__range-scale {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    justify-content: space-between;
    margin-top: -5px;
    padding: 0 6px;
    color: #657386;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gender-map__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    gap: 10px;
    align-items: stretch;
    margin: 8px 14px 12px;
}

.gender-map__year-chart {
    margin: 6px 14px 14px;
    padding-top: 14px;
    border-top: 1px solid #e4edf6;
}

.gender-map__year-chart .certificate-year-chart {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.gender-map__year-chart .certificate-year-chart__head {
    display: none;
}

.gender-map__year-chart .certificate-year-chart__plot {
    height: 288px;
    margin: 0;
    border-radius: 8px;
}

.gender-map__canvas-wrap {
    position: relative;
    height: clamp(390px, 36vw, 448px);
    min-height: 380px;
    min-width: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #eef5fb;
    user-select: none;
    touch-action: none;
}

.gender-map__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    user-select: none;
}

.gender-map__labels {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    pointer-events: none;
}

.gender-map__tag {
    position: absolute;
    display: inline-flex;
    gap: 5px;
    align-items: center;
    min-height: 27px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(22, 32, 51, .12);
    border-radius: 999px;
    padding: 4px 7px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 22px rgba(22, 32, 51, .12);
    backdrop-filter: blur(10px);
    pointer-events: none;
    white-space: nowrap;
}

.gender-map__tag img {
    width: 24px;
    height: 16px;
    flex: 0 0 auto;
    border-radius: 2px;
    opacity: 1;
    object-fit: cover;
    background: #eef2f6;
    box-shadow: 0 0 0 1px rgba(22, 32, 51, .12);
}

.gender-map__tag--hover {
    max-width: min(300px, calc(100vw - 28px));
    z-index: 1;
}

.gender-map__tag--hover.is-pinned {
    border-color: rgba(22, 32, 51, .38);
    box-shadow: 0 10px 28px rgba(22, 32, 51, .2);
}

.gender-map__tag strong {
    display: block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #162033;
    font-size: 11px;
    line-height: 1;
}

.gender-map__tag-count {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: #657386;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gender-map__tag-count i {
    font-size: 14px;
    line-height: 1;
}

.gender-map__below {
    display: grid;
    grid-template-columns: minmax(230px, .55fr) minmax(420px, 1.45fr);
    gap: 14px;
    margin: 0 18px 18px;
}

.gender-map__metric {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(22, 32, 51, .12);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
}

.gender-map__metric-label {
    color: #657386;
    font-size: 12px;
}

.gender-map__metric strong {
    color: #162033;
    font-size: 32px;
    line-height: 1;
}

.gender-map__balance {
    display: flex;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(101, 115, 134, .2);
}

.gender-map__balance i {
    display: block;
}

.gender-map__detail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    color: #657386;
    font-size: 12px;
}

.gender-map__detail span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.gender-map__detail i {
    font-size: 18px;
}

.gender-map__detail b {
    display: block;
    color: #162033;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.gender-map__toplist {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid rgba(22, 32, 51, .12);
    border-radius: 8px;
    padding: 7px 9px;
    background: #ffffff;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.gender-map__toplist-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 6px;
}

.gender-map__toplist h2 {
    margin: 0;
    color: #657386;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.gender-map__toplist-year {
    color: #162033;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.gender-map__race {
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.gender-map__race-row {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 20px minmax(80px, 104px) minmax(0, 1fr) 40px;
    gap: 5px;
    align-items: center;
    height: 28px;
    padding: 0 2px;
    border-radius: 4px;
    background: #ffffff;
    color: #162033;
    transform: translateY(0);
    transition: transform .62s cubic-bezier(.16, .82, .24, 1), opacity .16s ease;
    will-change: transform, opacity;
}

.gender-map.is-playing-years .gender-map__race-row {
    transition: transform .72s cubic-bezier(.16, .82, .24, 1), opacity .16s ease;
}

.gender-map__race-row.is-exiting {
    pointer-events: none;
}

.gender-map__race-row.is-summary {
    grid-template-columns: 20px minmax(0, 1fr) 54px;
}

.gender-map__race-row.is-summary .gender-map__race-bar {
    display: none;
}

.gender-map__race-rank {
    display: grid;
    place-items: center;
    color: #657386;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gender-map__race-country {
    min-width: 0;
}

.gender-map__race-country span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gender-map__race-country span {
    color: #3b4656;
    font-size: 12px;
    font-weight: 800;
}

.gender-map__race-row.is-others .gender-map__race-country span {
    color: #657386;
}

.gender-map__race-row.is-total {
    border-top: 1px solid #e3ebf4;
}

.gender-map__race-row.is-total .gender-map__race-country span,
.gender-map__race-row.is-total .gender-map__race-total {
    color: #0b1628;
}

.gender-map__race-country small {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
    color: #657386;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.gender-map__race-country small .material-icons {
    font-size: 14px;
    line-height: 1;
}

.gender-map__race-country small b:first-of-type {
    color: #b92741;
}

.gender-map__race-country small b:last-of-type {
    color: #0e5ec4;
}

.gender-map__race-bar {
    position: relative;
    display: flex;
    align-items: center;
    height: 24px;
    min-width: 0;
}

.gender-map__race-track {
    display: flex;
    width: 100%;
    height: 19px;
    overflow: hidden;
    border-radius: 4px;
    background: transparent;
}

.gender-map__race-fill {
    display: block;
    width: 0;
    height: 100%;
    min-width: 0;
    transition: width .58s cubic-bezier(.16, .82, .24, 1), min-width .2s linear;
    will-change: width;
}

.gender-map.is-playing-years .gender-map__race-fill {
    transition-duration: .62s;
}

.gender-map__race-fill--ms {
    background: #d93f58;
}

.gender-map__race-fill--mr {
    background: #146bd8;
}

.gender-map__race-fill--other {
    background: transparent;
}

.gender-map__race-flag-wrap {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    transform: translate(-50%, -50%);
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #ffffff;
    transition: left .58s cubic-bezier(.16, .82, .24, 1), opacity .16s ease;
    pointer-events: none;
}

.gender-map.is-playing-years .gender-map__race-flag-wrap {
    transition-duration: .62s;
}

.gender-map__race-flag-wrap img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.gender-map__race-flag-wrap[hidden],
.gender-map__race-flag-wrap img[hidden] {
    display: none;
}

.gender-map__race-total {
    color: #162033;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: right;
}


.gender-map__status {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(22, 32, 51, .12);
    border-radius: 999px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, .92);
    color: #657386;
    font-size: 13px;
    box-shadow: 0 12px 28px rgba(22, 32, 51, .12);
}

.gender-map__status[hidden] {
    display: none;
}

@media (max-width: 991px) {
    .gender-map__head,
    .gender-map__controls {
        grid-template-columns: 1fr;
    }

    .gender-map__legend {
        justify-content: flex-start;
    }

    .gender-map__main {
        grid-template-columns: 1fr;
    }

    .gender-map__canvas-wrap {
        height: 420px;
    }
}

@media (max-width: 640px) {
    .gender-map h1 {
        font-size: 22px;
    }

    .gender-map__race-row {
        grid-template-columns: 20px minmax(76px, 94px) minmax(0, 1fr) 38px;
        gap: 5px;
        height: 28px;
        padding: 0 2px;
    }

    .gender-map__race-rank {
        font-size: 11px;
    }

    .gender-map__race-country span {
        font-size: 12px;
    }

    .gender-map__race-country small {
        gap: 2px;
        font-size: 10px;
    }

    .gender-map__race-country small .material-icons {
        font-size: 12px;
    }

    .gender-map__race-track {
        height: 18px;
    }

    .gender-map__race-flag-wrap {
        width: 22px;
        height: 22px;
    }

    .gender-map__race-total {
        font-size: 12px;
    }

    .gender-map__detail {
        grid-template-columns: 1fr;
    }

    .gender-map__canvas-wrap {
        height: 390px;
        min-height: 390px;
    }

    .gender-map__main {
        margin-left: 10px;
        margin-right: 10px;
    }
}
