/*
 * World-only extensions layered on top of the shared v247 country design.
 * These rules are extracted from the existing World design system and are
 * intentionally limited to the country picker, language picker and map page.
 */

/* Shared flag sizing --------------------------------------------------- */

.country-flag-img {
    display: inline-block;
    width: 24px;
    max-width: 24px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 3px;
    background: transparent;
    box-shadow: none;
    object-fit: cover;
    vertical-align: -0.2em;
}

/* Country selection ---------------------------------------------------- */

.world-country-picker {
    display: block;
    margin: 0 4px 18px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.world-country-picker:hover {
    border-color: color-mix(in srgb, var(--text) 20%, var(--line));
    background: var(--surface-2);
}

.world-country-picker-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 1px 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 760;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.world-country-link-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--bg);
}

.world-country-link-icon {
    width: 24px;
    height: 18px;
    overflow: hidden;
    border-radius: 3px;
}

.world-country-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.world-country-link-name {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.world-country-link-arrow {
    color: var(--muted);
    font-size: 20px;
}

/* Country directory --------------------------------------------------- */

.country-preview-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.country-preview-grid a {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 58px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.country-preview-grid img {
    width: 32px;
    max-width: 32px;
    height: 24px;
    object-fit: cover;
}

.country-preview-grid span {
    overflow: hidden;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-directory-countries .country-directory-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.route-directory-countries .country-directory-hero h1 {
    margin: 0;
    font-size: clamp(30px, 3.4vw, 50px);
    font-weight: 760;
    line-height: 1;
    letter-spacing: -0.05em;
}

.route-directory-countries .country-directory-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.route-directory-countries .country-directory-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 12px 32px rgb(13 13 13 / 4%);
}

html[data-theme="dark"] .route-directory-countries .country-directory-shell {
    box-shadow: 0 12px 32px rgb(0 0 0 / 18%);
}

.route-directory-countries .country-directory-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.route-directory-countries .country-directory-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.route-directory-countries .country-directory-meta strong {
    color: var(--text);
}

.route-directory-countries .country-directory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    padding: 14px;
}

.route-directory-countries .country-directory-grid[hidden],
.route-directory-countries .country-directory-card[hidden],
.route-directory-countries .country-directory-empty[hidden] {
    display: none !important;
}

.route-directory-countries .country-directory-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 72px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.route-directory-countries .country-directory-card:hover {
    border-color: var(--faint);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.route-directory-countries .directory-card__flag {
    display: grid;
    place-items: center;
    width: 44px;
    height: 32px;
    overflow: hidden;
    border-radius: 5px;
}

.route-directory-countries .directory-card__flag img {
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
}

.route-directory-countries .directory-card__copy {
    min-width: 0;
}

.route-directory-countries .directory-card__copy strong,
.route-directory-countries .directory-card__copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-directory-countries .directory-card__copy strong {
    font-size: 14px;
}

.route-directory-countries .directory-card__copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.route-directory-countries .directory-card__end {
    color: var(--muted);
    font-size: 20px;
}

.route-directory-countries .country-directory-empty {
    width: calc(100% - 28px);
    margin: 14px;
    padding: 28px 22px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

@media (max-width: 1180px) {
    .route-directory-countries .country-directory-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .country-preview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .route-directory-countries .country-directory-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .route-directory-countries .country-directory-toolbar {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }
}

@media (max-width: 760px) {
    .country-preview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .route-directory-countries .country-directory-shell {
        border-radius: 17px;
    }

    .route-directory-countries .country-directory-toolbar {
        padding: 10px;
    }

    .route-directory-countries .country-directory-meta {
        padding: 10px 12px;
    }

    .route-directory-countries .country-directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 10px;
    }
}

@media (max-width: 440px) {
    .route-directory-countries .country-directory-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 390px) {
    .country-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .country-preview-grid a {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 7px;
        padding: 8px;
    }

    .country-preview-grid img {
        width: 28px;
        max-width: 28px;
        height: 21px;
    }

    .route-directory-countries .country-directory-card {
        grid-template-columns: 38px minmax(0, 1fr) auto;
    }

    .route-directory-countries .directory-card__flag {
        width: 38px;
        height: 28px;
    }
}

/* Language selection --------------------------------------------------- */

.world-language-picker {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 76px;
    width: 76px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.world-language-picker:hover,
.world-language-picker:focus-within {
    border-color: var(--text);
    background: var(--surface-2);
}

.world-language-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    color: var(--muted);
    pointer-events: none;
}

.world-language-icon > svg {
    width: 16px;
    height: 16px;
}

.world-language-select {
    appearance: none;
    width: 100%;
    height: 100%;
    padding: 0 22px 0 7px;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font-size: 13px;
    font-weight: 760;
    cursor: pointer;
}

.world-language-select:focus-visible {
    outline: 2px solid var(--focus, var(--blue));
    outline-offset: 3px;
}

.world-language-arrow {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 6px;
    height: 6px;
    border-right: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
    color: var(--muted);
    pointer-events: none;
    transform: translateY(-66%) rotate(45deg);
}

/* World map states ----------------------------------------------------- */

.route-world .eyebrow {
    display: block;
    margin: 0 0 8px;
    color: var(--section-accent);
    font-size: 11px;
    font-weight: 780;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.route-world .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.route-world .utility-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
}

.route-world .utility-card__copy {
    min-width: 0;
}

.route-world .utility-card h2,
.route-world .utility-card h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.route-world .utility-card p {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.route-world .utility-card--empty,
.route-world .utility-card--unavailable {
    align-items: flex-start;
    flex-direction: column;
    border-style: dashed;
}

.world-map-state {
    min-height: clamp(300px, 45vh, 520px);
    padding: clamp(28px, 6vw, 70px);
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 38%, var(--surface)), var(--surface));
}

.world-map-state .utility-card__copy {
    max-width: 620px;
}

.route-world .error-state.world-map-state {
    text-align: left;
}

.route-world .error-state.world-map-state h2 {
    margin: 0;
    color: var(--text);
}

.route-world .error-state.world-map-state .button-link {
    margin-top: 16px;
}

/* Interactive World map ------------------------------------------------
 * Geometry comes from the final v257_Monde SVG; markers and list rows are
 * rendered only from coordinate-backed API stations.
 */

.world-map-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin: 0 0 20px;
}

.world-map-hero h1 {
    margin: 0;
    font-size: clamp(30px, 3.4vw, 50px);
    font-weight: 760;
    line-height: 1;
    letter-spacing: -0.05em;
}

.world-map-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.world-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: stretch;
    gap: 14px;
}

.world-map-card,
.world-stations-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-soft, 0 12px 32px rgb(13 13 13 / 4%));
}

.world-map-toolbar {
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
    border-bottom: 1px solid var(--line);
}

.world-map-search {
    position: relative;
    z-index: 12;
}

.world-map-search > svg {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 17px;
    height: 17px;
    color: var(--muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.world-map-search input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.world-map-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.world-map-search-clear {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.world-map-search-clear[hidden] {
    display: none;
}

.world-map-search .world-map-search-clear svg {
    position: static;
    width: 17px;
    height: 17px;
    color: currentColor;
    transform: none;
}

.world-map-autocomplete {
    position: absolute;
    z-index: 40;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    max-height: min(390px, 52vh);
    padding: 6px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
    box-shadow: 0 18px 44px rgb(0 0 0 / 17%);
    backdrop-filter: blur(16px);
}

.world-map-autocomplete[hidden] {
    display: none;
}

.world-map-suggestion {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.world-map-suggestion:hover,
.world-map-suggestion.is-highlighted {
    background: var(--surface-2);
}

.world-map-suggestion-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    color: var(--brand);
}

.world-map-suggestion-icon-city {
    background: color-mix(in srgb, #7b5ec7 10%, var(--surface));
    color: #7b5ec7;
}

.world-map-suggestion-icon-country {
    background: var(--surface-2);
    color: var(--text);
}

.world-map-search .world-map-suggestion-icon svg {
    position: static;
    width: 18px;
    height: 18px;
    color: currentColor;
    transform: none;
}

.world-map-suggestion-copy {
    min-width: 0;
}

.world-map-suggestion-copy strong,
.world-map-suggestion-copy small {
    display: block;
    overflow: hidden;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.world-map-suggestion-copy strong {
    font-size: 14px;
}

.world-map-suggestion-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.world-map-stage {
    position: relative;
    height: clamp(460px, 61vh, 690px);
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 35%, var(--bg)), var(--bg));
    cursor: grab;
    touch-action: none;
}

.world-map-stage.is-dragging {
    cursor: grabbing;
}

.world-map-svg {
    display: block;
    width: 100%;
    height: 100%;
    outline: 0;
}

.world-map-svg:focus-visible {
    box-shadow: inset 0 0 0 3px var(--focus, var(--blue));
}

.world-map-grid-line {
    stroke: color-mix(in srgb, var(--muted) 18%, transparent);
    stroke-width: 0.7;
    vector-effect: non-scaling-stroke;
}

.world-land {
    fill: color-mix(in srgb, var(--text) 9%, var(--surface));
    stroke: color-mix(in srgb, var(--text) 31%, var(--line));
    stroke-width: 0.82;
    vector-effect: non-scaling-stroke;
}

html[data-theme="dark"] .world-land {
    fill: color-mix(in srgb, var(--text) 12%, var(--surface));
    stroke: color-mix(in srgb, var(--text) 35%, var(--line));
}

.world-country {
    transition: fill 0.16s ease, stroke 0.16s ease;
}

.world-country:hover {
    fill: color-mix(in srgb, var(--brand) 9%, var(--surface));
    stroke: color-mix(in srgb, var(--brand) 48%, var(--line));
}

.world-map-label {
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.14s ease;
}

.world-map-label.is-label-hidden {
    display: none;
}

.world-country-label-text {
    fill: color-mix(in srgb, var(--text) 92%, transparent);
    stroke: color-mix(in srgb, var(--surface) 95%, transparent);
    stroke-width: 3.8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 760;
    letter-spacing: -0.018em;
    paint-order: stroke;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.world-city-label circle {
    fill: color-mix(in srgb, var(--text) 55%, transparent);
    stroke: color-mix(in srgb, var(--surface) 94%, transparent);
    stroke-width: 1.8;
    vector-effect: non-scaling-stroke;
}

.world-city-label text {
    fill: color-mix(in srgb, var(--text) 78%, transparent);
    stroke: color-mix(in srgb, var(--surface) 96%, transparent);
    stroke-width: 3.2px;
    font-family: inherit;
    font-size: 11.2px;
    font-weight: 560;
    paint-order: stroke;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.world-marker {
    color: var(--brand);
    cursor: pointer;
    transform-box: fill-box;
    transform-origin: center;
}

.world-marker .marker-halo {
    fill: color-mix(in srgb, var(--brand) 18%, transparent);
    transition: r 0.15s, opacity 0.15s;
}

.world-marker .marker-core {
    fill: var(--brand);
    stroke: #ffffff;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.world-marker:hover .marker-halo,
.world-marker.is-active .marker-halo {
    r: 12;
    opacity: 1;
}

.world-marker.is-hidden {
    display: none;
}

.world-map-controls {
    position: absolute;
    z-index: 5;
    top: 12px;
    right: 12px;
    display: grid;
    gap: 6px;
}

.world-map-control {
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: 0 7px 18px rgb(0 0 0 / 10%);
    color: var(--text);
    font: inherit;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.world-map-control:hover {
    background: var(--surface-2);
}

.world-map-control svg {
    width: 20px;
    height: 20px;
}

.world-map-legend {
    position: absolute;
    z-index: 4;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--muted);
    font-size: 11px;
    backdrop-filter: blur(8px);
}

.world-map-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 17%, transparent);
}

.world-map-detail {
    position: absolute;
    z-index: 6;
    right: 66px;
    bottom: 12px;
    left: 12px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    max-width: 430px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    box-shadow: 0 12px 28px rgb(0 0 0 / 14%);
    backdrop-filter: blur(12px);
}

.world-map-detail[hidden] {
    display: none;
}

.world-map-detail-logo {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    overflow: hidden;
    place-items: center;
    border-radius: 12px;
    background: #0d0d0d;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.world-map-detail-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--surface);
}

.world-map-detail-copy {
    min-width: 0;
}

.world-map-detail-copy strong,
.world-map-detail-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.world-map-detail-copy span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.world-map-detail-play {
    display: grid;
    padding: 0;
    border: 0;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: var(--bg);
}

.world-map-detail-play svg {
    width: 17px;
    height: 17px;
}

.world-stations-panel {
    display: flex;
    flex-direction: column;
}

.world-stations-head {
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.world-stations-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.025em;
}

.world-stations-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.world-stations-list {
    display: block;
    height: calc(clamp(460px, 61vh, 690px) + 71px);
    padding: 8px;
    overflow: auto;
    scrollbar-color: var(--line) transparent;
    scrollbar-width: thin;
}

.world-station-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 66px;
    padding: 8px;
    border-radius: 13px;
    color: var(--text);
    text-decoration: none;
}

.world-station-row:hover,
.world-station-row.is-active {
    background: var(--surface-2);
}

.world-station-row-logo {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    overflow: hidden;
    place-items: center;
    border-radius: 11px;
    background: #0d0d0d;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
}

.world-station-row-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--surface);
}

.world-station-row-copy {
    min-width: 0;
}

.world-station-row-copy strong,
.world-station-row-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.world-station-row-copy strong {
    font-size: 13px;
}

.world-station-row-copy small {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.world-station-row-copy small > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.world-station-row-flag {
    flex: 0 0 auto;
    width: 18px;
    height: 13px;
    overflow: hidden;
    border-radius: 3px;
}

.world-station-row-flag img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.world-station-row-arrow {
    color: var(--faint);
    font-size: 18px;
}

.world-map-empty {
    padding: 35px 14px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.world-map-empty[hidden] {
    display: none;
}

/* Responsive World extensions ----------------------------------------- */

@media (max-width: 1180px) {
    .world-map-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
    }
}

@media (max-width: 980px) {
    .world-language-picker {
        display: grid;
        place-items: center;
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .world-language-icon {
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        width: 100%;
        height: 100%;
        margin: 0;
        color: var(--text);
    }

    .world-language-icon > svg {
        width: 17px;
        height: 17px;
        margin: 0;
    }

    .world-language-select {
        position: absolute;
        inset: 0;
        padding: 0;
        opacity: 0;
    }

    .world-language-arrow {
        display: none;
    }

    .world-map-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .world-map-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .world-map-stage {
        height: 520px;
    }

    .world-stations-list {
        height: auto;
        max-height: 390px;
    }
}

@media (max-width: 720px) {
    .world-map-card,
    .world-stations-panel {
        border-radius: 17px;
    }

    .world-map-toolbar {
        padding: 10px;
    }

    .world-map-stage {
        height: 430px;
    }

    .world-map-detail {
        right: 12px;
        bottom: 62px;
    }

    .world-map-legend {
        bottom: 12px;
    }

    .world-map-autocomplete {
        top: calc(100% + 5px);
        max-height: 310px;
        border-radius: 12px;
    }

    .world-map-suggestion {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
        min-height: 54px;
        padding: 7px 8px;
    }

    .world-map-suggestion-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .world-map-suggestion-copy strong {
        font-size: 13px;
    }
}

@media (max-width: 440px) {
    .world-map-stage {
        height: 380px;
    }

    .world-map-controls {
        top: 8px;
        right: 8px;
    }

    .world-map-detail {
        right: 8px;
        bottom: 59px;
        left: 8px;
    }

    .world-map-legend {
        bottom: 8px;
        left: 8px;
    }
}

@media (max-width: 390px) {
    .world-language-picker {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
    }

    .world-map-hero h1 {
        font-size: 32px;
    }

    .world-map-detail {
        grid-template-columns: 38px minmax(0, 1fr) 44px;
        gap: 8px;
        padding: 8px;
    }

    .world-map-detail-logo {
        width: 38px;
        height: 38px;
    }
}

@media (hover: none), (pointer: coarse) {
    .world-language-picker,
    .world-map-control,
    .world-marker {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }
}

@media (prefers-reduced-motion: reduce) {
    .world-country,
    .world-map-label,
    .world-marker .marker-halo {
        transition: none;
    }
}

@media (forced-colors: active) {
    .world-map-card,
    .world-stations-panel,
    .world-map-control,
    .world-map-detail {
        border: 1px solid CanvasText;
    }

    .world-marker .marker-core {
        fill: Highlight;
        stroke: HighlightText;
    }
}
