/* GitHub Learning Project 1 - KMB Bus ETA Stage 2 */
* {
    box-sizing: border-box;
}

body {
    font-family: "Microsoft JhengHei", "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #f0f4f8, #e6edf5);
    margin: 0;
    padding: 8px 8px 12px;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    background: white;
    padding: 16px 18px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* Header：進一步壓縮標題區，讓主標和下方紅線更靠近。 */
.header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 3px solid #c8102e;
}

h1 {
    color: #c8102e;
    font-size: 1.72em;
    margin: 0;
    line-height: 1.1;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

/* 搜尋區域 */
.quick-routes {
    margin-bottom: 10px;
}

.quick-routes-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    margin-bottom: 6px;
}

.quick-routes-title {
    margin: 0;
    color: #7b1021;
    font-size: 0.9em;
    font-weight: 700;
}

.quick-routes-feedback {
    margin: 0;
    color: #15803d;
    font-size: 0.82em;
    font-weight: 700;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.quick-routes-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 常用路線做成可換行的快捷膠囊；真正內容會由 localStorage 動態產生。 */
.quick-routes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-routes-empty {
    margin: 0;
    width: 100%;
    color: #6b7280;
    font-size: 0.9em;
}

.quick-route-btn {
    padding: 7px 12px;
    border: 1px solid rgba(200, 16, 46, 0.18);
    border-radius: 999px;
    background: #fff6f8;
    color: #b10f29;
    font-size: 0.9em;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(200, 16, 46, 0.08);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
}

.quick-route-btn:hover {
    background: #ffecef;
    border-color: rgba(200, 16, 46, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(200, 16, 46, 0.12);
}

.quick-route-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(200, 16, 46, 0.1);
}

.search-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 18px;
}

.input-group {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 100%;
}

input, select {
    padding: 16px 18px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 12px;
    outline: none;
}

input:focus, select:focus {
    border-color: #c8102e;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

/* 搜尋列現在只保留路線輸入框，讓輸入區更乾淨也更好點擊。 */
#routeInput {
    flex: 1;
    min-width: 0;
}

button {
    font-family: inherit;
}

#searchBtn {
    padding: 16px 32px;
    font-size: 1.1em;
    font-weight: bold;
    background: #c8102e;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

#searchBtn:hover {
    background: #a00c24;
    transform: translateY(-2px);
}

/* 狀態列 */
.status {
    text-align: center;
    margin: 8px 0 10px;
    font-size: 0.95em;
    min-height: 24px;
}

/* 結果區域 */
.result {
    text-align: left;
}

.route-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.selection-panel {
    background: linear-gradient(180deg, #fffdfd 0%, #fff5f7 100%);
    border: 1px solid rgba(200, 16, 46, 0.12);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(200, 16, 46, 0.06);
}

.selection-panel-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

/* 6A：只把上方方向選擇區的 header 壓成更緊湊的單行配置。 */
.selection-panel-header.selection-panel-header-compact {
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.selection-eyebrow {
    margin: 0 0 6px 0;
    color: #c8102e;
    font-size: 0.95em;
    font-weight: 700;
}

.selection-title {
    margin: 0;
    color: #c8102e;
    font-size: 1.8em;
    line-height: 1.2;
}

.selection-subtitle {
    margin: 8px 0 0 0;
    color: #666;
}

/* GPS 區改成同一排，按鈕放左邊、說明文字放右邊，讓上方區塊更緊湊。 */
.panel-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
}

.location-btn {
    /* 6A：GPS 按鈕再縮小一些，並強化立體陰影與按壓回饋。 */
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #b8c2cf;
    border-radius: 999px;
    background: linear-gradient(180deg, #f8fafc 0%, #d2d8e1 100%);
    color: #475569;
    cursor: pointer;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 7px 14px rgba(148, 163, 184, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: background 0.2s, transform 0.15s, color 0.2s, box-shadow 0.15s, border-color 0.2s;
    flex-shrink: 0;
}

.location-btn:hover {
    background: linear-gradient(180deg, #eef2f7 0%, #c9d2de 100%);
    transform: translateY(-1px);
    box-shadow: 0 9px 16px rgba(148, 163, 184, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.location-btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 3px 8px rgba(148, 163, 184, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.location-btn.is-active {
    background: linear-gradient(180deg, #5af58f 0%, #22c55e 100%);
    border-color: #1da94f;
    color: white;
    box-shadow: 0 8px 16px rgba(34, 197, 94, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.location-note {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.3;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.location-note::before {
    content: "📍";
    flex-shrink: 0;
}

.selection-hint,
.selection-error,
.direction-empty,
.eta-empty {
    text-align: center;
    color: #666;
}

.variant-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.variant-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.variant-group-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.variant-group-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.variant-group-title {
    margin: 0;
    font-size: 1.02em;
    color: #333;
}

.variant-group-subtitle {
    margin: 0;
    color: #666;
    font-size: 0.88em;
}

.variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
}

.variant-card-shell {
    position: relative;
}

.variant-card {
    width: 100%;
    text-align: left;
    /* 收藏星星固定在右上角，所以卡片右上預留空間避免文字被蓋住。 */
    padding: 16px 42px 10px 11px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 16px;
    background: white;
    color: #222;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.variant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.variant-card.is-selected {
    color: white;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

/* 星星按鈕獨立於卡片按鈕之外，避免影響整張方向卡片原本的點擊行為。 */
.favorite-route-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    width: 29px;
    height: 29px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #94a3b8;
    font-size: 1.08em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    transition: transform 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.favorite-route-btn:hover {
    color: #facc15;
    background: #fffdf4;
    border-color: rgba(250, 204, 21, 0.35);
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.favorite-route-btn:active {
    transform: scale(0.88);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.favorite-route-btn.is-active {
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.45);
    background: #fffbea;
}

/* 方向卡片改成三欄：起點 / 中央箭頭區 / 終點，讓「前往」能穩定置中在箭頭上方。 */
.variant-route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 40px;
}

.variant-route-origin,
.variant-route-destination {
    font-size: 0.9em;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.variant-route-origin {
    text-align: right;
}

.variant-route-destination {
    text-align: left;
}

.variant-route-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 52px;
}

.variant-route-label {
    font-size: 0.63em;
    font-weight: 700;
    color: #8a8f98;
    letter-spacing: 0.08em;
}

.variant-route-arrow {
    font-size: 1.16em;
    line-height: 1;
}

/* 公司標籤已移到群組標題，卡片本身改用邊框與重點字色保留公司色彩。 */
.variant-card.is-kmb {
    border-color: rgba(200, 16, 46, 0.18);
}

.variant-card.is-ctb {
    border-color: rgba(11, 99, 201, 0.18);
}

.variant-card.is-nlb {
    border-color: rgba(46, 139, 87, 0.2);
}

.variant-card.is-gmb {
    border-color: rgba(27, 111, 58, 0.22);
}

.variant-card.is-kmb .variant-route-arrow {
    color: #c8102e;
}

.variant-card.is-ctb .variant-route-arrow {
    color: #0b63c9;
}

.variant-card.is-nlb .variant-route-arrow {
    color: #2e8b57;
}

.variant-card.is-gmb .variant-route-arrow {
    color: #1b6f3a;
}

.variant-card.is-selected.is-kmb {
    background: linear-gradient(135deg, #c8102e, #9f0c24);
    border-color: #c8102e;
}

.variant-card.is-selected.is-ctb {
    background: linear-gradient(135deg, #0b63c9, #084b98);
    border-color: #0b63c9;
}

.variant-card.is-selected.is-nlb {
    background: linear-gradient(135deg, #2e8b57, #236b42);
    border-color: #2e8b57;
}

.variant-card.is-selected.is-gmb {
    background: linear-gradient(135deg, #1b6f3a, #15572d);
    border-color: #1b6f3a;
}

.variant-card.is-selected .variant-route {
    color: white;
}

.variant-card.is-selected .variant-route-label {
    color: rgba(255, 255, 255, 0.82);
}

.variant-card.is-selected .variant-route-arrow {
    color: white;
}

.inline-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(200, 16, 46, 0.12);
    color: #c8102e;
    font-size: 0.85em;
    font-weight: 700;
}

.inline-chip.subtle {
    background: #f3f4f6;
    color: #666;
}

.inline-chip.company-chip.is-kmb {
    background: rgba(200, 16, 46, 0.14);
    color: #c8102e;
}

.inline-chip.company-chip.is-ctb {
    background: rgba(0, 102, 204, 0.12);
    color: #0b63c9;
}

.inline-chip.company-chip.is-nlb {
    background: rgba(46, 139, 87, 0.14);
    color: #2e8b57;
}

.inline-chip.company-chip.is-gmb {
    background: rgba(27, 111, 58, 0.14);
    color: #1b6f3a;
}

.variant-card.is-selected .inline-chip.subtle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stop {
    background: white;
    padding: 0;
    margin-bottom: 0;
    border-radius: 14px;
    border-left: 7px solid #c8102e;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.stop:hover {
    transform: none;
}

.stop-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stop-header {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding-right: 14px;
}

.stop-toggle {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.stop-toggle:hover {
    background: #fff7f8;
}

.stop-toggle-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.stop-index {
    color: #c8102e;
    font-size: 0.9em;
    font-weight: 700;
}

.stop-name {
    color: #222;
    font-size: 1.15em;
    font-weight: 700;
}

.stop-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.inline-chip.location-chip {
    background: #fff1f3;
    color: #c8102e;
}

.stop-info-btn {
    width: 34px;
    height: 34px;
    align-self: center;
    border: 1px solid #d3dae6;
    border-radius: 999px;
    background: #f8fafc;
    color: #6b7280;
    font-size: 1em;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    flex-shrink: 0;
}

.stop-info-btn:hover {
    color: #0b63c9;
    border-color: rgba(11, 99, 201, 0.35);
    background: #eef6ff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(11, 99, 201, 0.12);
}

.stop-info-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(11, 99, 201, 0.1);
}

.stop-chevron {
    color: #c8102e;
    font-size: 1.4em;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.stop-chevron.is-open {
    transform: rotate(180deg);
}

.stop-eta-panel {
    border-top: 1px solid #f0d8dd;
    padding: 0 20px 18px;
}

.eta-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
}

.eta-row {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 14px 16px;
}

.eta-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.eta-destination {
    color: #555;
    font-size: 1.02em;
}

.eta-meta-line {
    margin-top: 6px;
    color: #777;
    font-size: 0.95em;
}

.eta {
    font-size: 1.85em;
    font-weight: bold;
    color: #c8102e;
    margin-right: 10px;
}

.retry-btn {
    padding: 12px 18px;
    border: 1px solid #c8102e;
    border-radius: 12px;
    background: white;
    color: #c8102e;
    cursor: pointer;
    font-size: 0.98em;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s;
}

.retry-btn:hover {
    background: #fff1f3;
    transform: translateY(-1px);
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1em;
}

.loading::after {
    content: " 🚌";
    animation: busMove 1.5s infinite;
}

@keyframes busMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(15px); }
}

body.has-modal-open {
    overflow: hidden;
}

.stop-info-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.56);
    z-index: 2000;
}

.stop-info-modal.is-open {
    display: flex;
}

.stop-info-modal-dialog {
    width: min(520px, 100%);
    max-height: min(78vh, 620px);
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 22px;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.stop-info-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.stop-info-modal-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 1.2em;
}

.stop-info-modal-subtitle {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 0.92em;
}

.stop-info-modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 1.4em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    flex-shrink: 0;
}

.stop-info-modal-close:hover {
    background: #eef2f7;
    color: #111827;
    transform: translateY(-1px);
}

.stop-info-modal-body {
    padding: 18px 20px 20px;
    overflow: auto;
}

.stop-info-section + .stop-info-section {
    margin-top: 18px;
}

.stop-info-section-header {
    margin-bottom: 10px;
}

.stop-info-section-title {
    margin: 0;
    color: #111827;
    font-size: 1em;
}

.stop-info-modal-empty {
    margin: 0;
    color: #6b7280;
    text-align: center;
    font-size: 0.98em;
}

.stop-info-modal-empty.is-loading {
    color: #475569;
}

.stop-info-route-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.stop-info-nearby-stop-card {
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: #f8fafc;
}

.stop-info-nearby-stop-card + .stop-info-nearby-stop-card {
    margin-top: 10px;
}

.stop-info-nearby-stop-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    margin-bottom: 10px;
}

.stop-info-nearby-stop-name {
    color: #111827;
    font-weight: 700;
}

.stop-info-nearby-stop-meta {
    color: #64748b;
    font-size: 0.9em;
}

.stop-info-route-btn {
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid rgba(11, 99, 201, 0.14);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #0b63c9;
    font-size: 1.02em;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(11, 99, 201, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.stop-info-route-btn .company-chip {
    flex-shrink: 0;
}

.stop-info-route-company-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.company-chip.is-neutral {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

.stop-info-route-main {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.stop-info-route-code {
    color: #0f172a;
    line-height: 1.15;
}

.stop-info-route-destination {
    color: #475569;
    font-size: 0.88em;
    font-weight: 600;
    line-height: 1.35;
}

.stop-info-route-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(11, 99, 201, 0.28);
    background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
    box-shadow: 0 10px 18px rgba(11, 99, 201, 0.14);
}

.stop-info-route-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(11, 99, 201, 0.12);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 34px;
    color: #888;
    font-size: 0.9em;
}

/* 6A：手機版把快捷路線、GPS 區與方向卡片一起收斂，避免橫向捲動。 */
@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .input-group {
        width: 100%;
    }

    input, select, #searchBtn {
        width: 100%;
    }

    .container {
        width: 100%;
        border-radius: 0;
        padding: 12px 12px 18px;
        box-shadow: none;
    }

    .header {
        margin-bottom: 10px;
        padding-bottom: 5px;
    }

    h1 {
        font-size: 1.48em;
    }

    .quick-routes {
        margin-bottom: 10px;
    }

    .quick-routes-header {
        align-items: flex-start;
    }

    .quick-routes-feedback {
        width: 100%;
        font-size: 0.8em;
    }

    .quick-routes-list {
        gap: 7px;
    }

    .quick-route-btn {
        min-width: calc(25% - 6px);
        padding: 8px 10px;
        font-size: 0.88em;
    }

    .search-box {
        gap: 10px;
        margin-bottom: 16px;
    }

    #routeInput {
        padding: 14px 16px;
        font-size: 1em;
    }

    #searchBtn {
        padding: 14px 20px;
        font-size: 1em;
    }

    .selection-panel {
        padding: 14px 12px;
        border-radius: 16px;
    }

    .selection-panel-header {
        gap: 6px;
        margin-bottom: 8px;
    }

    .selection-panel-header.selection-panel-header-compact {
        align-items: flex-start;
    }

    .panel-actions {
        align-items: flex-start;
        gap: 8px;
    }

    .location-btn {
        width: 46px;
        height: 46px;
        font-size: 0.78em;
    }

    .location-note {
        flex: 1;
        font-size: 0.86em;
        line-height: 1.25;
        padding-top: 2px;
    }

    .variant-groups {
        gap: 8px;
    }

    .variant-group-header {
        gap: 8px;
    }

    .variant-group-title {
        font-size: 0.98em;
    }

    .variant-group-subtitle {
        font-size: 0.84em;
    }

    .variant-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .variant-card {
        padding: 15px 38px 11px 10px;
        border-radius: 14px;
    }

    .favorite-route-btn {
        top: 7px;
        right: 7px;
        width: 28px;
        height: 28px;
        font-size: 1em;
    }

    .variant-route {
        gap: 6px;
        min-height: 38px;
    }

    .variant-route-origin,
    .variant-route-destination {
        font-size: 0.88em;
    }

    .variant-route-label {
        font-size: 0.61em;
    }

    .variant-route-arrow {
        font-size: 1.08em;
    }

    .selection-title {
        font-size: 1.28em;
    }

    .stop-header {
        gap: 8px;
        padding-right: 10px;
    }

    .stop-toggle {
        align-items: flex-start;
        padding: 16px 14px;
    }

    .stop-info-btn {
        width: 32px;
        height: 32px;
        margin-top: 14px;
    }

    .stop-eta-panel {
        padding: 0 14px 14px;
    }

    .stop-info-modal {
        padding: 12px;
    }

    .stop-info-modal-header {
        padding: 16px 16px 10px;
    }

    .stop-info-modal-body {
        padding: 16px;
    }

    .stop-info-nearby-stop-card {
        padding: 10px;
    }

    .stop-info-nearby-stop-header {
        align-items: flex-start;
    }

    .stop-info-route-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stop-info-route-btn {
        min-height: 64px;
        padding: 10px 12px;
        gap: 8px;
    }
}
