html body #mainContent #twCountryRail #twMapTools > .tw-break-rail {
    position: relative;
    color: #a2192e !important;
    min-inline-size: 44px;
    min-block-size: 44px;
}

#twCountryRail .tw-break-rail svg {
    width: 23px;
    height: 23px;
    transform-origin: center;
    animation: tw-break-pulse 2s ease-in-out infinite;
}

#twCountryRail .tw-break-count {
    position: absolute;
    inset: 3px 1px auto auto;
    min-width: 16px;
    box-sizing: border-box;
    padding: 1px 3px;
    border-radius: 12px;
    background: #a2192e;
    color: white;
    font: 700 10px/14px Inter, system-ui, sans-serif;
    text-align: center;
    z-index: 2;
}

@keyframes tw-break-pulse {
    0%, 100% { scale: 1; }
    50% { scale: 1.18; }
}

@media (prefers-reduced-motion: reduce) {
    #twCountryRail .tw-break-rail svg { animation: none; }
}

html body dialog#tw-break-dialog {
    box-sizing: border-box;
    position: fixed;
    inset: 0 var(--tw-ui-menu-side, 73px) 0 auto;
    margin: auto 0;
    width: min(420px, calc(100vw - var(--tw-ui-menu-side, 73px) - 10px));
    max-height: min(540px, calc(100dvh - 24px));
    padding: 0;
    overflow: hidden;
    border: 1px solid #aebcb7;
    border-radius: 14px;
    background: #f1eee6 !important;
    color: #302e28 !important;
    color-scheme: light !important;
    box-shadow: 0 10px 28px rgb(0 0 0 / 24%);
    font: 400 .875rem/1.45 Inter, system-ui, sans-serif;
}

html body dialog#tw-break-dialog[open] { display: flex; flex-direction: column; }
#tw-break-dialog::backdrop { background: rgb(18 26 25 / 40%); }

html body #tw-break-dialog > header {
    position: relative;
    flex: none;
    padding: 14px 52px 14px 16px;
    background: #404f4d !important;
    color: #fff !important;
}

html body #tw-break-dialog h2 {
    margin: 0;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    font: 400 clamp(14px, 2.5vw, 19px)/1.3 Inter, system-ui, sans-serif;
    letter-spacing: -.025em;
}

html body #tw-break-dialog button {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0 !important;
    padding: 0;
    background: transparent !important;
    color: #fff !important;
    -webkit-text-fill-color: currentColor !important;
    font-size: 22px;
    cursor: pointer;
}

html body #tw-break-dialog ul {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 4px 16px 12px;
    list-style: none;
    background: #f1eee6 !important;
}
html body #tw-break-dialog li + li { border-top: 1px solid #d5d9d2; }
html body #tw-break-dialog li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: 8px 4px;
    color: #302e28 !important;
    -webkit-text-fill-color: currentColor !important;
    text-decoration: none;
    overflow-wrap: anywhere;
}
html body #tw-break-dialog li a:hover { text-decoration: underline; }
#tw-break-dialog :is(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

@media (max-width: 767px), (max-width: 1366px) and (hover: none) and (pointer: coarse), (max-width: 1024px) and (max-height: 520px) {
    html body dialog#tw-break-dialog {
        inset: 0;
        margin: 0;
        width: 100%;
        height: 100dvh;
        max-width: none;
        max-height: none;
        border: 0;
        border-radius: 0;
    }
    html body #tw-break-dialog > header { padding-top: max(14px, env(safe-area-inset-top)); }
}
