/* SamEgg notebook frame. Desktop: sticky range filters beside the map, stats and movie panel.
   Phone: map first, then range, stats and movie. Panels follow site-v3: 1.5px ink outline,
   12px radius; the map and movie panels add the hard offset shadow (see site-v3.css list). */
body.lab-shell.se-site .timeline-workspace{--tl-walk:#1f9d6b;--tl-cycle:#2a8fbd;--tl-transit:#7a5cc7;--tl-drive:#e5a323;--tl-fly:#e0664f;--tl-unknown:#8f9c95;width:var(--v3-page,92%);max-width:1400px;margin:24px auto 60px}
body.lab-shell.se-site .timeline-heading{margin-bottom:20px}
body.lab-shell.se-site .timeline-heading h1{font-size:32px;line-height:1.3;margin:0 0 6px}
body.lab-shell.se-site .timeline-heading p{margin:0;font-size:16px}

/* Import: a full card before the first journey, a slim status bar afterwards. */
body.lab-shell.se-site .timeline-import{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"intro actions" "help status";gap:10px 24px;align-items:center;border:1.5px solid var(--v3-line,var(--lab-ink));border-radius:12px;background:var(--lab-card);padding:22px 24px;margin-bottom:24px;box-shadow:4px 4px 0 var(--v3-shadow,var(--lab-ink))}
body.lab-shell.se-site .timeline-import-intro{grid-area:intro}
body.lab-shell.se-site .timeline-import-actions{grid-area:actions;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px}
body.lab-shell.se-site #import-status{grid-area:status;justify-self:end;font-size:14px;color:var(--lab-muted)}
body.lab-shell.se-site .timeline-import-help{grid-area:help;display:flex;flex-wrap:wrap;gap:0 24px;font-size:14px}
body.lab-shell.se-site .timeline-import-help details[open]{flex-basis:100%}
body.lab-shell.se-site .timeline-import h2,body.lab-shell.se-site .timeline-panel h2{font-size:20px;margin:0 0 10px}
body.lab-shell.se-site .timeline-import-intro h2{margin-bottom:4px}
body.lab-shell.se-site .timeline-import p{margin:0}
body.lab-shell.se-site .timeline-file{position:relative;display:inline-flex;align-items:center;justify-content:center;background:var(--lab-green);color:var(--lab-card);padding:12px 18px;border-radius:8px;font-weight:700;cursor:pointer;min-height:48px}
body.lab-shell.se-site .timeline-file input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}
body.lab-shell.se-site .timeline-file:focus-within{outline:3px solid var(--home-yolk);outline-offset:3px}
body.lab-shell.se-site .timeline-file-change{display:none}
body.lab-shell.se-site #clear-data:disabled{display:none}
body.lab-shell.se-site .timeline-import.is-loaded{grid-template-areas:"status actions";padding:12px 16px 12px 20px}
body.lab-shell.se-site .timeline-import.is-loaded :is(.timeline-import-intro,.timeline-import-help){display:none}
body.lab-shell.se-site .timeline-import.is-loaded #import-status{justify-self:start;display:flex;align-items:center;gap:10px;color:var(--lab-ink);font-weight:600}
body.lab-shell.se-site .timeline-import.is-loaded #import-status::before{content:'✓';display:inline-grid;place-items:center;width:26px;height:26px;flex:none;border-radius:50%;background:var(--lab-soft);color:var(--lab-green);font-weight:700}
body.lab-shell.se-site .timeline-import.is-loaded .timeline-file{min-height:44px;padding:9px 14px;font-size:14px}
body.lab-shell.se-site .timeline-import.is-loaded .timeline-file-new{display:none}
body.lab-shell.se-site .timeline-import.is-loaded .timeline-file-change{display:inline}

/* Layout */
body.lab-shell.se-site .timeline-layout{display:grid;grid-template-columns:300px minmax(0,1fr);grid-template-areas:"filters map" "filters stats" "filters export";gap:24px;align-items:start}
body.lab-shell.se-site .timeline-map-panel{grid-area:map;min-width:0}
body.lab-shell.se-site .timeline-filters{grid-area:filters;position:sticky;top:20px}
body.lab-shell.se-site .timeline-stats{grid-area:stats;min-width:0}
body.lab-shell.se-site .timeline-export{grid-area:export;min-width:0}
body.lab-shell.se-site .timeline-panel,body.lab-shell.se-site .timeline-map-panel{background:var(--lab-card);border:1.5px solid var(--v3-line,var(--lab-ink));border-radius:12px;overflow:hidden}
body.lab-shell.se-site .timeline-map-panel,body.lab-shell.se-site .timeline-export{box-shadow:4px 4px 0 var(--v3-shadow,var(--lab-ink))}
body.lab-shell.se-site .timeline-panel{padding:22px}
body.lab-shell.se-site .timeline-empty-hint{display:none;margin:-4px 0 14px;font-size:14px;color:var(--lab-muted)}
body.lab-shell.se-site .timeline-workspace.is-empty .timeline-empty-hint{display:block}

/* Controls */
body.lab-shell.se-site .timeline-workspace fieldset{border:0;padding:0;margin:0;min-width:0;display:grid;gap:14px}
body.lab-shell.se-site .timeline-workspace label{display:grid;gap:5px;font-size:14px}
body.lab-shell.se-site .timeline-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
body.lab-shell.se-site .timeline-workspace input:not([type=checkbox]):not([type=range]):not([type=file]),body.lab-shell.se-site .timeline-workspace select{width:100%;min-width:0;height:44px;border:1px solid var(--lab-muted);border-radius:7px;background:var(--lab-card);color:var(--lab-ink);padding:8px;font:inherit}
body.lab-shell.se-site .timeline-workspace button,body.lab-shell.se-site .timeline-primary{min-height:44px;padding:9px 14px;border:1.5px solid var(--lab-ink);border-radius:8px;background:var(--lab-card);color:var(--lab-ink);font:inherit;font-size:14px;font-weight:600;line-height:1.4;box-shadow:none}
body.lab-shell.se-site .timeline-workspace button:disabled{opacity:.45;cursor:not-allowed}
body.lab-shell.se-site .timeline-workspace button:hover:not(:disabled){background:var(--lab-soft)}
body.lab-shell.se-site .timeline-workspace button:focus-visible,body.lab-shell.se-site .timeline-workspace a:focus-visible{outline:3px solid var(--home-yolk);outline-offset:3px}
body.lab-shell.se-site .timeline-workspace .timeline-primary{display:inline-flex;justify-content:center;align-items:center;background:var(--home-yolk);color:#18392b;box-shadow:3px 3px 0 var(--lab-ink);font-weight:700;text-decoration:none}
body.lab-shell.se-site .timeline-workspace .timeline-check{display:flex;align-items:center;gap:9px;min-height:44px;cursor:pointer}
body.lab-shell.se-site .timeline-check input{width:18px;height:18px;flex:none;accent-color:var(--lab-green)}
body.lab-shell.se-site .timeline-note,body.lab-shell.se-site #filter-status{font-size:14px;color:var(--lab-muted);margin:14px 0 0}

/* Map panel: canvas, floating zoom, playback, then the optional street map */
body.lab-shell.se-site .timeline-canvas-wrap{position:relative;background:var(--lab-soft)}
body.lab-shell.se-site #journey-canvas{display:block;width:100%;height:auto;touch-action:pan-y;cursor:grab;user-select:none;-webkit-user-select:none}
body.lab-shell.se-site #journey-canvas.is-dragging{cursor:grabbing}
body.lab-shell.se-site .timeline-map-tools{position:absolute;right:12px;top:50%;transform:translateY(-50%);display:grid;gap:6px;z-index:2}
body.lab-shell.se-site .timeline-workspace .timeline-map-tools button{display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;border-radius:10px;background:var(--lab-card);font-size:18px;line-height:1;box-shadow:2px 2px 0 var(--v3-shadow,var(--lab-ink))}
body.lab-shell.se-site .timeline-workspace.is-empty .timeline-map-tools{display:none}
body.lab-shell.se-site .timeline-map-hint{position:absolute;left:50%;bottom:44px;transform:translateX(-50%);margin:0;max-width:calc(100% - 24px);padding:7px 12px;border-radius:999px;background:rgba(24,57,43,.88);color:#fffdf4;font-size:13px;line-height:1.4;text-align:center;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:3}
body.lab-shell.se-site .timeline-map-hint[hidden]{display:none}
body.lab-shell.se-site #empty-map{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;padding:16px;background-color:var(--v3-paper,var(--lab-soft));background-image:linear-gradient(var(--v3-grid,transparent) 1px,transparent 1px),linear-gradient(90deg,var(--v3-grid,transparent) 1px,transparent 1px);background-size:28px 28px}
body.lab-shell.se-site #empty-map[hidden]{display:none}
body.lab-shell.se-site #empty-map img{width:clamp(72px,12vw,120px);height:auto}
body.lab-shell.se-site #empty-map p{margin:0;font-size:22px;line-height:1.5;color:var(--lab-ink)}
body.lab-shell.se-site .timeline-workspace #empty-demo{background:var(--home-yolk);color:#18392b;box-shadow:3px 3px 0 var(--lab-ink);font-weight:700;padding:9px 20px}
body.lab-shell.se-site #empty-map span{font-size:14px;color:var(--lab-muted)}
body.lab-shell.se-site .timeline-playback{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;padding:14px 22px;border-top:1.5px solid var(--lab-line)}
body.lab-shell.se-site .timeline-preview-speed{min-width:145px;max-width:100%}
body.lab-shell.se-site #preview-speed-note{flex-basis:100%;margin:0;font-size:14px;line-height:1.6;color:var(--lab-muted)}
body.lab-shell.se-site #preview-speed-note[hidden]{display:none}
body.lab-shell.se-site .timeline-scrub{flex:1;min-width:60px}
body.lab-shell.se-site #scrub{width:100%;min-height:44px;accent-color:var(--lab-green)}
body.lab-shell.se-site #playback-time{font-size:14px;min-width:70px;font-variant-numeric:tabular-nums}
body.lab-shell.se-site .timeline-map-options{padding:10px 22px 14px;border-top:1px dashed var(--lab-line);font-size:14px}
body.lab-shell.se-site .timeline-map-option-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 16px}
body.lab-shell.se-site #map-status{font-size:13px;color:var(--lab-muted)}
body.lab-shell.se-site .timeline-map-options p{margin:2px 0 0;font-size:13px;line-height:1.7;color:var(--lab-muted)}
body.lab-shell.se-site .timeline-map-options a{font-size:13px;color:var(--lab-ink)}
body.lab-shell.se-site .timeline-map-more summary{min-height:36px;padding:6px 0;font-size:13px}

/* Stats: four tiles and a proportional travel-mode bar */
body.lab-shell.se-site .timeline-stats dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0}
body.lab-shell.se-site .timeline-stats dl>div{padding:14px 16px;border:1.5px solid var(--lab-line);border-radius:12px;background:var(--lab-card)}
body.lab-shell.se-site .timeline-stats dt{font-size:14px;color:var(--lab-muted)}
body.lab-shell.se-site .timeline-stats dd{font-size:28px;font-weight:700;line-height:1.25;margin:4px 0 0;font-variant-numeric:tabular-nums;color:var(--lab-ink)}
body.lab-shell.se-site .timeline-type-stats{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:14px;margin-top:14px}
body.lab-shell.se-site .timeline-type-stats:empty{display:none}
body.lab-shell.se-site .timeline-type-track{display:flex;flex-basis:100%;height:12px;border-radius:999px;overflow:hidden;background:var(--lab-soft);border:1.5px solid var(--lab-line)}
body.lab-shell.se-site .timeline-type-track span{flex:1 1 0;min-width:3px}
body.lab-shell.se-site .timeline-type-item{display:inline-flex;align-items:center;gap:7px}
body.lab-shell.se-site .timeline-type-item::before{content:'';width:10px;height:10px;border-radius:3px;background:currentColor}
body.lab-shell.se-site .timeline-type-item{color:var(--lab-ink)}
body.lab-shell.se-site :is(.timeline-type-track .timeline-type-walk){background:var(--tl-walk)}
body.lab-shell.se-site :is(.timeline-type-track .timeline-type-cycle){background:var(--tl-cycle)}
body.lab-shell.se-site :is(.timeline-type-track .timeline-type-transit){background:var(--tl-transit)}
body.lab-shell.se-site :is(.timeline-type-track .timeline-type-drive){background:var(--tl-drive)}
body.lab-shell.se-site :is(.timeline-type-track .timeline-type-fly){background:var(--tl-fly)}
body.lab-shell.se-site :is(.timeline-type-track .timeline-type-unknown){background:var(--tl-unknown)}
body.lab-shell.se-site .timeline-type-item.timeline-type-walk::before{background:var(--tl-walk)}
body.lab-shell.se-site .timeline-type-item.timeline-type-cycle::before{background:var(--tl-cycle)}
body.lab-shell.se-site .timeline-type-item.timeline-type-transit::before{background:var(--tl-transit)}
body.lab-shell.se-site .timeline-type-item.timeline-type-drive::before{background:var(--tl-drive)}
body.lab-shell.se-site .timeline-type-item.timeline-type-fly::before{background:var(--tl-fly)}
body.lab-shell.se-site .timeline-type-item.timeline-type-unknown::before{background:var(--tl-unknown)}
body.lab-shell.se-site #stats-note{font-size:14px;color:var(--lab-muted);margin:10px 0 0}

/* Movie panel: settings and the make-movie button together */
body.lab-shell.se-site .timeline-export-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px;margin-bottom:14px}
body.lab-shell.se-site .timeline-export-head h2{margin:0}
body.lab-shell.se-site #video-support{margin:0;font-size:14px;color:var(--lab-muted)}
body.lab-shell.se-site .timeline-export #video-settings{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 16px}
body.lab-shell.se-site .timeline-export #video-settings .timeline-pair{display:contents}
body.lab-shell.se-site .timeline-export #video-settings>label:first-of-type{grid-column:span 2}
body.lab-shell.se-site .timeline-export #video-settings>.timeline-check{grid-column:span 2;align-self:end}
body.lab-shell.se-site .timeline-export-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:18px}
body.lab-shell.se-site .timeline-export-actions .timeline-primary{min-width:200px;min-height:48px;font-size:16px}
body.lab-shell.se-site #export-status{flex:1 1 220px;margin:0;font-size:14px}
body.lab-shell.se-site #export-progress{flex-basis:100%;width:100%}
body.lab-shell.se-site #video-result{margin-top:16px}
body.lab-shell.se-site #video-result p{font-size:14px;margin:0;color:var(--lab-muted)}
body.lab-shell.se-site #result-player{display:block;max-width:100%;max-height:480px;margin:8px auto 16px;border-radius:8px}

body.lab-shell.se-site summary{cursor:pointer;min-height:44px;padding:8px 0}
body.lab-shell.se-site .timeline-guide{padding:4px 0 12px;display:grid;gap:12px}
body.lab-shell.se-site .timeline-details p{font-size:14px;line-height:1.8;margin:0 0 12px}
body.lab-shell.se-site .visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
body.lab-shell.se-site #timeline-controls,body.lab-shell.se-site .timeline-map-panel{scroll-margin-top:24px}

@media(min-width:721px) and (max-width:1000px), (max-width:380px){body.lab-shell.se-site .timeline-pair:has(input[type=date]){grid-template-columns:1fr}}
@media(max-width:1100px){body.lab-shell.se-site .timeline-export #video-settings{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){body.lab-shell.se-site .timeline-layout{grid-template-columns:260px minmax(0,1fr)}body.lab-shell.se-site .timeline-stats dl{grid-template-columns:repeat(2,minmax(0,1fr))}body.lab-shell.se-site .timeline-playback{flex-wrap:wrap}}
@media(max-width:720px){
 body.lab-shell.se-site .timeline-heading h1{font-size:28px}
 body.lab-shell.se-site .timeline-heading p{font-size:15px}
 body.lab-shell.se-site .timeline-import{grid-template-columns:1fr;grid-template-areas:"intro" "actions" "status" "help";padding:18px}
 body.lab-shell.se-site .timeline-import-actions{justify-content:stretch}
 body.lab-shell.se-site .timeline-import-actions>*{flex:1;white-space:nowrap}
 body.lab-shell.se-site .timeline-import-actions .timeline-file{flex-basis:100%}
 body.lab-shell.se-site #import-status{justify-self:start}
 body.lab-shell.se-site .timeline-import.is-loaded{grid-template-areas:"status" "actions";padding:12px 14px}
 body.lab-shell.se-site .timeline-import.is-loaded .timeline-import-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 body.lab-shell.se-site .timeline-import.is-loaded .timeline-import-actions>*{white-space:normal;min-width:0;padding:8px 6px;font-size:13px;line-height:1.3;text-align:center}
 body.lab-shell.se-site .timeline-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:"map" "filters" "stats" "export";gap:18px}
 body.lab-shell.se-site .timeline-filters{position:static}
 body.lab-shell.se-site .timeline-panel{padding:18px}
 body.lab-shell.se-site .timeline-map-tools{right:8px;gap:4px}
 body.lab-shell.se-site .timeline-workspace .timeline-map-tools button{width:34px;height:34px;min-height:34px;font-size:16px;border-radius:8px}
 body.lab-shell.se-site .timeline-map-hint{bottom:30px;padding:4px 10px;font-size:12px}
 body.lab-shell.se-site #empty-map p{font-size:18px}
 body.lab-shell.se-site #empty-map img{width:64px}
 body.lab-shell.se-site #empty-map span{display:none}
 body.lab-shell.se-site .timeline-playback{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:12px 16px}
 body.lab-shell.se-site .timeline-playback :is(#preview,.timeline-preview-speed,#preview-speed-note){grid-column:1/-1}
 body.lab-shell.se-site .timeline-playback #preview{justify-self:start}
 body.lab-shell.se-site .timeline-map-options{padding:10px 16px 12px}
 body.lab-shell.se-site .timeline-stats dd{font-size:24px}
 body.lab-shell.se-site .timeline-export-actions .timeline-primary{width:100%}
 body.lab-shell.se-site .timeline-workspace input:not([type=checkbox]):not([type=range]):not([type=file]),body.lab-shell.se-site .timeline-workspace select{font-size:16px}
}
@media(max-width:420px){body.lab-shell.se-site .timeline-export #video-settings>label:first-of-type,body.lab-shell.se-site .timeline-export #video-settings>.timeline-check{grid-column:1/-1}}

/* Duration guidance stays in the existing movie settings panel. */
body.lab-shell .timeline-duration-advice{grid-column:1/-1;padding:.75rem 1rem;border:1px solid var(--lab-line);border-radius:8px;background:var(--lab-card)}
body.lab-shell .timeline-duration-advice:has(p[hidden]){display:none}
body.lab-shell .timeline-duration-advice p{margin:0 0 .65rem;font-size:.95rem;line-height:1.7;color:var(--lab-ink)}
body.lab-shell .timeline-duration-advice button{min-height:44px;white-space:normal;max-width:100%;font:inherit}
