* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #172033;
    background: #f5f7fb;
}
a { color: inherit; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 28px;
    background: #ffffff;
    border-bottom: 1px solid #dde3ee;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    text-decoration: none;
}
.brand img { width: 42px; height: 42px; object-fit: contain; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #475569;
}
nav a img { width: 18px; height: 18px; object-fit: contain; }
nav a.active, nav a:hover { background: #e9f1ff; color: #124a8f; }
.shell {
    width: min(1180px, calc(100% - 28px));
    margin: 26px auto 60px;
}
h1 { margin: 0 0 16px; font-size: clamp(28px, 4vw, 44px); }
h2 { margin: 28px 0 12px; }
.panel, .card, .notice, .error {
    background: #fff;
    border: 1px solid #dbe2ed;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(18, 33, 61, .06);
}
.panel { padding: 18px; margin-bottom: 18px; }
.narrow { max-width: 420px; }
.auth {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: start;
}
.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}
.wide { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-weight: 700; color: #334155; }
input, select, textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 9px 10px;
    font: inherit;
    background: #fff;
}
input, select { min-height: 42px; }
textarea { resize: vertical; }
fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}
legend {
    margin-bottom: 6px;
    font-weight: 700;
    color: #334155;
}
.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 8px;
}
.radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}
.radio-row input {
    width: auto;
    min-height: 0;
}
button {
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    background: #1266b3;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
button:hover { background: #0f5595; }
button.danger { background: #b91c1c; }
.inline-save { margin-top: 12px; }
.inline-save, .card-actions { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-save label { min-width: 210px; }
.notice, .error { padding: 12px 14px; margin-bottom: 16px; }
.notice { border-color: #badbcc; background: #ecfdf3; color: #166534; }
.error { border-color: #fecaca; background: #fff1f2; color: #991b1b; }
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
    margin: 16px 0;
}
.card { padding: 16px; }
.card h3 { margin: 0 0 8px; }
.card p { color: #5b6678; }
.muted { color: #64748b; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chips span {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef6f4;
    color: #14615a;
    font-weight: 700;
    font-size: 13px;
}
.bus { border-left: 4px solid #1266b3; }
.stop { border-left: 4px solid #059669; }
.complaint-history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.complaint-history-head h2 {
    margin: 0 0 4px;
}
.complaint-history-head p {
    margin: 0;
    color: #64748b;
}
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 6px;
    background: #1266b3;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.button-link:hover,
.button-link:focus {
    background: #0f5595;
}
.table-scroll {
    overflow-x: auto;
}
.complaints-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}
.complaints-table th,
.complaints-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}
.complaints-table th {
    background: #fff7df;
    color: #7a4b00;
    font-weight: 800;
}
.complaints-table td span {
    display: block;
    margin-top: 4px;
}
.complaint-photo-link {
    display: inline-flex;
}
.complaint-photo-link img {
    width: 54px;
    height: 54px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
}
.complaints-screen h1,
.profile-screen h1 {
    font-size: 40px;
    line-height: 1.08;
}
.profile-form {
    display: grid;
    gap: 14px;
}
.profile-form input[readonly] {
    background: #f8fafc;
    color: #172033;
}
.complaint-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: end;
}
.complaint-form .wide {
    grid-column: 1 / -1;
}
.complaint-form textarea {
    display: block;
    max-width: 100%;
}
.complaint-form button[type="submit"] {
    width: min(100%, 260px);
}
.complaint-related {
    min-width: 0;
}
.complaint-related .radio-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 8px 18px;
}
.complaint-related-search {
    max-width: 100%;
}
@media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; padding: 12px 16px; }
    .auth, .grid { grid-template-columns: 1fr; }
    h1 { font-size: 30px; }
    .complaint-history-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .complaints-screen h1,
    .profile-screen h1 {
        font-size: 34px;
    }
    .complaint-form {
        grid-template-columns: 1fr;
    }
    .complaint-form button[type="submit"] {
        width: 100%;
    }
}

.login-screen {
    width: min(100%, 520px);
    margin: -26px auto 0;
    min-height: 100vh;
    background: #fff8e8;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
}
.login-screen .app-titlebar {
    min-height: 70px;
    display: flex;
    align-items: center;
    padding: 0 22px;
    background: linear-gradient(180deg, #ffc522, #ffc01a);
    border-top: 14px solid #e47700;
    color: #fff;
    font-size: 28px;
    font-weight: 400;
}
.login-body {
    padding: 58px 24px 46px;
    text-align: center;
}
.login-body h1 {
    margin: 0;
    color: #080808;
    font-size: 23px;
    line-height: 1.35;
    font-weight: 800;
}
.login-body p {
    margin: 20px 0 42px;
    color: #222;
    font-size: 16px;
}
.login-illustration {
    width: 100%;
    max-height: 230px;
    object-fit: contain;
    margin: 0 auto 26px;
    background: #fff9dc;
}
.login-form {
    width: min(100%, 390px);
    margin: 0 auto;
    text-align: left;
}
.login-form label {
    display: block;
    margin: 0 0 10px;
    color: #1f1f1f;
    font-size: 16px;
    font-weight: 500;
}
.phone-field {
    display: grid;
    grid-template-columns: 74px 1fr;
    align-items: center;
    min-height: 62px;
    background: #e9eef3;
    margin-bottom: 24px;
}
.phone-field span {
    text-align: center;
    font-size: 17px;
    color: #111827;
}
.phone-field input,
.login-form .code-input,
.registration-card input {
    min-height: 62px;
    border: 0;
    border-radius: 0;
    background: #e9eef3;
    font-size: 16px;
    outline: none;
}
.registration-card input {
    width: 100%;
    margin-bottom: 18px;
    padding: 0 16px;
}
.otp-button,
.login-form button {
    width: 100%;
    min-height: 62px;
    border-radius: 22px;
    background: linear-gradient(90deg, #ffc421, #e97800);
    box-shadow: 0 5px 8px rgba(130, 74, 0, .22);
    font-size: 18px;
}
.login-form button:hover,
.otp-button:hover {
    background: linear-gradient(90deg, #f5b900, #d96f00);
}
.login-divider {
    width: min(100%, 390px);
    margin: 38px auto 28px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    color: #222;
}
.login-divider span {
    height: 2px;
    background: #777;
}
.login-divider em {
    font-style: normal;
    font-size: 16px;
}
.security-login {
    width: min(100%, 390px);
    margin: 0 auto;
    text-align: center;
}
.security-login summary {
    list-style: none;
    cursor: pointer;
    color: #df7b00;
    font-size: 17px;
    font-weight: 800;
}
.security-login summary::-webkit-details-marker { display: none; }
.security-login[open] summary { margin-bottom: 20px; }
.login-form.compact {
    padding-top: 4px;
}
.text-link {
    display: block;
    margin-top: 18px;
    text-align: center;
    color: #df7b00;
    font-weight: 800;
    text-decoration: none;
}
@media (min-width: 900px) {
    .login-screen {
        margin-top: -26px;
    }
}
@media (max-width: 520px) {
    .shell {
        width: 100%;
        margin-top: 0;
    }
    .login-screen {
        margin: 0;
        box-shadow: none;
    }
    .login-body {
        padding: 50px 24px 42px;
    }
}

.passenger-home {
    width: min(100%, 560px);
    margin: -26px auto 0;
    min-height: 100vh;
    background: #fff8e8;
}
.trip-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 14px 10px;
    background: #fff8e8;
}
.trip-tabs a {
    min-height: 70px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 7px;
    border-radius: 24px;
    color: #6f7480;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
}
.trip-tabs a.active {
    background: #ffc421;
    color: #fff;
}
.trip-tabs img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.tab-icon {
    font-size: 28px;
    line-height: 1;
}
.mobile-appbar {
    min-height: 70px;
    display: grid;
    grid-template-columns: 54px 1fr 44px;
    align-items: center;
    padding: 0 14px;
    background: #ffc421;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.mobile-appbar-title {
    color: inherit;
    text-decoration: none;
}
.back-mark {
    font-size: 54px;
    line-height: 1;
}
.menu-mark {
    justify-self: end;
    font-size: 40px;
    line-height: 1;
}
.mobile-overflow {
    position: relative;
    justify-self: end;
}
.mobile-overflow .menu-mark {
    width: 44px;
    height: 54px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.mobile-overflow-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    min-width: 170px;
    padding: 8px 0;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
.mobile-overflow-menu a {
    display: block;
    padding: 12px 18px;
    color: #111827;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.mobile-overflow-menu a:hover,
.mobile-overflow-menu a:focus {
    background: #fff4cf;
}
.mobile-cardless {
    padding: 24px 16px 50px;
}
.app-form {
    display: grid;
    gap: 14px;
}
.app-form label {
    font-size: 0;
}
.app-form select,
.app-form input {
    min-height: 68px;
    border: 2px solid #efd16b;
    border-radius: 24px;
    padding: 0 22px;
    color: #80621d;
    background: #fffefb;
    font-size: 20px;
}
.town-search {
    position: relative;
}
.app-form .town-search-input {
    width: 100%;
}
.town-search-list {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    border: 2px solid #efd16b;
    border-radius: 18px;
    background: #fffefb;
    box-shadow: 0 8px 20px rgba(0,0,0,.16);
}
.town-search-option,
.town-search-empty {
    display: block;
    width: 100%;
    min-height: 44px;
    border: 0;
    border-bottom: 1px solid #f4df9a;
    padding: 10px 16px;
    color: #4d3400;
    background: #fffefb;
    font-size: 17px;
    line-height: 1.2;
    text-align: left;
}
.town-search-option:last-child,
.town-search-empty:last-child {
    border-bottom: 0;
}
.town-search-option:hover,
.town-search-option:focus {
    background: #fff4c9;
}
.town-search-empty {
    color: #8a6e2e;
}
.field-tip {
    margin: -6px 6px 10px;
    color: #8a6e2e;
    font-size: 14px;
}
.complaint-photo-field input[type="file"] {
    min-height: 48px;
    padding: 10px;
}
.field-tip.error-text {
    color: #b91c1c;
}
.leave-row {
    display: grid;
    grid-template-columns: 1fr 70px;
    gap: 18px;
    align-items: center;
}
.star-button {
    width: 70px;
    height: 70px;
    min-height: 70px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    border: 2px solid #efd16b;
    box-shadow: 0 2px 5px rgba(0,0,0,.16);
    font-size: 28px;
}
.star-button:hover {
    background: #fffdf2;
    color: #000;
}
.route-button {
    min-height: 70px;
    border-radius: 22px;
    background: linear-gradient(90deg, #ffc421, #e97800);
    box-shadow: 0 5px 8px rgba(130, 74, 0, .22);
    font-size: 18px;
}
.saved-trips-screen {
    color: #3e2b03;
}
.saved-trips-screen > h1 {
    margin: 16px 0 10px;
    font-size: 38px;
    line-height: 1.1;
    color: #4b3300;
}
.saved-trips-lead {
    margin: 0 0 28px;
    color: #8f6916;
    font-size: 24px;
    line-height: 1.25;
}
.saved-trip-group {
    margin: 0 0 32px;
    padding: 22px 20px 20px;
    border: 2px solid #f0c345;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(65, 45, 0, .24);
}
.saved-trip-group h2 {
    margin: 0 0 18px;
    color: #3e2b03;
    font-size: 28px;
    line-height: 1.15;
}
.saved-trip-group h2:empty {
    display: none;
}
.saved-trip-item {
    display: grid;
    grid-template-columns: 70px 1fr 76px;
    gap: 14px;
    align-items: center;
    min-height: 126px;
    margin-top: 16px;
    padding: 18px 16px;
    border: 2px solid #f0c345;
    border-radius: 24px;
    background: #fff;
    cursor: pointer;
}
.saved-trip-item:first-of-type {
    margin-top: 0;
}
.saved-trip-kind {
    position: relative;
    width: 46px;
    height: 46px;
    justify-self: center;
}
.saved-trip-kind::before,
.saved-trip-kind::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}
.saved-trip-kind.school::before {
    left: 5px;
    top: 13px;
    width: 36px;
    height: 20px;
    background: #000;
    clip-path: polygon(50% 0, 100% 35%, 50% 70%, 0 35%);
}
.saved-trip-kind.school::after {
    left: 14px;
    top: 25px;
    width: 22px;
    height: 12px;
    border-bottom: 6px solid #000;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}
.saved-trip-kind.favorite::before {
    left: 6px;
    top: 4px;
    width: 34px;
    height: 34px;
    background: #000;
    clip-path: polygon(50% 0, 61% 34%, 98% 34%, 68% 55%, 79% 90%, 50% 68%, 21% 90%, 32% 55%, 2% 34%, 39% 34%);
}
.saved-trip-kind.favorite::after {
    left: 11px;
    top: 10px;
    width: 24px;
    height: 24px;
    background: #fff;
    clip-path: polygon(50% 0, 61% 34%, 98% 34%, 68% 55%, 79% 90%, 50% 68%, 21% 90%, 32% 55%, 2% 34%, 39% 34%);
}
.saved-trip-kind.office::before {
    left: 7px;
    top: 16px;
    width: 34px;
    height: 24px;
    border-radius: 3px;
    background: #000;
}
.saved-trip-kind.office::after {
    left: 18px;
    top: 9px;
    width: 14px;
    height: 10px;
    border: 4px solid #000;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
}
.saved-trip-kind.recent::before {
    left: 8px;
    top: 8px;
    width: 30px;
    height: 30px;
    border: 4px solid #000;
    border-radius: 50%;
}
.saved-trip-kind.recent::after {
    left: 22px;
    top: 14px;
    width: 12px;
    height: 14px;
    border-left: 4px solid #000;
    border-bottom: 4px solid #000;
}
.saved-trip-copy {
    min-width: 0;
    color: #3e2b03;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.22;
}
.saved-trip-copy strong {
    display: block;
}
.saved-trip-copy p {
    margin: 0;
}
.saved-trip-plan {
    justify-self: end;
}
.saved-trip-plan button {
    position: relative;
    width: 68px;
    height: 58px;
    min-height: 58px;
    border: 0;
    border-radius: 22px;
    background: #fff2cf;
    box-shadow: none;
}
.saved-trip-plan button::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 11px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #000;
}
.saved-trip-plan button::after {
    content: "";
    position: absolute;
    left: 39px;
    top: 20px;
    width: 10px;
    height: 14px;
    border-left: 3px solid #fff;
    border-bottom: 3px solid #fff;
}
.saved-trip-plan button:disabled {
    opacity: .45;
}
.go-home-trip-item {
    cursor: default;
}
.go-home-edit {
    grid-column: 1 / -1;
    margin-top: 4px;
    border-top: 1px solid #f4df9a;
    padding-top: 10px;
}
.go-home-edit summary {
    width: max-content;
    padding: 8px 18px;
    border-radius: 18px;
    background: #fff2cf;
    color: #3e2b03;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}
.go-home-edit-form {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}
.go-home-edit-form label {
    display: grid;
    gap: 6px;
    color: #6f530e;
    font-size: 15px;
    font-weight: 800;
}
.go-home-edit-form .town-search-input {
    min-height: 54px;
    border-radius: 18px;
    font-size: 17px;
}
.go-home-edit-form .route-button {
    min-height: 52px;
    border-radius: 18px;
    font-size: 16px;
}
.saved-trip-empty {
    padding: 18px;
    border: 2px solid #f0c345;
    border-radius: 22px;
    color: #8f6916;
    font-size: 18px;
}
.recent-trips-title {
    margin: 0 0 18px;
    color: #4b3300;
    font-size: 32px;
    line-height: 1.1;
}
.nearby-section {
    margin-top: 18px;
}
.map-status {
    margin-bottom: 8px;
    color: #72591f;
    font-size: 13px;
}
.nearby-map {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid #e1d4ad;
    border-radius: 8px;
    background: #edf0e5;
    z-index: 1;
}
.leaflet-nearby-map .leaflet-control-container {
    font-size: 12px;
}
.map-radius {
    position: absolute;
    inset: 8% 10%;
    border: 2px solid rgba(26, 136, 225, .55);
    border-radius: 50%;
    background: rgba(26, 136, 225, .13);
}
.map-marker {
    position: absolute;
    transform: translate(-50%, -100%);
    display: grid;
    place-items: center;
    width: 30px;
    height: 38px;
    border-radius: 16px 16px 16px 2px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 2px 4px rgba(0,0,0,.25);
    z-index: 2;
}
.map-marker.stop {
    background: #df202b;
}
.map-marker.user {
    width: 28px;
    height: 48px;
    border-radius: 16px;
    background: #6b2cff;
    font-size: 28px;
}
.map-legend {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
    color: #6f5b27;
    font-size: 13px;
}
.legend-user,
.legend-stop {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 50%;
}
.legend-user { background: #6b2cff; }
.legend-stop { background: #df202b; }
.legend-start,
.legend-end {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 50%;
}
.legend-start { background: #f57c00; }
.legend-end { background: #1266b3; }
.new-trip-marker {
    display: grid;
    place-items: center;
    width: 34px;
    height: 42px;
    border-radius: 18px 18px 18px 3px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(23, 32, 51, .28);
}
.new-trip-marker.start {
    background: #f57c00;
}
.new-trip-marker.end {
    background: #1266b3;
}
.new-trip-marker.default {
    background: #6b2cff;
}
@media (max-width: 560px) {
    .passenger-home {
        width: 100%;
        margin: 0;
    }
    .trip-tabs {
        gap: 2px;
    }
    .trip-tabs a {
        font-size: 12px;
        border-radius: 22px;
    }
    .mobile-appbar {
        font-size: 26px;
    }
    .nearby-map {
        min-height: 330px;
    }
}

@media (max-width: 760px) {
    .passenger-home {
        width: 100%;
        margin: 0;
    }
    .trip-tabs {
        gap: 4px;
        padding: 14px 14px 16px;
    }
    .trip-tabs a {
        min-height: 82px;
        border-radius: 0;
        font-size: 13px;
        line-height: 1.05;
    }
    .trip-tabs a.active {
        border-radius: 28px;
    }
    .trip-tabs img {
        width: 24px;
        height: 24px;
    }
    .tab-icon {
        font-size: 28px;
    }
    .mobile-appbar {
        min-height: 64px;
        grid-template-columns: 48px 1fr 38px;
        padding: 0 16px;
        font-size: 24px;
    }
    .trip-tabs + .mobile-appbar {
        grid-template-columns: 0 1fr 38px;
    }
    .trip-tabs + .mobile-appbar .back-mark {
        display: none;
    }
    .menu-mark {
        font-size: 34px;
    }
    .mobile-cardless,
    .saved-trips-screen {
        padding: 24px 16px 48px;
    }
    .saved-trips-screen > h1 {
        margin: 18px 0 10px;
        font-size: 32px;
        line-height: 1.08;
    }
    .saved-trips-lead {
        margin-bottom: 26px;
        font-size: 20px;
        line-height: 1.35;
    }
    .saved-trip-group {
        margin-bottom: 30px;
        padding: 20px 16px 18px;
        border-radius: 24px;
        box-shadow: 0 3px 8px rgba(65, 45, 0, .22);
    }
    .saved-trip-group h2 {
        margin-bottom: 16px;
        font-size: 24px;
        line-height: 1.15;
    }
    .saved-trip-item {
        grid-template-columns: 60px minmax(0, 1fr) 64px;
        gap: 12px;
        min-height: 104px;
        margin-top: 14px;
        padding: 16px 14px;
        border-radius: 22px;
    }
    .saved-trip-kind {
        width: 38px;
        height: 38px;
    }
    .saved-trip-kind.school::before {
        left: 4px;
        top: 11px;
        width: 30px;
        height: 17px;
    }
    .saved-trip-kind.school::after {
        left: 12px;
        top: 21px;
        width: 18px;
        height: 10px;
        border-bottom-width: 5px;
        border-left-width: 5px;
        border-right-width: 5px;
    }
    .saved-trip-kind.favorite::before {
        left: 5px;
        top: 3px;
        width: 28px;
        height: 28px;
    }
    .saved-trip-kind.favorite::after {
        left: 9px;
        top: 8px;
        width: 20px;
        height: 20px;
    }
    .saved-trip-kind.office::before {
        left: 6px;
        top: 13px;
        width: 28px;
        height: 20px;
    }
    .saved-trip-kind.office::after {
        left: 15px;
        top: 7px;
        width: 12px;
        height: 9px;
        border-width: 3px;
        border-bottom: 0;
    }
    .saved-trip-copy {
        font-size: 20px;
        line-height: 1.18;
    }
    .saved-trip-copy strong {
        margin-bottom: 2px;
    }
    .saved-trip-plan button {
        width: 56px;
        height: 50px;
        min-height: 50px;
        border-radius: 20px;
    }
    .saved-trip-plan button::before {
        left: 17px;
        top: 10px;
        width: 30px;
        height: 30px;
    }
    .saved-trip-plan button::after {
        left: 32px;
        top: 17px;
        width: 8px;
        height: 12px;
    }
    .recent-trips-title {
        font-size: 28px;
    }
    .schedule-results {
        padding: 18px 16px 62px;
    }
    .schedule-summary {
        grid-template-columns: 1fr 60px;
        gap: 10px;
    }
    .schedule-summary h1 {
        margin-bottom: 8px;
        font-size: 23px;
        line-height: 1.22;
        font-weight: 500;
    }
    .schedule-summary p {
        font-size: 22px;
        line-height: 1.15;
    }
    .swap-float,
    .refresh-float {
        width: 58px;
        height: 58px;
        font-size: 28px;
    }
    .schedule-actions {
        gap: 18px;
        margin: 32px 0 34px;
    }
    .schedule-actions a,
    .schedule-actions button {
        min-width: 118px;
        min-height: 44px;
        font-size: 16px;
    }
    .select-hint {
        margin-bottom: 28px;
        font-size: 20px;
        line-height: 1.22;
    }
    .schedule-legend {
        justify-content: flex-start;
        gap: 7px 9px;
        margin-bottom: 30px;
        padding-left: 42px;
        font-size: 18px;
        line-height: 1.2;
    }
    .dot,
    .box {
        width: 22px;
        height: 22px;
    }
    .box.private,
    .box.ctb {
        border-width: 3px;
    }
    .arrival-head,
    .arrival-row {
        grid-template-columns: minmax(88px, 1fr) repeat(3, minmax(48px, 58px)) 46px;
        gap: 6px;
    }
    .arrival-head {
        margin-bottom: 10px;
        font-size: 24px;
    }
    .arrival-row {
        min-height: 84px;
    }
    .route-title strong {
        font-size: 23px;
        line-height: 1.05;
    }
    .route-title span {
        margin-top: 5px;
        font-size: 16px;
        line-height: 1.15;
    }
    .time-badge {
        min-width: 48px;
        padding: 2px 3px;
        font-size: 20px;
        border-width: 2px;
    }
    .row-map-button {
        width: 44px;
        height: 44px;
        border-radius: 6px;
    }
    .row-map-button::before {
        width: 17px;
        height: 17px;
    }
    .row-map-button::after {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 560px) {
    .schedule-results {
        padding: 16px 14px 60px;
    }
    .schedule-summary {
        grid-template-columns: 1fr 56px;
        gap: 8px;
    }
    .schedule-summary h1 {
        font-size: 22px;
        line-height: 1.2;
    }
    .schedule-summary p {
        font-size: 20px;
        line-height: 1.15;
    }
    .swap-float,
    .refresh-float {
        width: 54px;
        height: 54px;
        font-size: 26px;
    }
    .schedule-actions {
        gap: 14px;
        margin: 28px 0 32px;
    }
    .schedule-actions a,
    .schedule-actions button {
        min-width: 112px;
        min-height: 42px;
        font-size: 15px;
    }
    .select-hint {
        margin-bottom: 26px;
        font-size: 19px;
        line-height: 1.22;
    }
    .schedule-legend {
        justify-content: flex-start;
        gap: 7px 8px;
        margin-bottom: 28px;
        padding-left: 28px;
        font-size: 17px;
        line-height: 1.2;
    }
    .dot,
    .box {
        width: 20px;
        height: 20px;
    }
    .arrival-head,
    .arrival-row {
        grid-template-columns: minmax(78px, 1fr) repeat(3, minmax(44px, 52px)) 42px;
        gap: 5px;
    }
    .arrival-head {
        font-size: 23px;
    }
    .arrival-row {
        min-height: 78px;
    }
    .route-title strong {
        font-size: 22px;
        line-height: 1.05;
    }
    .route-title span {
        font-size: 15px;
        line-height: 1.14;
    }
    .time-badge {
        min-width: 44px;
        padding: 2px 3px;
        font-size: 18px;
    }
    .row-map-button {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 560px) {
    .schedule-results {
        padding: 16px 14px 60px;
    }
    .schedule-summary {
        grid-template-columns: 1fr 56px;
        gap: 8px;
    }
    .schedule-summary h1 {
        font-size: 22px;
        line-height: 1.2;
    }
    .schedule-summary p {
        font-size: 20px;
        line-height: 1.15;
    }
    .swap-float,
    .refresh-float {
        width: 54px;
        height: 54px;
        font-size: 26px;
    }
    .schedule-actions {
        gap: 14px;
        margin: 28px 0 32px;
    }
    .schedule-actions a,
    .schedule-actions button {
        min-width: 112px;
        min-height: 42px;
        font-size: 15px;
    }
    .select-hint {
        margin-bottom: 26px;
        font-size: 19px;
        line-height: 1.22;
    }
    .schedule-legend {
        justify-content: flex-start;
        gap: 7px 8px;
        margin-bottom: 28px;
        padding-left: 28px;
        font-size: 17px;
        line-height: 1.2;
    }
    .dot,
    .box {
        width: 20px;
        height: 20px;
    }
    .arrival-head,
    .arrival-row {
        grid-template-columns: minmax(78px, 1fr) repeat(3, minmax(44px, 52px)) 42px;
        gap: 5px;
    }
    .arrival-head {
        font-size: 23px;
    }
    .arrival-row {
        min-height: 78px;
    }
    .route-title strong {
        font-size: 22px;
        line-height: 1.05;
    }
    .route-title span {
        font-size: 15px;
        line-height: 1.14;
    }
    .time-badge {
        min-width: 44px;
        padding: 2px 3px;
        font-size: 18px;
    }
    .row-map-button {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 560px) {
    .schedule-summary h1 { font-size: 22px; }
    .schedule-summary p { font-size: 21px; }
    .schedule-actions { margin: 30px 0 32px; gap: 14px; }
    .schedule-actions a,
    .schedule-actions button { min-width: 112px; font-size: 15px; }
    .select-hint { font-size: 19px; }
    .schedule-legend { font-size: 17px; padding-left: 36px; }
    .arrival-head,
    .arrival-row {
        grid-template-columns: minmax(78px, 1fr) repeat(3, minmax(44px, 52px)) 42px;
        gap: 5px;
    }
    .route-title strong { font-size: 22px; }
    .route-title span { font-size: 15px; }
    .time-badge { min-width: 44px; font-size: 18px; }
    .row-map-button { width: 40px; height: 40px; }
}

.schedule-results {
    position: relative;
    padding: 26px 16px 70px;
    background: #fff8e8;
}
.schedule-summary {
    display: grid;
    grid-template-columns: 1fr 72px;
    gap: 12px;
    align-items: start;
}
.schedule-summary h1 {
    margin: 0 0 10px;
    color: #111;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 500;
}
.schedule-summary p {
    margin: 0;
    color: #7b7b7b;
    font-size: 23px;
}
.swap-float,
.refresh-float {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #ffc02a;
    color: #111;
    font-size: 32px;
    font-weight: 700;
    text-decoration: none;
}
.schedule-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 48px 0 50px;
}
.schedule-actions a,
.schedule-actions button {
    min-height: 48px;
    min-width: 130px;
    border-radius: 3px;
    background: #258b58;
    box-shadow: 0 2px 4px rgba(0,0,0,.25);
    color: #fff;
    text-decoration: none;
    display: grid;
    place-items: center;
    font-size: 17px;
    font-weight: 500;
}
.select-hint {
    margin: 0 0 42px;
    text-align: center;
    color: #f3a51f;
    font-size: 22px;
    font-style: italic;
}
.schedule-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 42px;
    color: #777;
    font-size: 19px;
}
.dot,
.box {
    display: inline-block;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}
.dot {
    border-radius: 50%;
}
.dot.live { background: #26945d; }
.dot.schedule { background: #ffc02a; }
.box.private {
    border: 3px solid #4976e8;
    background: #fff8e8;
}
.box.ctb {
    border: 3px solid #ff0d0d;
    background: #fff8e8;
}
.arrival-head,
.arrival-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.4fr) repeat(3, minmax(70px, .85fr)) 68px;
    align-items: center;
    gap: 10px;
}
.arrival-head {
    margin-bottom: 14px;
    color: #111;
    font-size: 24px;
    text-align: center;
}
.arrival-row {
    min-height: 96px;
    border-bottom: 1px solid #ded8ca;
}
.route-position-link {
    text-decoration: none;
}
.route-title strong {
    display: block;
    color: #12a4d6;
    font-size: 26px;
    line-height: 1.1;
    font-weight: 400;
}
.route-title span {
    display: block;
    margin-top: 7px;
    color: #777;
    font-size: 18px;
    line-height: 1.2;
}
.time-cell {
    text-align: center;
}
.time-badge {
    display: inline-block;
    min-width: 62px;
    padding: 3px 4px;
    border: 2px solid #4777e4;
    background: #8bd300;
    color: #000;
    font-size: 22px;
    line-height: 1.05;
}
.time-badge.schedule {
    background: #ffc02a;
}
.time-badge.private {
    border-color: #4777e4;
}
.time-badge.ctb {
    border-color: #ff0d0d;
}
.empty-time {
    color: #aaa;
}
.row-map-button {
    position: relative;
    justify-self: center;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 7px;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-size: 30px;
}
.row-map-button::before {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 2px;
    background: #fff;
    transform: rotate(-45deg);
}
.row-map-button::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #000;
}
.bus-position-screen {
    min-height: calc(100vh - 70px);
    padding: 14px 16px 56px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    color: #000;
}
.bus-position-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 23px;
    line-height: 1.1;
}
.bus-position-head a {
    color: #e97800;
    text-decoration: none;
    font-weight: 900;
}
.bus-position-note {
    margin: -8px 0 10px;
    color: #aaa;
    text-align: center;
    font-size: 20px;
}
.line-diagram {
    position: relative;
    width: max-content;
    min-width: 640px;
    padding: 2px 16px 20px 116px;
    touch-action: pan-x pan-y;
}
.line-diagram::before {
    content: "";
    position: absolute;
    left: 100px;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 999px;
    background: #000;
}
.line-stop {
    position: relative;
    min-height: 54px;
    display: grid;
    grid-template-columns: 26px max-content;
    gap: 12px;
    align-items: start;
    font-size: 18px;
    line-height: 1.2;
}
.line-dot {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    border: 3px solid #000;
    border-radius: 50%;
    background: #ffff00;
}
.line-stop.current {
    color: #f00;
}
.line-stop.current .line-dot {
    background: #f00;
}
.line-stop strong {
    display: block;
    font-weight: 400;
    white-space: nowrap;
}
.line-stop small {
    display: block;
    margin-top: 2px;
    color: #111;
    font-size: 14px;
}
.line-bus {
    position: relative;
    min-height: 36px;
    margin-left: -108px;
    display: grid;
    grid-template-columns: 78px 26px 1fr;
    align-items: center;
    color: #000;
}
.line-bus span {
    font-size: 17px;
    line-height: 1;
}
.line-bus small {
    grid-column: 1;
    margin-top: -3px;
    font-size: 13px;
}
.line-bus i {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: #27c840;
    position: relative;
}
.line-bus i::before {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    top: 5px;
    height: 8px;
    border-radius: 2px;
    background: #fff;
}
.line-bus i::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 3px;
    height: 4px;
    border-left: 4px solid #fff;
    border-right: 4px solid #fff;
}
.route-map-panel {
    margin: 0 0 20px;
    background: #fff8e8;
    border: 0;
    border-radius: 0;
    padding: 0;
}
.route-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 6px;
    background: #fff8e8;
}
.route-map-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}
.route-map-header p,
.route-map-source {
    margin: 4px 0 0;
    color: #7b6a35;
    font-size: 13px;
}
.route-map-header span {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 4px;
    background: #26945d;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}
.route-map-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    border: 0;
    background: #edf0e5;
}
.route-leaflet-map {
    width: 100%;
    height: calc(100vh - 260px);
    min-height: 520px;
    z-index: 1;
}
.route-map-icon {
    display: grid;
    place-items: center;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(23, 32, 51, .28);
}
.route-map-icon.stop {
    width: 16px;
    height: 16px;
    border: 3px solid #df202b;
    background: #fff;
}
.route-map-icon.stop.section,
.route-map-icon.endpoint {
    width: 22px;
    height: 22px;
    border: 3px solid #fff;
    background: #df202b;
}
.route-map-icon.endpoint {
    background: #1257c8;
}
.route-map-icon.bus {
    width: 28px;
    height: 28px;
    border: 3px solid #ffc421;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}
.route-map-svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 300px;
}
.route-map-bg {
    fill: #edf0e5;
}
.route-line-shadow,
.route-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.route-line-shadow {
    stroke: rgba(66, 52, 16, .24);
    stroke-width: 14;
}
.route-line {
    stroke: #0f87d2;
    stroke-width: 7;
}
.route-stop {
    fill: #fff;
    stroke: #df202b;
    stroke-width: 3;
}
.route-stop.section {
    fill: #df202b;
    stroke: #fff;
}
.route-bus circle {
    fill: #111;
    stroke: #ffc421;
    stroke-width: 4;
}
.route-bus text {
    fill: #fff;
    font-size: 16px;
    font-weight: 900;
    text-anchor: middle;
}
.route-map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #6f5b1f;
    font-size: 13px;
}
.route-map-legend-top {
    justify-content: center;
    gap: 12px 22px;
    margin: 0;
    padding: 0 14px 6px;
    background: #fff8e8;
    color: #000;
    font-size: 26px;
    line-height: 1.1;
}
.route-map-legend-top em {
    flex-basis: 100%;
    color: #f18a00;
    text-align: center;
    font-size: 22px;
}
.route-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.route-legend-icon {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 32px;
    height: 42px;
}
.route-legend-icon.bus {
    background: #2e7d32;
    border-radius: 18px 18px 18px 3px;
}
.route-legend-icon.bus::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 9px;
    width: 16px;
    height: 14px;
    border-radius: 3px;
    background: #fff;
}
.route-legend-icon.bus::after {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: 9px;
    height: 5px;
    border-left: 5px solid #fff;
    border-right: 5px solid #fff;
}
.route-legend-icon.stand::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 24px;
    height: 24px;
    border: 5px solid #df202b;
    border-radius: 50%;
    background: #fff;
}
.route-legend-icon.stand::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 28px;
    width: 6px;
    height: 14px;
    background: #df202b;
    box-shadow: -6px 12px 0 -2px #df202b, 6px 12px 0 -2px #df202b;
}
.route-legend-icon.start {
    background: #f57c00;
    border-radius: 18px 18px 18px 3px;
}
.route-legend-icon.start::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    width: 18px;
    height: 18px;
    background: #fff;
    clip-path: polygon(50% 0, 62% 35%, 100% 35%, 69% 56%, 80% 92%, 50% 70%, 20% 92%, 31% 56%, 0 35%, 38% 35%);
}
.route-legend-icon.user::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 4px;
    width: 8px;
    height: 38px;
    background: #8b00ff;
}
.route-legend-icon.user::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0;
    width: 26px;
    height: 22px;
    border-radius: 50%;
    border-top: 6px solid #8b00ff;
    border-bottom: 6px solid #8b00ff;
}
.route-map-legend-bottom {
    display: none;
}
.route-line-key,
.route-stop-key,
.route-bus-key {
    display: inline-block;
    width: 18px;
    height: 10px;
    border-radius: 999px;
}
.route-line-key { background: #0f87d2; }
.route-stop-key {
    width: 13px;
    height: 13px;
    border: 3px solid #df202b;
    background: #fff;
}
.route-bus-key {
    width: 14px;
    height: 14px;
    background: #111;
    border: 3px solid #ffc421;
}
.route-map-empty {
    padding: 18px;
    border-radius: 8px;
    background: #fff8e8;
    color: #72591f;
    text-align: center;
}
.refresh-float {
    position: fixed;
    right: max(18px, calc((100vw - 560px) / 2 + 18px));
    bottom: 38px;
    color: #fff;
}

@media (max-width: 760px) {
    .schedule-results {
        padding: 18px 16px 62px;
    }
    .schedule-summary {
        grid-template-columns: 1fr 60px;
        gap: 10px;
    }
    .schedule-summary h1 {
        margin-bottom: 8px;
        font-size: 23px;
        line-height: 1.22;
        font-weight: 500;
    }
    .schedule-summary p {
        font-size: 22px;
        line-height: 1.15;
    }
    .swap-float,
    .refresh-float {
        width: 58px;
        height: 58px;
        font-size: 28px;
    }
    .schedule-actions {
        gap: 18px;
        margin: 32px 0 34px;
    }
    .schedule-actions a,
    .schedule-actions button {
        min-width: 118px;
        min-height: 44px;
        font-size: 16px;
    }
    .select-hint {
        margin-bottom: 28px;
        font-size: 20px;
        line-height: 1.22;
    }
    .schedule-legend {
        justify-content: flex-start;
        gap: 7px 9px;
        margin-bottom: 30px;
        padding-left: 42px;
        font-size: 18px;
        line-height: 1.2;
    }
    .dot,
    .box {
        width: 22px;
        height: 22px;
    }
    .arrival-head,
    .arrival-row {
        grid-template-columns: minmax(88px, 1fr) repeat(3, minmax(48px, 58px)) 46px;
        gap: 6px;
    }
    .arrival-head {
        margin-bottom: 10px;
        font-size: 24px;
    }
    .arrival-row {
        min-height: 84px;
    }
    .route-title strong {
        font-size: 23px;
        line-height: 1.05;
    }
    .route-title span {
        margin-top: 5px;
        font-size: 16px;
        line-height: 1.15;
    }
    .time-badge {
        min-width: 48px;
        padding: 2px 3px;
        font-size: 20px;
    }
    .row-map-button {
        width: 44px;
        height: 44px;
    }
    .row-map-button::before {
        width: 17px;
        height: 17px;
    }
    .row-map-button::after {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 560px) {
    .schedule-results {
        padding: 16px 14px 60px;
    }
    .schedule-summary {
        grid-template-columns: 1fr 56px;
        gap: 8px;
    }
    .schedule-summary h1 {
        font-size: 22px;
        line-height: 1.2;
    }
    .schedule-summary p {
        font-size: 20px;
        line-height: 1.15;
    }
    .swap-float,
    .refresh-float {
        width: 54px;
        height: 54px;
        font-size: 26px;
    }
    .schedule-actions {
        gap: 14px;
        margin: 28px 0 32px;
    }
    .schedule-actions a,
    .schedule-actions button {
        min-width: 112px;
        min-height: 42px;
        font-size: 15px;
    }
    .select-hint {
        margin-bottom: 26px;
        font-size: 19px;
        line-height: 1.22;
    }
    .schedule-legend {
        justify-content: flex-start;
        gap: 7px 8px;
        margin-bottom: 28px;
        padding-left: 28px;
        font-size: 17px;
        line-height: 1.2;
    }
    .dot,
    .box {
        width: 20px;
        height: 20px;
    }
    .arrival-head,
    .arrival-row {
        grid-template-columns: minmax(78px, 1fr) repeat(3, minmax(44px, 52px)) 42px;
        gap: 5px;
    }
    .arrival-head {
        font-size: 23px;
    }
    .arrival-row {
        min-height: 78px;
    }
    .route-title strong {
        font-size: 22px;
        line-height: 1.05;
    }
    .route-title span {
        font-size: 15px;
        line-height: 1.14;
    }
    .time-badge {
        min-width: 44px;
        padding: 2px 3px;
        font-size: 18px;
    }
    .row-map-button {
        width: 40px;
        height: 40px;
    }
}
