:root {
    --bfs-navy: #002b5c;
    --bfs-navy-deep: #001a38;
    --bfs-blue: #0A3D91;
    --bfs-yellow: #ffdd00;
    --bfs-ink: #122033;
    --bfs-muted: #4a5a6e;
    --bfs-paper: #eef2f7;
    --bfs-white: #ffffff;
    --bfs-ontime: #81c784;
    --bfs-early: #FF9800;
    --bfs-late: #EF9A9A;
    --bfs-critical: #c62828;
    --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
    --font-body: "Source Sans 3", "Segoe UI", Arial, Helvetica, sans-serif;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --tap: 48px;
    --yt-radius: 16px;
    --yt-radius-sm: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.45;
    color: var(--bfs-ink);
    background:
        radial-gradient(900px 380px at 8% -8%, rgba(10, 61, 145, 0.18), transparent 58%),
        radial-gradient(720px 320px at 108% 0%, rgba(255, 221, 0, 0.14), transparent 52%),
        linear-gradient(180deg, #d7e2ef 0%, var(--bfs-paper) 240px);
    padding-bottom: calc(20px + var(--safe-bottom));
    min-width: 0;
    overscroll-behavior-x: none;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 43, 92, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 43, 92, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 68%);
}

img {
    max-width: 100%;
    height: auto;
}

.yt-head,
.yt-main,
.yt-foot {
    position: relative;
    z-index: 1;
    max-width: 100%;
    overflow-x: hidden;
}

.yt-head {
    overflow: visible;
}

.yt-head-inner {
    overflow: visible;
}

.yt-head {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(180deg, var(--bfs-navy-deep) 0%, var(--bfs-navy) 72%);
    color: var(--bfs-yellow);
    border-bottom: 0;
    box-shadow:
        0 1px 0 rgba(255, 221, 0, 0.9),
        0 10px 16px -10px rgba(0, 26, 56, 0.28);
}

.yt-head-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    max-width: 760px;
    min-width: 0;
    margin: 0 auto;
    padding: calc(10px + var(--safe-top)) calc(10px + var(--safe-right)) 12px calc(10px + var(--safe-left));
}

.yt-head-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.yt-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex: 0 0 auto;
    background: var(--bfs-white);
    border-radius: 14px;
    padding: 3px;
    box-shadow: 0 0 0 1px rgba(255, 221, 0, 0.4);
}

.yt-head-text {
    flex: 1 1 auto;
    min-width: 0;
}

.yt-exit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin: 0 0 0 56px;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 221, 0, 0.42);
    border-radius: 8px;
    background: rgba(255, 221, 0, 0.08);
    color: var(--bfs-yellow);
    cursor: pointer;
    appearance: none;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
}

.yt-exit:hover,
.yt-exit:focus {
    background: rgba(255, 221, 0, 0.2);
    outline: none;
}

.yt-head h1 {
    margin: 0;
    min-width: 0;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 5.2vw, 2.1rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    overflow: hidden;
}

.yt-head p {
    margin: 4px 0 0;
    color: #dce8f8;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.yt-head-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: 0 0 auto;
    min-width: min-content;
    max-width: none;
    overflow: visible;
}

.yt-head-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
}

.yt-logo-link {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
    text-decoration: none;
}

.yt-city-switch {
    position: relative;
    z-index: 50;
    flex: 0 0 auto;
    min-width: min-content;
}

.yt-city-btn {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    width: auto;
    max-width: none;
    min-height: 36px;
    padding: 5px 26px 5px 10px;
    border: 1px solid rgba(255, 221, 0, 0.42);
    border-radius: 12px;
    background: rgba(255, 221, 0, 0.08);
    color: var(--bfs-yellow);
    cursor: pointer;
    appearance: none;
    text-align: left;
    font-family: inherit;
}

.yt-city-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    width: 0;
    height: 0;
    margin-top: -2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--bfs-yellow);
    pointer-events: none;
}

.yt-city-btn-label {
    flex: 0 0 auto;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
}

.yt-city-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 60;
    min-width: 248px;
    width: max-content;
    max-width: min(86vw, 300px);
    padding: 6px;
    border: 1px solid rgba(255, 221, 0, 0.55);
    border-radius: 12px;
    background: var(--bfs-navy-deep);
    box-shadow: 0 12px 24px rgba(0, 26, 56, 0.4);
}

.yt-city-option {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--bfs-yellow);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    line-height: 1.25;
    text-transform: uppercase;
    white-space: nowrap;
}

.yt-city-option:hover,
.yt-city-option:focus {
    background: rgba(255, 221, 0, 0.16);
    outline: none;
}

.yt-city-option.is-current {
    color: var(--bfs-navy-deep);
    background: var(--bfs-yellow);
    cursor: default;
}

.yt-when {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 0.4em;
    margin: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: none;
    text-align: right;
}

.yt-when-sep {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--bfs-yellow);
    line-height: 1.2;
}

.yt-today {
    flex: 0 0 auto;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--bfs-yellow);
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.2;
}

.yt-now {
    flex: 0 0 auto;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--bfs-yellow);
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.2;
}

.yt-chime {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.yt-chime-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bfs-yellow);
}

.yt-switch {
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    height: 32px;
    min-width: 52px;
    min-height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 221, 0, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    appearance: none;
}

.yt-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bfs-white);
    box-shadow: 0 1px 4px rgba(0, 26, 56, 0.35);
    transition: transform 0.18s ease;
}

.yt-switch.is-on {
    background: var(--bfs-yellow);
    border-color: var(--bfs-yellow);
}

.yt-switch.is-on .yt-switch-knob {
    transform: translateX(20px);
    background: var(--bfs-navy);
}

.yt-chime--card .yt-chime-label {
    color: var(--bfs-navy);
}

.yt-chime--card .yt-switch {
    border-color: rgba(0, 43, 92, 0.28);
    background: rgba(0, 43, 92, 0.12);
}

.yt-chime--card .yt-switch.is-on {
    background: var(--bfs-navy);
    border-color: var(--bfs-navy);
}

.yt-chime--card .yt-switch.is-on .yt-switch-knob {
    background: var(--bfs-yellow);
}

.yt-main {
    max-width: 760px;
    min-width: 0;
    width: 100%;
    margin: 0 auto;
    padding: 16px calc(10px + var(--safe-right)) 8px calc(10px + var(--safe-left));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.yt-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 43, 92, 0.16);
    border-radius: var(--yt-radius);
    max-width: 100%;
    min-width: 0;
    box-shadow:
        0 8px 16px -8px rgba(0, 43, 92, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.yt-form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yt-label {
    margin: 6px 0 0;
    font-weight: 800;
    color: var(--bfs-navy);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.yt-optional {
    font-weight: 600;
    color: var(--bfs-muted);
}

.yt-form input[type="text"] {
    width: 100%;
    min-height: var(--tap);
    border: 1px solid rgba(0, 43, 92, 0.22);
    border-radius: var(--yt-radius-sm);
    padding: 10px 14px;
    font-family: inherit;
    font-size: 16px;
    color: var(--bfs-ink);
    background: #f5f8fc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.yt-form input[type="text"]:disabled {
    opacity: 0.55;
}

.yt-form input[type="text"]:focus {
    outline: 2px solid var(--bfs-yellow);
    outline-offset: 1px;
    background: var(--bfs-white);
    border-color: var(--bfs-navy);
}

.yt-dirs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.yt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.yt-dir,
.yt-go,
.yt-refresh {
    min-height: var(--tap);
    min-width: 0;
    padding: 0 10px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 4.2vw, 1.25rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.yt-dir {
    border: 1px solid rgba(0, 43, 92, 0.28);
    background: rgba(255, 255, 255, 0.72);
    color: var(--bfs-navy);
}

.yt-dir[aria-pressed="true"] {
    background: var(--bfs-yellow);
    color: var(--bfs-navy);
    border-color: var(--bfs-navy);
    box-shadow: 0 6px 16px rgba(255, 221, 0, 0.28);
}

.yt-go {
    border: 1px solid var(--bfs-yellow);
    background: linear-gradient(180deg, var(--bfs-blue) 0%, var(--bfs-navy) 100%);
    color: var(--bfs-yellow);
    box-shadow: 0 8px 18px rgba(0, 43, 92, 0.22);
}

.yt-refresh {
    border: 1px solid var(--bfs-navy);
    background: var(--bfs-yellow);
    color: var(--bfs-navy);
}

.yt-refresh:hover,
.yt-refresh:focus {
    background: var(--bfs-navy);
    color: var(--bfs-yellow);
    border-color: var(--bfs-yellow);
}

.yt-refresh:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.yt-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.yt-map-head h2 {
    margin: 0;
}

.yt-refresh--compact {
    min-height: 44px;
    padding: 0 14px;
    font-size: 1.05rem;
    flex: 0 0 auto;
}

.yt-go:hover,
.yt-go:focus {
    background: var(--bfs-yellow);
    color: var(--bfs-navy);
    border-color: var(--bfs-navy);
}

.yt-go:disabled {
    opacity: 0.65;
    cursor: wait;
}

.yt-status {
    padding: 12px 16px;
    border-radius: var(--yt-radius);
    border: 1px solid rgba(0, 43, 92, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: var(--bfs-navy);
    font-weight: 700;
    box-shadow: 0 8px 16px -8px rgba(0, 43, 92, 0.1);
}

.yt-status.is-error {
    border-color: var(--bfs-critical);
    color: var(--bfs-critical);
}

.yt-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

[hidden] {
    display: none !important;
}

.yt-next {
    padding: 18px 16px 16px;
    background: linear-gradient(145deg, var(--bfs-navy-deep) 0%, var(--bfs-navy) 48%, var(--bfs-blue) 100%);
    color: var(--bfs-white);
    border-color: rgba(255, 221, 0, 0.55);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 10px 18px -10px rgba(0, 26, 56, 0.28),
        inset 0 1px 0 rgba(255, 221, 0, 0.22);
}

.yt-next::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -18%;
    width: 190px;
    height: 190px;
    background: radial-gradient(circle, rgba(255, 221, 0, 0.22), transparent 68%);
    pointer-events: none;
}

.yt-next > * {
    position: relative;
    z-index: 1;
}

.yt-kicker {
    margin: 0 0 6px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--bfs-yellow);
    text-transform: uppercase;
}

.yt-route-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 8px;
}

.yt-route-num {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--bfs-yellow);
    letter-spacing: 0.04em;
}

.yt-headsign {
    font-size: 1.05rem;
    font-weight: 700;
}

.yt-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.yt-metric {
    background: rgba(10, 61, 145, 0.55);
    border: 1px solid rgba(255, 221, 0, 0.45);
    border-radius: var(--yt-radius-sm);
    padding: 10px;
}

.yt-metric strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.7rem;
    line-height: 1;
    color: var(--bfs-yellow);
}

.yt-metric span {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #dce8f8;
}

.yt-due {
    margin: 10px 0 0;
    font-weight: 700;
}

.yt-live {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bfs-yellow);
    color: var(--bfs-navy);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.yt-live:not(.is-scheduled) {
    box-shadow: 0 0 0 0 rgba(255, 221, 0, 0.55);
    animation: yt-pulse 2.6s ease-out infinite;
}

.yt-live.is-scheduled {
    background: #dce8f8;
    animation: none;
    box-shadow: none;
}

.yt-later {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yt-bus {
    padding: 14px 16px;
    cursor: pointer;
}

.yt-bus-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.yt-bus-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.yt-bus.is-selected {
    background: linear-gradient(180deg, #fffdf0 0%, #fff7c2 100%);
    border-color: var(--bfs-yellow);
    box-shadow:
        0 0 0 1px var(--bfs-yellow),
        0 12px 26px rgba(0, 43, 92, 0.12);
}

.yt-bus-kicker {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--bfs-navy);
    text-transform: uppercase;
}

.yt-bus-title {
    font-weight: 800;
    color: var(--bfs-navy);
}

.yt-from-you {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bfs-navy);
    color: var(--bfs-yellow);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.yt-from-you.is-passed {
    background: #dce8f8;
    color: var(--bfs-muted);
    font-weight: 700;
}

.yt-bus-meta,
.yt-bus-eta {
    margin-top: 4px;
    font-size: 0.92rem;
    color: var(--bfs-muted);
}

.yt-bus-eta {
    font-weight: 700;
    color: var(--bfs-blue);
}

.yt-map-card {
    padding: 14px;
}

.yt-map-card h2,
.yt-stops-title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.08em;
    color: var(--bfs-navy);
}

.yt-map-head h2 {
    margin: 0;
}

.yt-map {
    height: min(42vh, 320px);
    min-height: 200px;
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(0, 43, 92, 0.22);
    border-radius: var(--yt-radius-sm);
    overflow: hidden;
    z-index: 1;
}

.yt-map.leaflet-container,
.yt-map .leaflet-container {
    width: 100% !important;
    max-width: 100% !important;
}

.yt-map .leaflet-marker-pane,
.yt-map .leaflet-overlay-pane {
    z-index: 650;
}

.bus-follow-marker-icon {
    background: transparent !important;
    border: none !important;
    width: 40px !important;
    height: 60px !important;
}

.bus-follow-marker {
    width: 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: 50% 50%;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
    pointer-events: none;
}

.bus-follow-marker-svg {
    display: block;
    overflow: visible;
}

.yt-bus-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 42px;
}

.yt-bus-icon .bus-follow-marker,
.yt-bus-icon .bus-follow-marker-svg {
    width: 28px;
    height: 42px;
}

.yt-stops {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.yt-stop {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 8px;
    padding: 8px 16px;
    position: relative;
    cursor: pointer;
}

.yt-stop + .yt-stop::before {
    content: "";
    position: absolute;
    left: 26px;
    top: -8px;
    width: 2px;
    height: 8px;
    background: linear-gradient(180deg, var(--bfs-blue), var(--bfs-navy));
}

.yt-dot {
    width: 14px;
    height: 14px;
    margin-top: 5px;
    border-radius: 50%;
    border: 2px solid var(--bfs-navy);
    background: var(--bfs-white);
    justify-self: center;
}

.yt-stop.is-bus .yt-dot {
    background: var(--bfs-yellow);
    box-shadow: 0 0 0 4px rgba(255, 221, 0, 0.28);
}

.yt-stop.is-you {
    background: linear-gradient(90deg, rgba(255, 221, 0, 0.22), transparent 92%);
    opacity: 1;
}

.yt-stop.is-you .yt-dot {
    background: var(--bfs-navy);
}

.yt-stop.is-you.is-bus .yt-dot {
    background: var(--bfs-yellow);
    box-shadow: 0 0 0 4px rgba(255, 221, 0, 0.28);
}

.yt-stop.is-dest {
    background: linear-gradient(90deg, rgba(10, 61, 145, 0.12), transparent 92%);
}

.yt-stop.is-dest .yt-dot {
    background: var(--bfs-blue);
    box-shadow: 0 0 0 4px rgba(10, 61, 145, 0.22);
}

.yt-stop.is-alert .yt-dot {
    background: var(--bfs-yellow);
    box-shadow: 0 0 0 5px rgba(255, 221, 0, 0.45);
}

.yt-stop.is-prev .yt-dot,
.yt-stop.is-bus.is-prev .yt-dot,
.yt-stop.is-alert.is-prev .yt-dot {
    background: var(--bfs-critical);
    box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.28);
}

.yt-stop.is-passed {
    opacity: 0.55;
}

.yt-alert {
    padding: 12px 16px;
    border-color: rgba(255, 221, 0, 0.55);
}

.yt-alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 4px;
}

.yt-alert-kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bfs-blue);
}

.yt-alert-row .yt-chime {
    min-height: 44px;
}

.yt-alert-copy {
    margin: 0;
    font-weight: 700;
    color: var(--bfs-navy);
}

.yt-trip-modes {
    margin: 8px 0 10px;
}

.yt-alert .yt-chip {
    min-height: 36px;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
}

.yt-stop-name {
    font-weight: 700;
    color: var(--bfs-navy);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.yt-stop-meta {
    font-size: 0.8rem;
    color: var(--bfs-muted);
}

.yt-stop-meta.yt-stop-next {
    color: var(--bfs-critical);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.yt-stop.is-alert {
    background: linear-gradient(90deg, rgba(198, 40, 40, 0.12), transparent 92%);
}

.yt-stop.is-alert .yt-stop-name {
    color: var(--bfs-critical);
}

.yt-foot {
    max-width: 760px;
    width: 100%;
    margin: 8px auto 0;
    padding: 0 calc(10px + var(--safe-right)) 0 calc(10px + var(--safe-left));
    text-align: center;
    color: var(--bfs-muted);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.yt-foot p {
    margin: 0;
}

.yt-foot a {
    color: var(--bfs-navy);
    text-decoration: underline;
}

@keyframes yt-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 221, 0, 0.45);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 221, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 221, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .yt-dir,
    .yt-go,
    .yt-refresh,
    .yt-switch-knob {
        transition: none;
    }

    .yt-live:not(.is-scheduled) {
        animation: none;
    }
}

@media (max-width: 390px) {
    .yt-logo {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .yt-head-inner {
        gap: 6px;
    }

    .yt-today,
    .yt-now,
    .yt-when-sep {
        font-size: 0.66rem;
    }

    .yt-chime {
        gap: 6px;
    }

    .yt-form {
        padding: 14px;
    }

    .yt-metric strong {
        font-size: 1.25rem;
    }

    .yt-route-num {
        font-size: 2rem;
    }
}

@media (min-width: 720px) {
    .yt-main {
        padding-top: 20px;
    }

    .yt-form {
        padding: 20px;
    }

    .yt-metric strong {
        font-size: 1.9rem;
    }
}

.yt-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 43, 92, 0.12);
    box-shadow: 0 8px 16px -8px rgba(0, 43, 92, 0.1);
}

.yt-mode {
    min-height: 44px;
    min-width: 0;
    padding: 0 6px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--bfs-navy);
    font-family: var(--font-display);
    font-size: clamp(0.88rem, 3.5vw, 1.05rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.yt-mode[aria-selected="true"] {
    background: var(--bfs-navy);
    color: var(--bfs-yellow);
    box-shadow: 0 6px 14px rgba(0, 43, 92, 0.22);
}

.yt-go--wide {
    width: 100%;
}

.yt-here {
    margin: 4px 0 8px;
    padding: 14px 16px;
    border-radius: var(--yt-radius-sm);
    background: linear-gradient(145deg, var(--bfs-navy-deep) 0%, var(--bfs-navy) 55%, var(--bfs-blue) 100%);
    color: var(--bfs-white);
    box-shadow: inset 0 1px 0 rgba(255, 221, 0, 0.2);
}

.yt-here .yt-kicker {
    margin-bottom: 4px;
}

.yt-here-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.15;
    color: var(--bfs-yellow);
}

.yt-here-meta {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: #dce8f8;
}

.yt-dest-wrap {
    position: relative;
}

.yt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.yt-chip {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(0, 43, 92, 0.28);
    background: rgba(255, 255, 255, 0.8);
    color: var(--bfs-navy);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.yt-chip[aria-pressed="true"] {
    background: var(--bfs-yellow);
    border-color: var(--bfs-navy);
    box-shadow: 0 6px 14px rgba(255, 221, 0, 0.28);
}

.yt-chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.yt-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    max-height: 240px;
    overflow: auto;
    border-radius: var(--yt-radius-sm);
    background: var(--bfs-white);
    border: 1px solid rgba(0, 43, 92, 0.16);
    box-shadow: 0 12px 28px rgba(0, 43, 92, 0.14);
}

.yt-suggest button {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid rgba(0, 43, 92, 0.08);
    background: transparent;
    color: var(--bfs-navy);
    text-align: left;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.yt-suggest button:last-child {
    border-bottom: 0;
}

.yt-suggest button:hover,
.yt-suggest button:focus {
    background: #fff7c2;
}

.yt-place-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yt-place-lead {
    margin: 0 2px 2px;
    font-weight: 700;
    color: var(--bfs-navy);
}

.yt-service {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
}

.yt-service-route {
    flex: 0 0 auto;
    min-width: 64px;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--bfs-navy);
    color: var(--bfs-yellow);
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1;
}

.yt-service-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.yt-service-dir {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bfs-blue);
}

.yt-service-title {
    font-weight: 800;
    color: var(--bfs-navy);
}

.yt-service-meta {
    margin-top: 2px;
    font-size: 0.9rem;
    color: var(--bfs-muted);
}

.yt-picker-intro {
    margin: 0 2px;
    color: var(--bfs-navy);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
}

.yt-picker-cities {
    margin: -8px 2px 0;
    color: var(--bfs-muted);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
}

.yt-seo-line {
    margin: 0 2px 2px;
    color: var(--bfs-muted);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

.yt-picker {
    gap: 18px;
}

.yt-picker-lead {
    margin: 0 2px;
    font-weight: 700;
    color: var(--bfs-navy);
}

.yt-picker-kicker {
    margin: 0 2px 8px;
    font-weight: 800;
    color: var(--bfs-navy);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.yt-picker-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.yt-picker-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: var(--tap);
    padding: 14px 16px;
    text-decoration: none;
    color: var(--bfs-navy);
}

.yt-picker-card:hover,
.yt-picker-card:focus {
    outline: 2px solid var(--bfs-yellow);
    outline-offset: 1px;
    border-color: var(--bfs-navy);
}

.yt-picker-card.is-last {
    border-color: var(--bfs-yellow);
    box-shadow:
        0 0 0 2px var(--bfs-yellow),
        0 8px 16px -8px rgba(0, 43, 92, 0.12);
}

.yt-picker-name {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 4.8vw, 1.8rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.05;
}

.yt-picker-place {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--bfs-muted);
}

.yt-picker-used {
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bfs-blue);
}

@media (min-width: 560px) {
    .yt-picker-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 720px) {
    .yt-picker-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
