:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
    background: #f1f1f1;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.site-banner {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: #168ac7;
    box-shadow: 0 2px 6px rgb(0 0 0 / 16%);
}
.site-banner h1 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.65rem);
    font-weight: 750;
}
.home-button {
    flex: 0 0 auto;
    padding: 9px 15px;
    border: 1px solid rgb(255 255 255 / 75%);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}
.home-button:hover { background: rgb(255 255 255 / 14%); }
.trip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 12px;
    width: 100%;
    padding: 16px;
}
.trip-card {
    position: relative;
    display: flex;
    min-height: 235px;
    overflow: hidden;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(145deg, #0797d0, #75c9e5 58%, #dbc6a5);
    box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}
.trip-card::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    background-image: var(--trip-cover);
    background-position: center;
    background-size: cover;
    content: "";
}
.trip-map-overlay {
    position: absolute;
    z-index: -1;
    top: 12px;
    right: 12px;
    width: 25%;
    height: 25%;
    background-image: var(--trip-map);
    background-position: top right;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}
.trip-card::after {
    position: absolute;
    z-index: 0;
    inset: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 0%) 34%, rgb(0 0 0 / 64%) 100%);
    content: "";
}
.trip-companions,
.trip-info {
    z-index: 1;
}
.trip-card:hover { box-shadow: 0 4px 14px rgb(0 0 0 / 22%); }
.trip-companions {
    position: absolute;
    top: 24px;
    left: 20px;
    display: flex;
    padding-left: 0;
}
.trip-companions img {
    width: 34px;
    height: 34px;
    margin-left: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ddd;
    object-fit: cover;
}
.trip-companions img.owner {
    border: 4px solid #063b70;
    box-shadow: none;
}
.trip-companions img:first-child { margin-left: 0; }
.trip-info { min-width: 0; }
.trip-info h2 {
    margin: 0 0 10px;
    overflow-wrap: anywhere;
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 1px 3px rgb(0 0 0 / 45%);
}
.trip-summary {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    min-height: 32px;
}
.trip-stat { min-width: 0; }
.trip-stat strong,
.trip-stat span {
    display: block;
}
.trip-stat strong {
    font-size: 0.95rem;
    line-height: 1.1;
}
.trip-stat span {
    margin-top: 2px;
    font-size: 0.75rem;
    line-height: 1.15;
}
.trip-owner {
    margin: 8px 0 0;
    font-size: 0.75rem;
    font-weight: 650;
    text-shadow: 0 1px 3px rgb(0 0 0 / 60%);
}
.trip-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 0;
    font-size: 0.76rem;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgb(0 0 0 / 60%);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.trip-empty {
    grid-column: 1 / -1;
    padding: 24px;
    color: #555;
    text-align: center;
}
@media (max-width: 640px) {
    .site-banner { min-height: 56px; padding: 10px 14px; }
    .home-button { padding: 8px 11px; font-size: 0.82rem; }
    .trip-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
        gap: 8px;
        padding: 10px;
    }
    .trip-card {
        min-height: clamp(170px, 58vw, 235px);
        padding: 12px;
        border-radius: 18px;
    }
    .trip-companions { top: 16px; left: 14px; }
    .trip-companions img { width: 30px; height: 30px; }
    .trip-info h2 { font-size: clamp(0.95rem, 4vw, 1.2rem); }
    .trip-summary { gap: 8px; }
    .trip-stat strong { font-size: 0.82rem; }
    .trip-stat span { font-size: 0.68rem; }
    .trip-owner { font-size: 0.7rem; }
}
