* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    background: #fff;
    color: #111;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Map fills the screen; the panel sits on the right (below the map on phones). */
.app {
    display: grid;
    grid-template-columns: 1fr 400px;
    height: 100vh;
}

.map {
    height: 100%;
}

.panel {
    overflow-y: auto;
    padding: 16px;
    border-left: 2px solid #ddd;
}

@media (max-width: 800px) {
    .app {
        grid-template-columns: 1fr;
        height: auto;
    }

    .map {
        height: 65vh;
    }

    .panel {
        border-left: none;
        border-top: 2px solid #ddd;
    }
}

.logo {
    display: block;
    width: 140px;
    margin: 0 auto 8px;
}

h2 {
    font-size: 15px;
    letter-spacing: 0.08em;
    color: #444;
    margin: 24px 0 4px;
}

p {
    margin: 0 0 8px;
}

label {
    display: block;
    font-weight: 700;
    margin: 12px 0 4px;
}

input[type="text"],
input[type="search"],
select {
    width: 100%;
    min-height: 44px;
    font: inherit;
    padding: 6px 10px;
    border: 2px solid #333;
    border-radius: 8px;
    background: #fff;
}

button {
    font: inherit;
    cursor: pointer;
}

.row {
    display: flex;
    gap: 8px;
}

.row select,
.row input {
    flex: 1;
    min-width: 0;
}

.big {
    display: block;
    width: 100%;
    min-height: 52px;
    margin: 12px 0;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    text-decoration: none;
}

.primary {
    background: #0b63ce;
}

a.big[aria-disabled="true"] {
    background: #999;
    pointer-events: none;
}

.small-btn {
    min-height: 44px;
    padding: 0 12px;
    background: #fff;
    color: #111;
    border: 2px solid #999;
    border-radius: 8px;
    flex: none;
}

.hint {
    font-size: 14px;
    color: #444;
    margin: 6px 0 0;
}

.route-info {
    font-weight: 700;
}

.error {
    color: #b00020;
    font-weight: 700;
    margin-top: 12px;
}

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

.list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.list .mark {
    width: 24px;
    flex: none;
    font-weight: 700;
}

.list .text {
    flex: 1;
    cursor: pointer;
}

.list .sub {
    display: block;
    font-size: 14px;
    color: #444;
}

/* Driver per leg: Person 1 = pink, Person 2 = blue. */
.list li.p1 {
    background: #fde2ef;
    border-left: 6px solid #d63384;
    padding-left: 6px;
}

.list li.p2 {
    background: #dceafd;
    border-left: 6px solid #0b63ce;
    padding-left: 6px;
}

.leg {
    display: block;
    margin-top: 4px;
    padding: 4px 8px;
    font-size: 14px;
    text-align: left;
    background: #fff;
    color: #111;
    border: 1px solid #999;
    border-radius: 6px;
}

.p1 .leg {
    border-color: #d63384;
    color: #a3125f;
    font-weight: 700;
}

.p2 .leg {
    border-color: #0b63ce;
    color: #0b4fa3;
    font-weight: 700;
}
