body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    color: #222;
}

body.modal-open {
    overflow: hidden;
    height: 100vh;
    overscroll-behavior: none;
}

.mobile-page {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #111827;
    color: #fff;
}

.topbar a,
.link-button {
    color: #fff;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card {
    padding: 16px;
}

.card-grid {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.big-card {
    display: block;
    padding: 22px;
    border-radius: 14px;
    background: #e5e7eb;
    text-decoration: none;
    color: #111;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

.disabled {
    opacity: 0.55;
}

label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

input,
button,
select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
}

button {
    margin-top: 14px;
    background: #111827;
    color: #fff;
    border: none;
}

.info-box,
.error-box,
.entry-item {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

h1,
h2,
h3 {
    margin-top: 0;
}

.hidden {
    display: none !important;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.date-nav {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.date-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.date-nav input[type="date"] {
    margin: 0;
}

.trip-card {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #dbe3ea;
}

.trip-time {
    font-weight: bold;
    margin-bottom: 8px;
}

.trip-line-main {
    line-height: 1.5;
    margin-top: 4px;
    font-size: 18px;
}

.trip-line-city {
    line-height: 1.5;
    margin-top: 2px;
    color: #334155;
}

.trip-connector {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 8px 0 6px 0;
    margin: 2px 0 8px 0;
}

.trip-km {
    grid-column: 1;
    justify-self: end;
    margin-right: 14px;
    font-size: 24px;
    font-weight: bold;
}

.trip-arrow-big {
    grid-column: 2;
    justify-self: center;
    font-size: 34px;
    line-height: 1;
}

.trip-plus {
    grid-column: 3;
    justify-self: start;
    margin-left: 14px;
    margin-top: 0;
    width: 42px;
    min-width: 42px;
    padding: 8px 0;
    font-size: 24px;
    line-height: 1;
}

.insert-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 12px;
}

.insert-modal-card {
    width: min(420px, calc(100vw - 24px));
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-sizing: border-box;
    overflow: visible;
}

.insert-modal-card * {
    max-width: 100%;
}

.insert-modal-card input,
.insert-modal-card button,
.insert-modal-card select {
    width: 100%;
    max-width: 100%;
}

.insert-modal-card .button-grid {
    overflow: hidden;
}

.insert-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.insert-button-grid {
    margin-bottom: 12px;
}

.insert-info-box {
    margin-top: 0;
}