@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700;800&display=swap");
.sn-history-mount{--sn-bg:#f3f0e9;--sn-panel:#fff;--sn-text:#171717;--sn-muted:#6b6862;--sn-line:#d7d2c7;--sn-accent:#9e2a2b;--sn-map:#e8e4db;color:var(--sn-text);font:15px/1.5 "DM Sans",sans-serif;isolation:isolate;container:sn-map / inline-size}
.sn-history-mount[data-theme="dark"]{--sn-bg:#171717;--sn-panel:#222;--sn-text:#f7f4ed;--sn-muted:#aaa49a;--sn-line:#45413a;--sn-map:#282828}
.sn-history-mount *{box-sizing:border-box}
.sn-history-mount :is(h1,h2,h3,h4,h5,h6,button,select){font-family:"DM Sans",sans-serif}
.sn-history-app{height:var(--sn-history-height,720px);min-height:420px;background:var(--sn-bg);border:1px solid var(--sn-line);border-radius:18px;overflow:hidden;box-shadow:0 12px 40px #00000014;display:grid;grid-template-rows:auto 3px minmax(0,1fr)}
.sn-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:18px 22px;background:var(--sn-panel);border-bottom:1px solid var(--sn-line)}
.sn-history-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.14em;color:var(--sn-muted)}
.sn-history-title{font-family:"DM Sans",sans-serif;font-size:clamp(24px,3vw,38px);line-height:1.1;margin:4px 0;color:var(--sn-text)}
.sn-history-subtitle{color:var(--sn-muted);max-width:760px;font-size:13px}
.sn-history-controls{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;flex-shrink:0;max-width:330px}
.sn-history-btn{font:inherit;border:1px solid var(--sn-line);background:var(--sn-panel);color:var(--sn-text);border-radius:999px;padding:8px 12px;cursor:pointer}
.sn-history-btn:hover,.sn-history-btn[aria-pressed="true"]{border-color:var(--sn-accent);color:var(--sn-accent)}
.sn-history-btn:disabled{opacity:.4;cursor:default}
.sn-history-mount button:focus-visible,.sn-history-mount select:focus-visible,.sn-history-detail:focus-visible{outline:3px solid #317ec0;outline-offset:-3px}
.sn-history-progress{background:var(--sn-line)}
.sn-history-progress>i{display:block;height:100%;background:var(--sn-accent);width:0;transition:width .3s}
.sn-history-body{--sn-timeline-width:200px;display:grid;grid-template-columns:var(--sn-timeline-width) minmax(0,1fr);min-height:0;overflow:hidden}
.sn-history-body.sn-history-detail-open{grid-template-columns:var(--sn-timeline-width) minmax(250px,29%) minmax(0,1fr)}
.sn-history-side{min-height:0;min-width:0;background:var(--sn-panel);border-right:1px solid var(--sn-line);display:grid;grid-template-rows:auto minmax(0,1fr)}
.sn-history-filter{padding:10px 12px;border-bottom:1px solid var(--sn-line);font-size:11px;color:var(--sn-muted)}
.sn-history-filter select{display:block;width:100%;min-width:0;margin-top:4px;font:inherit;font-size:12px;border:1px solid var(--sn-line);border-radius:6px;background:var(--sn-panel);color:var(--sn-text);padding:6px}
.sn-history-list{overflow:auto;overscroll-behavior:contain;min-height:0;scrollbar-gutter:stable;padding-bottom:18px}
.sn-history-day{position:relative;margin:0;padding:20px 10px 14px 30px;font:800 17px/1.3 "DM Sans",sans-serif;color:var(--sn-text);border-top:1px solid var(--sn-line);background:var(--sn-bg)}
.sn-history-day:first-child{border-top:0}
.sn-history-event{position:relative;width:100%;display:grid;grid-template-columns:minmax(0,1fr) 24px 30px;gap:8px;align-items:center;text-align:left;font:inherit;line-height:1.3;padding:12px 10px 12px 30px;border:0;background:transparent;color:var(--sn-text);cursor:pointer;min-height:52px}
.sn-history-event:before,.sn-history-day:before{content:"";position:absolute;left:13px;top:0;bottom:0;width:2px;background:var(--sn-line)}
.sn-history-event:after,.sn-history-day:after{content:"";position:absolute;left:9px;top:50%;transform:translateY(-50%);width:10px;height:10px;border-radius:50%;border:2px solid var(--sn-panel);background:var(--actor-color,var(--sn-text));box-shadow:0 0 0 1px var(--sn-line)}
.sn-history-day:after{left:8px;width:12px;height:12px}
.sn-history-event.active:after{box-shadow:0 0 0 3px color-mix(in srgb,var(--actor-color) 30%,var(--sn-panel))}
.sn-history-event:hover{background:var(--sn-bg)}
.sn-history-event.active{background:color-mix(in srgb,var(--actor-color) 11%,var(--sn-panel));border-left-color:var(--actor-color)}
.sn-history-time{font-variant-numeric:tabular-nums;font-weight:700;font-size:12px;overflow-wrap:anywhere}
.sn-history-event-icon{color:var(--actor-color);width:24px;height:24px}
.sn-history-event-icon svg{width:100%;height:100%}
.sn-history-flag{display:inline-flex;position:relative;flex-shrink:0;width:30px;height:20px;align-items:center;justify-content:center;overflow:hidden;background:var(--actor-color,#64748b);color:#fff;border:1px solid #0003;border-radius:2px;font:bold 9px/1 "DM Sans",sans-serif;letter-spacing:.02em;box-shadow:0 1px 2px #0002}
.sn-history-flag-csr{background:linear-gradient(#fff 50%,#d73439 50%)}
.sn-history-flag-csr:before{content:"";position:absolute;inset:0;background:#24568e;clip-path:polygon(0 0,55% 50%,0 100%)}
.sn-history-detail{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:20px;background:var(--sn-panel);border-right:1px solid var(--sn-line);overflow-wrap:anywhere}
.sn-history-detail[hidden]{display:none}
.sn-history-detail-close{display:block;margin:0 0 14px auto;padding:5px 8px;background:var(--sn-bg);border:1px solid var(--sn-line);border-radius:6px;color:var(--sn-text);font:inherit;font-size:12px;cursor:pointer}
.sn-history-detail-actor{display:flex;gap:8px;align-items:center;font-size:11px;color:var(--actor-color);margin-bottom:18px;font-weight:600}
.sn-history-cat{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--sn-muted);margin-bottom:6px}
.sn-history-detail h3{font:700 25px/1.15 "DM Sans",sans-serif;margin:0 0 12px;color:var(--sn-text)}
.sn-history-detail h3>svg{width:24px;height:24px;margin-right:7px;vertical-align:-3px}
.sn-history-card-meta{font-size:12px;color:var(--sn-muted);margin-bottom:16px;line-height:1.7}
.sn-history-detail p{margin:12px 0}
.sn-history-detail img,.sn-history-detail video{max-width:100%;height:auto;border-radius:6px}
.sn-history-detail figure,.sn-history-detail .wp-caption{max-width:100%;margin:16px 0}
.sn-history-detail .wp-caption-text,.sn-history-detail figcaption{font-size:12px;color:var(--sn-muted)}
.sn-history-description{display:flow-root}
.sn-history-description .alignleft{float:left;margin:4px 14px 10px 0;max-width:60%}
.sn-history-description .alignright{float:right;margin:4px 0 10px 14px;max-width:60%}
.sn-history-description .aligncenter{display:block;margin:16px auto}
.sn-history-description h2,.sn-history-description h3,.sn-history-description h4{font-size:20px;margin:18px 0 8px}
.sn-history-description ul,.sn-history-description ol{padding-left:22px}
.sn-history-detail a{color:#2365a2;text-decoration:underline}
.sn-history-detail .sn-history-edit,.sn-history-detail .sn-history-delete,.sn-history-detail .sn-history-move{display:inline-block;width:fit-content;border:1px solid var(--sn-line);border-radius:6px;padding:6px 9px;font-size:12px;text-decoration:none;margin:0 4px 14px 0}
.sn-history-detail .sn-history-delete{color:#b32d2e}
.sn-history-people,.sn-history-source{font-size:12px;color:var(--sn-muted)}
.sn-history-source{border-top:1px solid var(--sn-line);padding-top:12px;margin-top:20px}
.sn-history-warning{font-size:11px;color:#78520b;background:#fff3cf;border-radius:8px;padding:9px;margin-top:14px}
.sn-history-mapwrap{position:relative;min-width:0;min-height:0;background:var(--sn-map)}
.sn-history-map{position:absolute;inset:0;--sn-night:0;background:var(--sn-map)}
/* Tone only the basemap. Icons, routes, labels and map controls stay legible. */
.sn-history-map .leaflet-tile-pane{filter:brightness(calc(1 - var(--sn-night)*.58)) saturate(calc(1 - var(--sn-night)*.45));transition:filter 1.2s ease}
.sn-history-map .leaflet-tile-pane:after{content:"";position:absolute;inset:-100vh -100vw;background:#163b6e;opacity:calc(var(--sn-night)*.32);pointer-events:none;mix-blend-mode:color;transition:opacity 1.2s ease}
.sn-history-legend{position:absolute;z-index:600;bottom:28px;left:12px;max-width:calc(100% - 24px);display:grid;grid-template-columns:30px 1fr;gap:5px 8px;align-items:center;padding:9px 11px;border:1px solid var(--sn-line);border-radius:8px;background:color-mix(in srgb,var(--sn-panel) 94%,transparent);font-size:10px;color:var(--sn-text);pointer-events:none}
.sn-history-map .leaflet-container{font:inherit}
.sn-history-marker{border:0;background:transparent}
.sn-history-pin{position:relative;display:flex;align-items:center;justify-content:center;width:34px;height:34px;background:var(--actor-color);color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 7px #0007;transition:transform .25s,box-shadow .25s}
.sn-history-pin>.sn-history-flag{position:absolute;top:-6px;right:-9px;width:24px;height:16px;border:1px solid #fff;border-radius:2px;font-size:8px;box-shadow:0 1px 3px #0006;pointer-events:none}
.sn-history-pin svg{width:21px;height:21px}
.sn-history-marker.active .sn-history-pin{transform:scale(1.2);box-shadow:0 0 0 5px color-mix(in srgb,var(--actor-color) 25%,transparent),0 3px 9px #0006}
.sn-history-route-arrow{background:none;border:0;pointer-events:none}
.sn-history-route-arrow span,.sn-history-route-arrow svg{display:block;width:24px;height:24px}
.sn-history-context-menu{position:absolute;z-index:1100;width:230px;max-width:calc(100% - 8px);padding:6px;border:1px solid var(--sn-line);border-radius:8px;background:var(--sn-panel);color:var(--sn-text);box-shadow:0 5px 24px #0004;font:12px/1.4 "DM Sans",sans-serif}
.sn-history-context-menu[hidden]{display:none}
.sn-history-context-menu button,.sn-history-context-menu a[role="menuitem"]{box-sizing:border-box;text-decoration:none;display:block;width:100%;border:0;border-radius:4px;padding:10px 8px;font:inherit;text-align:left;background:transparent;color:inherit;cursor:pointer}
.sn-history-context-menu button:hover,.sn-history-context-menu a[role="menuitem"]:hover{background:var(--sn-bg)}
.sn-history-gps,.sn-history-copy-status{display:block;padding:3px 8px;font-size:11px;color:var(--sn-muted)}
.sn-history-context-menu input{width:100%;font:12px monospace;padding:6px}
.sn-history-bubble.leaflet-tooltip{white-space:normal;max-width:320px;width:max-content;min-width:230px;box-sizing:border-box;text-align:left;font:16px/1.35 "DM Sans",sans-serif;color:#fff;background:#000;border:0;border-radius:0;padding:16px 20px;box-shadow:none;animation:sn-history-bubble-fade 6s ease forwards;pointer-events:none}
.sn-history-bubble.leaflet-tooltip:before{content:"";display:block;position:absolute;top:100%;bottom:auto;left:50%;right:auto;width:24px;height:12px;margin:0;border:0;transform:translateX(-50%);background:inherit;clip-path:polygon(0 0,100% 0,50% 100%);pointer-events:none}
.sn-history-mount[data-video-layout="1"] .sn-history-bubble.leaflet-tooltip:before{width:48px;height:24px}
.sn-history-bubble-meta{display:flex;align-items:center;justify-content:space-between;gap:24px}
.sn-history-bubble-clock{min-width:0}
.sn-history-bubble-qualifier{display:block;font-size:.75em;font-weight:700;text-transform:uppercase}
.sn-history-bubble-time{display:block;font-size:1.75em;line-height:1.1;overflow-wrap:anywhere}
.sn-history-bubble-date{display:block;font-size:1em;white-space:nowrap;color:inherit}
.sn-history-bubble-title{margin-top:12px;font-family:"DM Mono",monospace;font-weight:500;overflow-wrap:anywhere}
@keyframes sn-history-bubble-fade{0%,38%{opacity:1}100%{opacity:0}}
.sn-history-loader,.sn-history-error{padding:32px;background:var(--sn-panel,#fff);border:1px solid var(--sn-line,#ddd);border-radius:12px}
@container sn-map (max-width:1000px){.sn-history-body{--sn-timeline-width:180px}.sn-history-body.sn-history-detail-open{grid-template-columns:var(--sn-timeline-width) minmax(220px,30%) minmax(0,1fr)}.sn-history-detail{padding:16px}.sn-history-event{gap:5px;padding-left:30px;padding-right:6px}.sn-history-head{padding:14px 16px}.sn-history-title{font-size:28px}}
@container sn-map (max-width:720px){.sn-history-app{height:auto;min-height:0}.sn-history-head{display:block}.sn-history-controls{justify-content:flex-start;max-width:none;margin-top:12px}.sn-history-body,.sn-history-body.sn-history-detail-open{grid-template-columns:150px minmax(0,1fr);grid-template-rows:340px minmax(280px,48vh)}.sn-history-mapwrap{grid-column:1/-1;grid-row:1}.sn-history-side{grid-column:1/-1;grid-row:2}.sn-history-detail-open .sn-history-side{grid-column:1}.sn-history-detail{grid-column:2;grid-row:2;border-right:0;padding:12px}.sn-history-detail h3{font-size:21px}.sn-history-time{font-size:11px}.sn-history-day{font-size:16px}.sn-history-event{gap:4px;grid-template-columns:minmax(0,1fr) 21px 26px}.sn-history-event .sn-history-flag{width:26px;height:18px}.sn-history-event-icon{width:21px;height:21px}.sn-history-legend{font-size:9px;gap:3px 6px;bottom:22px;padding:6px 8px}.sn-history-subtitle{font-size:12px}}
@media(prefers-reduced-motion:reduce){.sn-history-map .leaflet-tile-pane,.sn-history-map .leaflet-tile-pane:after,.sn-history-progress>i,.sn-history-pin{transition:none}.sn-history-bubble.leaflet-tooltip{animation:none}}
/* Map overlays share the focus time's day/night color. */
.sn-history-focus{position:absolute;z-index:650;top:22px;left:50%;transform:translateX(-50%);width:calc(100% - 112px);text-align:center;color:var(--sn-focus-color,#000);pointer-events:none;line-height:1.1;transition:color 1.2s ease}
.sn-history-focus-date{display:block;font-size:clamp(20px,3.2cqw,40px);font-weight:600}
.sn-history-focus-time{display:block;margin-top:8px;font-size:clamp(32px,5cqw,64px);font-weight:800;font-variant-numeric:tabular-nums}
.sn-history-mapwrap .sn-history-controls{position:absolute;z-index:650;bottom:30px;left:50%;transform:translateX(-50%);display:flex;flex-wrap:nowrap;align-items:center;gap:12px;margin:0;max-width:none;color:var(--sn-focus-color,#000);transition:color 1.2s ease}
.sn-history-controls .sn-history-btn{display:grid;place-items:center;width:64px;height:64px;padding:18px;border:0;background:var(--sn-focus-color,#000);color:var(--sn-control-ink,#fff);border-radius:50%;box-shadow:none;transition:transform .2s}
.sn-history-controls .sn-history-btn[data-play]{color:var(--sn-control-ink,#fff)}
.sn-history-controls .sn-history-btn:hover:not(:disabled){transform:scale(1.08)}
.sn-history-controls :is(svg,img){width:100%;height:100%;object-fit:contain}
.sn-history-map-tools{position:absolute;z-index:650;right:16px;bottom:30px;display:flex;flex-direction:column;align-items:flex-end;gap:14px}
.sn-history-fit{display:grid;place-items:center;width:44px;height:44px;padding:10px}
.sn-history-fit :is(svg,img){width:24px;height:24px}
.sn-history-brand{display:block;padding:6px;border-radius:5px;background:#fff}
.sn-history-brand img{display:block;width:150px;height:23px;max-width:none}
.sn-history-legend{bottom:112px;max-width:calc(100% - 24px)}
.sn-history-event:after,.sn-history-day:after,.sn-history-event.active:after{border:0;box-shadow:none}
.sn-history-event-icon img,.sn-history-pin>img,.sn-history-detail h3>img{width:24px;height:24px;object-fit:contain;vertical-align:middle}
.sn-hide-header .sn-history-head,.sn-hide-timeline .sn-history-side,.sn-hide-legend .sn-history-legend{display:none}
.sn-hide-header .sn-history-app{grid-template-rows:3px minmax(0,1fr)}
.sn-hide-progress .sn-history-progress{display:none}
.sn-hide-progress .sn-history-app{grid-template-rows:auto minmax(0,1fr)}
.sn-hide-header.sn-hide-progress .sn-history-app{grid-template-rows:minmax(0,1fr)}
.sn-hide-timeline .sn-history-body{grid-template-columns:minmax(0,1fr)}
.sn-hide-timeline .sn-history-body.sn-history-detail-open{grid-template-columns:minmax(250px,29%) minmax(0,1fr)}
@container sn-map (max-width:720px){
 .sn-history-focus{top:18px}
 .sn-history-map-tools{bottom:112px;right:8px;gap:8px}
 .sn-history-brand img{width:110px;height:auto}
 .sn-history-legend{bottom:108px;max-width:calc(100% - 152px)}
 .sn-hide-timeline .sn-history-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(340px,var(--sn-history-height,480px))}
 .sn-hide-timeline .sn-history-body.sn-history-detail-open{grid-template-columns:minmax(0,1fr);grid-template-rows:340px minmax(280px,48vh)}
 .sn-hide-timeline .sn-history-detail{grid-column:1;grid-row:2}
}
@media(prefers-reduced-motion:reduce){.sn-history-focus,.sn-history-mapwrap .sn-history-controls,.sn-history-controls .sn-history-btn[data-play]{transition:none}}

.sn-hide-controls .sn-history-controls,.sn-hide-controls .sn-history-fit,.sn-hide-controls .sn-history-filter,.sn-hide-controls .sn-history-detail,.sn-hide-controls .sn-history-context-menu,.sn-hide-controls .leaflet-control-zoom{display:none}
.sn-hide-controls .sn-history-side{grid-template-rows:minmax(0,1fr)}
.sn-hide-controls .sn-history-event{cursor:default}
.sn-hide-branding .sn-history-brand{display:none}
.sn-history-progress>i{transition:none}
@container sn-map (min-width:721px){.sn-history-map-tools{bottom:112px}}
/* Mono headings and clock; flags sit above their event icon. */
.sn-history-mount :is(h1,h2,h3,h4,h5,h6),.sn-history-focus,.sn-history-time,.sn-history-card-meta,.sn-history-bubble-date,.sn-history-bubble strong{font-family:"DM Mono",monospace;font-weight:500}
.sn-history-focus :is(strong,span){font-weight:500}
.sn-history-event{grid-template-columns:minmax(0,1fr) 34px;padding-right:16px}
.sn-history-event-icon{position:relative;isolation:isolate}
.sn-history-event-icon>svg,.sn-history-event-icon>img,.sn-history-pin>svg,.sn-history-pin>img{position:relative;z-index:1}
.sn-history-event .sn-history-event-icon>.sn-history-flag{position:absolute;z-index:3;top:-7px;right:-10px;width:19px;height:13px;font-size:6px;pointer-events:none}
.sn-history-pin{border:0}
.sn-history-marker.active .sn-history-pin{box-shadow:0 3px 9px #0006}
.sn-history-pin>.sn-history-flag{z-index:3;border:0}
.sn-history-flag-custom{background:transparent;border:0;box-shadow:none}
.sn-history-mount .sn-history-flag>img{display:block;width:100%;height:100%;max-width:none;object-fit:contain;border-radius:0}
.sn-history-skip{position:absolute;z-index:660;top:140px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);padding:7px 12px;border-radius:8px;background:var(--sn-panel);color:var(--sn-text);font:400 12px/1.4 "DM Mono",monospace;text-align:center;pointer-events:none;box-shadow:0 3px 16px #0002}
.sn-history-skip[hidden]{display:none}
.sn-history-mapwrap{overflow:hidden}
.sn-history-ribbon{pointer-events:none;background:none;border:0}
.sn-history-ribbon svg,svg.sn-history-ribbon{display:block;max-width:none;overflow:visible}
.sn-history-skipping[data-skip-effect="full"] .sn-history-map{will-change:transform,filter;animation:sn-history-time-warp var(--sn-skip-duration,1s) ease-in-out both}
@keyframes sn-history-time-warp{0%,100%{filter:blur(0);transform:scale(1) translateX(0) skewX(0)}20%{filter:blur(8px);transform:scale(1.045) translateX(-.6%) skewX(-.7deg)}50%{filter:blur(10px);transform:scale(1.055) translateX(.6%) skewX(.7deg)}80%{filter:blur(8px);transform:scale(1.045) translateX(-.3%) skewX(-.4deg)}}
.sn-history-skipping:not([data-skip-effect="none"]) .sn-history-mapwrap::after{content:"";position:absolute;inset:0;z-index:600;pointer-events:none;background:linear-gradient(110deg,transparent 20%,#e7edf438 46%,#ffffff66 50%,#e7edf438 54%,transparent 80%);will-change:transform,opacity;animation:sn-history-time-sweep var(--sn-skip-duration,1s) ease-in-out both}
@keyframes sn-history-time-sweep{0%{transform:translateX(-100%);opacity:0}20%{opacity:.65}80%{opacity:.65}100%{transform:translateX(100%);opacity:0}}
@container sn-map (max-width:720px){.sn-history-event{grid-template-columns:minmax(0,1fr) 30px;padding-right:16px}.sn-history-skip{top:92px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.sn-history-skipping .sn-history-map{animation:none}}
@media(prefers-reduced-motion:reduce){.sn-history-skipping[data-skip-effect] .sn-history-map{animation:none;will-change:auto}.sn-history-skipping .sn-history-mapwrap::after{display:none}}
/* Dark navigation chrome and a real time ruler. */
.sn-history-head,.sn-history-side{--sn-panel:#000;--sn-bg:#101010;--sn-text:#f5f5f2;--sn-muted:#bdbdb8;--sn-line:#333;background:#000;color:var(--sn-text);color-scheme:dark}
.sn-history-side .sn-history-event-icon{color:color-mix(in srgb,var(--actor-color) 70%,#fff)}
.sn-history-side .sn-history-event.active{background:#252525}
.sn-history-side .sn-history-day{background:#080808}
.sn-history-mount[data-skin="light"] :is(.sn-history-head,.sn-history-side,.sn-history-detail){--sn-panel:#fff;--sn-bg:#f3f4f5;--sn-text:#171717;--sn-muted:#62666b;--sn-line:#d7dadd;background:var(--sn-panel);color:var(--sn-text);color-scheme:light}
.sn-history-mount[data-skin="light"] .sn-history-side .sn-history-event-icon{color:var(--actor-color)}
.sn-history-mount[data-skin="light"] .sn-history-side .sn-history-event.active{background:#e7eaed}
.sn-history-mount[data-skin="light"] .sn-history-side .sn-history-day{background:#f3f4f5}
.sn-history-mount[data-skin="light"] .sn-history-progress{background:#fff;color:#222;border-bottom-color:#d7dadd}
.sn-history-mount[data-skin="light"] .sn-history-ruler-tick{background:#62666b}
.sn-history-mount[data-skin="light"] .sn-history-ruler-tick.sn-midnight{background:#111}
.sn-history-mount[data-skin="light"] :is(.sn-history-ruler-hour,.sn-history-ruler-day){color:#222}
.sn-history-mount[data-skin="light"] .sn-history-ruler-track>.sn-history-ruler-cursor{background:#111;box-shadow:0 0 4px #0003}
.sn-history-mount[data-skin="light"] .sn-history-ruler-cursor:before{background:#111}
.sn-history-app{grid-template-rows:auto 64px minmax(0,1fr)}
.sn-hide-header .sn-history-app{grid-template-rows:64px minmax(0,1fr)}
.sn-hide-progress .sn-history-app{grid-template-rows:auto minmax(0,1fr)}
.sn-hide-header.sn-hide-progress .sn-history-app{grid-template-rows:minmax(0,1fr)}
.sn-history-progress{position:relative;min-width:0;height:64px;background:#000;color:#eeeee9;overflow:hidden;border-bottom:1px solid #333}
.sn-history-ruler-track{position:absolute;inset:0 12px;pointer-events:none}
.sn-history-ruler-ticks{position:absolute;inset:0;pointer-events:none}
.sn-history-ruler-tick{position:absolute;bottom:25px;height:10px;width:1px;background:#d9d9d2}
.sn-history-ruler-tick.sn-midnight{height:25px;width:2px;background:#fff}
.sn-history-ruler-hour,.sn-history-ruler-day{position:absolute;left:0;white-space:nowrap;transform:translateX(-50%);font:400 9px/1 "DM Mono",monospace;color:#efefeb}
.sn-history-ruler-hour{bottom:-18px}
.sn-history-ruler-day{bottom:29px;font-size:10px;font-weight:500}
.sn-tick-first :is(.sn-history-ruler-hour,.sn-history-ruler-day){transform:none}
.sn-tick-last :is(.sn-history-ruler-hour,.sn-history-ruler-day){transform:translateX(-100%)}
.sn-history-ruler-track>.sn-history-ruler-cursor{position:absolute;z-index:2;top:4px;bottom:3px;height:auto;width:2px;background:#fff;transition:none;pointer-events:none;box-shadow:0 0 6px #fff8}
.sn-history-ruler-cursor:before{content:"";position:absolute;left:-4px;top:0;width:10px;height:6px;background:#fff;clip-path:polygon(0 0,100% 0,50% 100%)}
.sn-history-ruler-input{position:absolute;z-index:3;inset:0;width:100%;height:100%;margin:0;padding:0;appearance:none;opacity:0;cursor:ew-resize;touch-action:pan-y}
.sn-history-ruler-input::-webkit-slider-thumb{appearance:none;width:24px;height:64px}
.sn-history-ruler-input::-moz-range-thumb{width:24px;height:64px;border:0}
.sn-history-progress:focus-within{outline:2px solid #fff;outline-offset:-3px}
.sn-hide-controls .sn-history-ruler-input{display:none}
.sn-history-brand{background:none;padding:0;border-radius:0;box-shadow:none}
.sn-history-brand img{filter:invert(var(--sn-logo-invert,0))}
.sn-history-mapwrap{container:sn-map-pane / inline-size}
.sn-history-mapwrap .sn-history-map-tools{bottom:30px;right:16px;gap:7px}
@container sn-map-pane (max-width:560px){
 .sn-history-mapwrap .sn-history-map-tools{bottom:30px;right:8px;gap:5px}
 .sn-history-brand img{width:64px;height:auto}
 .sn-history-fit{width:32px;height:32px;padding:6px}
 .sn-history-fit :is(svg,img){width:20px;height:20px}
 .sn-history-mapwrap .sn-history-controls{gap:8px}
 .sn-history-controls .sn-history-btn{width:52px;height:52px;padding:14px}
}

.sn-history-mount[data-skin="light"] .sn-history-bubble.leaflet-tooltip{background:#fff;color:#171717}

.sn-history-move-notice{position:absolute;z-index:1100;left:12px;right:12px;bottom:110px;padding:14px;background:#fff;color:#171717;box-shadow:0 2px 12px #0004}.sn-history-move-notice[hidden]{display:none}.sn-history-detail .sn-history-move{appearance:none;background:transparent;color:#2365a2;font-family:inherit;line-height:inherit;cursor:pointer}

.sn-history-polygon{mix-blend-mode:multiply}

.sn-history-openmap{display:grid;place-items:center;width:44px;height:44px;padding:10px;box-sizing:border-box;text-decoration:none}.sn-history-openmap svg{width:100%;height:100%}.sn-hide-openmap .sn-history-openmap,.sn-hide-controls .sn-history-openmap{display:none}

/* Story introduction: native modal keeps keyboard focus above the map. */
.sn-history-mount .sn-story-intro{box-sizing:border-box;width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;border:0;border-radius:18px;background:#eeeee8;color:#171717;box-shadow:0 24px 90px #0005;font:16px/1.55 'DM Sans',sans-serif;overflow:auto}
.sn-story-intro::backdrop{background:#0008;backdrop-filter:blur(4px)}
.sn-story-intro .sn-intro-banner{display:block;width:100%;height:auto}
.sn-story-intro .sn-intro-content{padding:24px}
.sn-story-intro h2{font-family:'DM Mono',monospace;font-size:25px;line-height:1.3;margin:8px 0 16px;color:inherit}
.sn-story-intro button{font:inherit;cursor:pointer}
.sn-story-intro .sn-intro-close{position:absolute;right:12px;top:12px;width:38px;height:38px;border:0;border-radius:8px;background:#111;color:#fff;font-size:26px;line-height:1}
.sn-story-intro .sn-intro-tabs{display:flex;overflow-x:auto;border-bottom:1px solid #888;margin:22px 0 16px;gap:6px}
.sn-story-intro [role=tab]{background:transparent;color:inherit;border:0;border-top:3px solid transparent;padding:10px 14px;white-space:nowrap}
.sn-story-intro [aria-selected=true]{border-top-color:#111;font-weight:700}
.sn-story-intro .sn-intro-prose{white-space:pre-line;overflow-wrap:anywhere}
.sn-story-intro .sn-intro-prose a{color:inherit;text-decoration:underline}
.sn-story-intro [hidden]{display:none!important}
.sn-story-intro .sn-intro-start{margin-top:24px;background:#111;color:#fff;border:0;border-radius:4px;padding:12px 18px;font-weight:700}
.sn-story-intro :focus-visible{outline:3px solid #3679bd;outline-offset:3px}
.sn-history-mount .sn-intro-info{font:bold 23px 'DM Sans',sans-serif}
@media(max-width:520px){.sn-story-intro .sn-intro-content{padding:20px}.sn-story-intro h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){.sn-story-intro::backdrop{backdrop-filter:none}}

.sn-history-mount .sn-analytics-consent{position:absolute;z-index:1800;left:16px;bottom:100px;width:min(380px,calc(100% - 32px));box-sizing:border-box;padding:16px;border-radius:10px;background:#f4f4ef;color:#111;box-shadow:0 4px 24px #0004;font:14px/1.5 'DM Sans',sans-serif}
.sn-analytics-consent p{margin:0 0 12px}.sn-analytics-consent button{padding:8px 12px;border:1px solid #333;border-radius:4px;background:#fff;color:#111;font:inherit;cursor:pointer;margin:2px}

/* Compact legend for narrow widgets, including embedded mobile maps. */
.sn-history-legend{display:block}
.sn-history-legend-items{display:grid;grid-template-columns:30px minmax(0,1fr);gap:5px 8px;align-items:center}
.sn-history-legend-toggle{display:none}
@container sn-map (max-width:720px){
 .sn-history-legend{pointer-events:auto;max-width:min(280px,calc(100% - 24px));padding:0}
 .sn-history-legend-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:40px;padding:8px 12px;border:0;border-radius:8px;background:transparent;color:inherit;font:600 12px 'DM Sans',sans-serif;cursor:pointer}
 .sn-history-legend-toggle:focus-visible{outline:2px solid currentColor;outline-offset:2px}
 .sn-history-legend-items{display:none;padding:4px 12px 12px;max-height:120px;overflow-y:auto;overscroll-behavior:contain}
 .sn-legend-open .sn-history-legend-items{display:grid}
 .sn-legend-open .sn-history-legend-toggle span{transform:rotate(180deg)}
 .sn-hide-controls .sn-history-legend-toggle{display:none}
 .sn-hide-controls .sn-history-legend-items{display:grid;padding:8px}
}

/* Mobile map-first layout; the timeline overlays the map instead of taking a row. */
.sn-history-drawer-toggle{display:none}
.sn-history-detail-dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--sn-line);border-radius:14px;background:var(--sn-panel);color:var(--sn-text);overflow:auto;box-shadow:0 16px 60px #0005}
.sn-history-detail-dialog::backdrop{background:#0007}
.sn-history-detail-dialog .sn-history-detail{display:block;position:relative;padding:16px;border:0;overflow:visible}
.sn-history-detail-dialog .sn-history-detail-close{position:sticky;z-index:2;top:0;min-height:44px;margin:0 0 8px auto;font-size:16px}
@container sn-map (max-width:720px){
 .sn-history-app{height:min(var(--sn-history-height,100dvh),100dvh);min-height:0;border-radius:0;grid-template-rows:auto 32px minmax(0,1fr)}
 .sn-history-head{padding:7px 12px}
 .sn-history-kicker,.sn-history-subtitle{display:none}
 .sn-history-title{font-size:16px;line-height:1.25;margin:0}
 .sn-history-progress{height:32px}
 .sn-hide-header .sn-history-app{grid-template-rows:32px minmax(0,1fr)}
 .sn-hide-progress .sn-history-app{grid-template-rows:auto minmax(0,1fr)}
 .sn-hide-header.sn-hide-progress .sn-history-app{grid-template-rows:minmax(0,1fr)}
 .sn-history-ruler-tick{bottom:12px;height:5px}
 .sn-history-ruler-tick.sn-midnight{height:9px}
 .sn-history-ruler-hour{bottom:-10px;font-size:8px}
 .sn-history-ruler-day{bottom:10px;font-size:8px}
 .sn-history-ruler-input::-webkit-slider-thumb{height:32px}
 .sn-history-ruler-input::-moz-range-thumb{height:32px}
 .sn-history-body,.sn-history-body.sn-history-detail-open,.sn-hide-timeline .sn-history-body,.sn-hide-timeline .sn-history-body.sn-history-detail-open{position:relative;display:block}
 .sn-history-mapwrap{position:absolute;inset:0}
 .sn-history-side{position:absolute;z-index:1200;left:0;right:0;bottom:0;height: min(70%,480px);grid-template-rows:36px auto minmax(0,1fr);border:0;border-radius:14px 14px 0 0;transform:translateY(calc(100% - 36px));transition:transform .25s ease;box-shadow:0 -3px 18px #0003}
 .sn-history-side.sn-drawer-open{transform:translateY(0)}
 .sn-history-drawer-toggle{position:relative;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:36px;padding:6px 12px 0;border:0;border-radius:14px 14px 0 0;background:var(--sn-panel);color:var(--sn-text);font:600 11px 'DM Sans',sans-serif;cursor:pointer;touch-action:none}
 .sn-history-drawer-toggle:before{content:"";position:absolute;top:4px;left:50%;transform:translateX(-50%);width:28px;height:3px;border-radius:999px;background:var(--sn-muted);opacity:.45}
 .sn-history-drawer-toggle svg{width:18px;height:18px;color:var(--sn-muted);transition:transform .22s ease,color .22s ease}
 .sn-history-drawer-toggle:hover svg,.sn-history-drawer-toggle:focus-visible svg{color:var(--sn-text)}
 .sn-drawer-open .sn-history-drawer-toggle svg{transform:rotate(180deg)}
 .sn-hide-controls .sn-history-side{grid-template-rows:36px minmax(0,1fr)}
 .sn-history-focus{top:10px}
 .sn-history-focus-date{font-size:16px}
 .sn-history-focus-time{font-size:26px;margin-top:3px}
 .sn-history-mapwrap .sn-history-controls{bottom:48px;gap:8px}
 .sn-history-controls .sn-history-btn{width:44px;height:44px;padding:12px}
 .sn-history-mapwrap .sn-history-map-tools{bottom:48px;right:8px}
 .sn-history-legend{bottom:100px}
 .sn-history-skip{top:72px}
 .sn-hide-timeline .sn-history-mapwrap .sn-history-controls,.sn-hide-timeline .sn-history-mapwrap .sn-history-map-tools{bottom:24px}
}
@media(prefers-reduced-motion:reduce){.sn-history-side,.sn-history-drawer-toggle svg{transition:none}}
