body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    color: #333;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.header {
    background: var(--group-color);
    color: white;
    padding: 2rem;
    text-align: center;
}
.header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}
.header p {
    margin: 0;
    opacity: 0.9;
}
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}
.stat {
    flex: 1 1 150px;
    text-align: center;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--group-color);
}
.stat-value .days-count {
    font-size: 0.67em; /* 2/3 of parent font size */
    font-weight: normal;
    opacity: 0.8;
}
.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}
.activities {
    padding: 2rem;
}
.activities h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
th,
td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}
th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    cursor: pointer;
    user-select: none;
    position: relative;
}
th:hover {
    background: #e9ecef;
}
th.sortable::after {
    content: ' ↕️';
    font-size: 0.8em;
    opacity: 0.5;
}
th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}
th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}
tr:hover {
    background: #f8f9fa;
}
a {
    color: var(--group-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .header {
        padding: 1rem;
    }
    .header h1 {
        font-size: 1.5rem;
    }
    .stats {
        padding: 1rem;
    }

    .activities {
        padding: 1rem;
    }
    table {
        font-size: 0.9rem;
    }
    th,
    td {
        padding: 0.5rem;
    }
}
#map_leaflet {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.map-container {
    padding: 2rem;
    position: relative;
}
.maplibregl-ctrl-group .projection-toggle {
    background: white;
    border: none;
    width: 100%;
    padding: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}
.maplibregl-ctrl-group .projection-toggle:hover {
    background: #f0f0f0;
}
.activity-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.activity-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}
.activity-name-cell a:hover {
    text-decoration: underline !important;
}
.activity-row {
    cursor: pointer;
    transition: background-color 0.2s;
}
.activity-row:hover {
    background-color: #f8f9fa;
}
.activity-row.highlighted {
    background-color: #e3f2fd;
}
@media (max-width: 768px) {
    .map-container {
        padding: 1rem;
    }
}
