:root {
    --bg: #f2f2f7;
    --card: #fff;
    --text: #111;
    --sub: #8e8e93;
    --blue: #007aff;
}

html {
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);

    /* FIX Telegram viewport */
    height: calc(var(--vh, 1vh) * 100);
}

/* APP */

.app {
    max-width: 500px;
    margin: 0 auto;

    min-height: calc(var(--vh, 1vh) * 100);
    padding-bottom: 110px;
}

/* HEADER */

.header {
    padding: 16px;
}

.header h1 {
    margin: 0;
    font-size: 22px;
}

.location {
    font-size: 14px;
    color: var(--sub);
}

/* GRID */

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
}

.card {
    background: var(--card);
    border-radius: 16px;
    padding: 14px;
    min-height: 110px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.12s ease;

    position: relative;
}

.card:active {
    transform: scale(0.97);
}

/* availability badge */
.availability {
    position: absolute;
    top: 10px;
    right: 10px;

    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;

    background: rgba(0,0,0,0.05);
    color: #555;
}

/* BOOKING */

.page {
    display: none;
}

.page.active {
    display: block;
}

.back {
    color: var(--blue);
    cursor: pointer;
    margin-bottom: 6px;
}

.car-icon {
    font-size: 60px;
    text-align: center;
    margin: 10px 0;
}

.booking-content {
    padding: 16px;
}

.block {
    margin-top: 20px;
}

.block-title {
    font-weight: 600;
    margin-bottom: 8px;
}

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

select {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

/* TIMELINE */

.timeline {
    display: flex;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
    background: #eee;
}

.slot {
    flex: 1;
}

.slot.free { background: #34c759; }
.slot.busy { background: #ff3b30; }