.ro-layout {
    --map-layout-h: 640px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 360px;
    gap: 20px;
    height: var(--map-layout-h);
    min-height: 560px;
}

.ro-map {
    min-height: 0;
    box-shadow: var(--shadow-card);
}

.ro-sign {
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    min-width: 46px;
    height: 46px;
    padding: 0 8px;
    border-radius: 10px;
    background: var(--rc, var(--accent));
    color: var(--text-on-accent);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
}

.ro-sign--lg {
    min-width: 58px;
    height: 58px;
    border-radius: 12px;
    font-size: 19px;
}

.ro-sign--sm {
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
}

.ro-sign.is-soon,
.ro-route.is-soon .ro-sign,
.ro-route.is-off .ro-sign {
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-muted);
}

.ro-list-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.ro-list-head {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 16px 14px 14px 18px;
    border-bottom: 1px solid var(--border);
}

.ro-show-all {
    margin-left: auto;
}

.ro-show-all > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ro-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    padding: 8px;
    overflow-y: auto;
}

.ro-route {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.ro-route:hover {
    background: var(--bg);
}

.ro-route.is-selected {
    border-color: var(--accent-border);
    background: var(--accent-bg);
}

.ro-route-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ro-route-dir {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ro-route-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.ro-eye {
    color: var(--text-muted);
}

.ro-route--mini {
    gap: 10px;
    padding: 6px 8px;
    border-color: var(--border);
}

.ro-info {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.ro-view {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    padding: 22px 22px 24px;
    overflow-y: auto;
}

.ro-view > * {
    flex-shrink: 0;
}

.ro-intro-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    background: var(--accent-bg);
    color: var(--accent);
}

.ro-info-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
    text-wrap: balance;
}

.ro-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-secondary);
    white-space: pre-line;
}

.ro-note {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
}

.ro-info-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ro-info-head-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ro-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ro-close {
    flex-shrink: 0;
    align-self: flex-start;
    color: var(--text-muted);
}

.ro-dir {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.ro-dir svg {
    color: var(--text-muted);
}

.ro-stops {
    margin: -4px -10px 0;
}

.ro-stops.is-soon {
    --route-color: var(--text-muted);
}

.ro-stop-row {
    cursor: pointer;
}

.ro-stop-row:hover,
.ro-stop-row.is-selected {
    background: var(--bg);
}

.ro-info-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -8px -8px -4px -10px;
}

.ro-info-nav .btn > span {
    margin-left: 4px;
}

.ro-photos {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.ro-stop-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ro-mini-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ro-near {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ro-near-stop {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: none;
    color: var(--text-muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.ro-near-stop:hover {
    background: var(--bg);
}

.ro-near-name {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.ro-near-lines {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ro-line-chip {
    display: inline-block;
    min-width: 20px;
    padding: 0 5px;
    border-radius: 5px;
    background: var(--rc, var(--accent));
    color: var(--text-on-accent);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    text-shadow: none;
    font-variant-numeric: tabular-nums;
}

.ro-transfer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.ro-legend-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ro-legend {
    --map-px: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ro-legend-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.ro-legend-mark {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 28px;
}

.ro-legend-mark .map-pin {
    cursor: default;
}

.ro-legend-line {
    width: 28px;
    height: 12px;
}

.ro-legend .ro-arrow {
    stroke-width: 1.6px;
}

.ro-filter {
    width: 100%;
    padding: 2px 0;
    border: 0;
    background: none;
    font-family: inherit;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
}

.ro-filter:hover .ro-filter-label {
    color: var(--text-primary);
}

.ro-filter-label {
    flex: 1;
}

.ro-filter.is-off .ro-legend-mark,
.ro-filter.is-off .ro-filter-label {
    opacity: 0.45;
}

.ro-legend .map-spot,
.ro-trip-sug .map-spot {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    box-shadow: none;
}

.ro-legend .map-spot > svg,
.ro-trip-sug .map-spot > svg {
    width: 10px;
    height: 10px;
}

.ro-legend-name {
    color: var(--map-ink-soft);
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.14em;
}

.ro-legend-name.is-city {
    color: var(--map-ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.ro-legend-name.is-street {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
}

.ro-map.ro-no-city .map-name.is-city,
.ro-map.ro-no-district .map-name.is-district,
.ro-map.ro-no-street .map-name.is-street {
    display: none;
}

.ro-dim {
    opacity: 0.3;
}

.ro-arrow {
    fill: none;
    stroke: var(--map-halo);
    stroke-width: clamp(1.2px, calc(var(--map-px) * 0.9px), 2px);
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.ro-link {
    stroke: var(--map-ink-soft);
    stroke-width: 1.5px;
    stroke-dasharray: 4 4;
    vector-effect: non-scaling-stroke;
}

.ro-shield {
    display: inline-block;
    padding: 0 5px;
    border: 1.5px solid var(--map-halo);
    border-radius: 5px;
    background: var(--rc, var(--accent));
    color: var(--text-on-accent);
    font-size: 11px;
    font-weight: 800;
    line-height: 16px;
    white-space: nowrap;
    box-shadow: var(--shadow-card);
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

.ro-map .map-pin.map-stop-pin.is-selected {
    outline: 4px solid var(--accent-border);
}

.ro-map .map-pin.map-stop-pin.is-sibling {
    outline: 3px dashed var(--accent);
    outline-offset: 2px;
}

.ro-map.map-far .map-stop-pin.is-minor,
.ro-map.map-far .map-stop-pin.is-merged {
    display: none;
}

.ro-trip-open {
    align-self: stretch;
    justify-content: center;
}

.ro-trip-pick {
    display: flex;
    gap: 8px;
}

.ro-trip-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--border);
}

.ro-trip-dot.is-from {
    background: var(--success);
}

.ro-trip-dot.is-to {
    background: var(--danger);
}

.ro-trip-form {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 6px;
}

.ro-trip-field {
    display: flex;
    grid-column: 1;
    align-items: center;
    gap: 8px;
}

.ro-trip-swap {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    gap: 0;
    color: var(--text-muted);
}

.ro-trip-suggest {
    position: absolute;
    top: var(--sug-top, 100%);
    left: var(--sug-left, 0);
    width: var(--sug-width, 100%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 320px;
    margin-top: 4px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.ro-trip-sug {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.ro-trip-sug:hover {
    background: var(--bg-input);
}

.ro-trip-sug-city {
    color: var(--text-muted);
    font-size: 12px;
}

.ro-trip-sug-pin {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px var(--border);
}

.ro-trip-sug-head {
    padding: 8px 8px 2px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ro-map .map-spot.is-trip,
.ro-map .map-spot.is-selected {
    outline: 3px solid var(--accent);
    outline-offset: 1px;
}

.ro-map .map-spot {
    cursor: pointer;
    pointer-events: auto;
}

.ro-map .map-spot.is-selected .map-spot-name {
    display: block;
}

.ro-spot-head .map-spot {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    box-shadow: none;
}

.ro-spot-head .map-spot > svg {
    width: 18px;
    height: 18px;
}

.ro-trip-none {
    margin: 0;
    padding: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.ro-trip-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ro-trip-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: none;
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.ro-trip-option:hover {
    background: var(--bg);
}

.ro-trip-option.is-active {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.ro-trip-sum {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.ro-trip-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ro-trip-steps > li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.ro-trip-steps em {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
}

.ro-trip-steps > li.ro-trip-walk {
    padding-left: 46px;
    color: var(--text-muted);
    font-size: 12px;
}

.map-route-case.ro-trip {
    stroke-width: clamp(6px, calc(var(--map-px) * 6px), 14px);
}

.map-route-line.ro-trip {
    stroke-width: clamp(3.5px, calc(var(--map-px) * 3.5px), 8px);
}

.ro-map .map-pin.map-stop-pin.is-trip-from {
    outline: 4px solid var(--success);
}

.ro-map .map-pin.map-stop-pin.is-trip-to {
    outline: 4px solid var(--danger);
}

.ro-map .map-pin.map-stop-pin.is-trip-via {
    outline: 4px solid var(--accent);
}
