.public-site .history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.history-heading h1 { margin-bottom: 14px; }
.history-heading p { margin: 0; }
.history-heading .eyebrow { margin-bottom: 14px; }
.history-totals { font-size: .82rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; flex-shrink: 0; padding-bottom: 4px; }
.history-totals strong { color: #ede4f8; font-weight: 650; }
.history-totals span { width: 1px; height: 14px; background: #55475e; margin: 0 9px; }
.history-tools { display: flex; align-items: flex-end; gap: 16px; padding: 20px; border: 1px solid var(--border); background: #19171f; border-radius: 14px; margin-bottom: 28px; }
.history-tools label { display: block; font-size: .8rem; color: #c5bbd1; }
.history-search { flex: 1; min-width: 0; }
.history-year { width: 150px; }
.public-site .history-tools input[type="search"], .public-site .history-tools select { margin-bottom: 0; }
.public-site .history-tools button { min-height: 48px; }
.history-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(330px, 1fr); gap: 24px; align-items: start; }
.map-panel { min-width: 0; position: sticky; top: 106px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #18171f; }
.map-caption { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; color: #cfc3de; font-size: .76rem; }
.map-caption > span { display: flex; align-items: center; gap: 8px; }
.map-caption > span:last-child { color: var(--text-muted); }
.map-dot { width: 8px; height: 8px; border-radius: 50%; background: #c3a0f5; display: inline-block; }
.map-wrapper { position: relative; height: clamp(360px, 57vh, 630px); background: #111118; }
#map { width: 100%; height: 100%; }
.map-selection { padding: 16px 20px; font-size: .8rem; color: var(--text-muted); margin: 0; border-top: 1px solid var(--border); }
.map-status { position: absolute; bottom: 42px; left: 16px; right: 16px; padding: 12px 16px; background: #231d2dee; border: 1px solid #776087; color: #e6d6f6; font-size: .84rem; border-radius: 10px; z-index: 3; }
.public-site .map-pin { border-radius: 50%; min-height: 18px; width: 18px; height: 18px; padding: 0; background: #ba8de9; border: 3px solid #efe0ff; box-shadow: 0 0 0 5px #ba8de922, 0 3px 8px #0008; }
.public-site .map-pin:hover { background: #fff; }
.public-site .maplibregl-ctrl-group { background: #211d29; border: 1px solid #5a4a65; box-shadow: 0 3px 14px #0006; border-radius: 9px; overflow: hidden; }
.public-site .maplibregl-ctrl-group button { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 0; border-color: #4d4058; background: transparent; display: block; }
.public-site .maplibregl-ctrl-group button:hover { background: #41334e; }
.public-site .maplibregl-ctrl-icon { filter: invert(1); }
.public-site .maplibregl-ctrl-attrib { background: #17131de8; color: #c7b9d5; font-size: 10px; }
.public-site .maplibregl-ctrl-attrib a { color: #ddd0e9; }
.public-site .maplibregl-ctrl-attrib-button { padding: 0; min-height: 24px; width: 24px; border-radius: 50%; background-color: #d5c3e6; }
.public-site .maplibregl-popup-content { background: #211b2a; color: #ded0ed; border: 1px solid #766284; border-radius: 12px; padding: 18px 30px 18px 18px; font: 13px/1.6 "Segoe UI", system-ui, sans-serif; max-height: 260px; overflow-y: auto; }
.public-site .maplibregl-popup-content h3 { font-size: 1rem; margin: 0 0 7px; }
.public-site .maplibregl-popup-content p { margin: 0; }
.public-site .maplibregl-popup-close-button { background: transparent; padding: 0; min-height: 28px; width: 28px; height: 28px; border: 0; border-radius: 0; font-size: 20px; }
.public-site .maplibregl-popup-tip { border-top-color: #766284; }
.history-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 18px; }
.history-list-heading h2 { font-size: 1.1rem; margin: 0; }
.history-list-heading span { color: var(--text-muted); font-size: .76rem; }
.history-list { max-height: min(80vh, 850px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #655471 #19161f; padding: 2px 10px 4px 2px; }
.history-card { border: 1px solid var(--border); background: var(--bg-card); border-radius: 14px; padding: 20px; margin-bottom: 14px; }
.history-card.selected { border-color: #c3a0f5; background: #25202f; }
.history-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.history-card time { font-size: .77rem; color: #c3a0f5; margin-right: auto; }
.history-badge { font-size: .62rem; letter-spacing: .04em; color: #caeedc; padding: 2px 7px; background: #233a31; border: 1px solid #486556; border-radius: 5px; }
.history-badge.virtual { color: #dac7f0; background: #30273d; border-color: #635073; }
.history-card-title { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.history-card-title h3 { font-size: 1.07rem; margin: 0; }
.history-card-title img { object-fit: contain; flex-shrink: 0; border-radius: 6px; }
.history-location { color: var(--text-muted); font-size: .81rem; margin: 8px 0 0; }
.history-classes { color: #ccc2d7; font-size: .81rem; line-height: 1.7; margin: 14px 0; padding-top: 13px; border-top: 1px solid var(--border); }
.history-card-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: .76rem; }
.public-site .history-focus { background: #2d2339; border: 1px solid #5b406c; color: #e1c7fb; font-size: .74rem; padding: 6px 10px; min-height: 40px; border-radius: 7px; }
.history-card-actions a { padding: 10px 0; }
.history-empty { padding: 24px; border: 1px dashed #61516e; border-radius: 12px; color: var(--text-muted); }
@media (max-width: 1000px) {
    .public-site .history-heading { flex-direction: column; align-items: flex-start; gap: 18px; }
    .history-layout { grid-template-columns: minmax(0, 1.2fr) minmax(310px, 1fr); gap: 18px; }
    .map-caption > span:last-child { display: none; }
}
@media (max-width: 760px) {
    .history-layout { grid-template-columns: minmax(0, 1fr); }
    .map-panel { position: static; }
    .map-wrapper { height: 340px; }
    .history-tools { flex-wrap: wrap; padding: 16px; gap: 12px; }
    .history-search { flex-basis: 100%; }
    .history-year { flex: 1; width: auto; }
    .history-list { max-height: none; overflow: visible; padding: 0; }
    .history-list-heading { margin-top: 14px; }
    .history-card { padding: 18px; }
    .map-caption, .map-selection { padding: 14px 16px; }
}
