/* Timeline header: title row with scope menu, subtitle, Filter and options toolbar, and the filter panel. Tokens only. */
/* Flat page (LibrePhotos style): the timeline has no outer card, border or tint; only the cards inside it are cards. */
#timeline-home.timeline-shell{margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
#timeline-home .timeline-header.ft-page-toolbar{background:var(--app-page);margin:0 0 .5rem;padding:.75rem 0 .5rem}
#timeline-home .ft-person-pill-avatar{font-size:.62rem;font-weight:700;color:var(--app-accent);background:var(--app-accent-soft)}
.timeline-header{align-items:flex-start;gap:1rem;flex-wrap:wrap}
.timeline-title-block{flex:1 1 16rem;min-width:0}
.timeline-menu-anchor{position:relative;display:inline-block;max-width:100%}
.timeline-title-heading{margin:0;font-size:clamp(1.6rem,1.2rem + 1.4vw,2.1rem);line-height:1.15;font-weight:700;color:var(--app-text)}
.timeline-title-button{display:inline-flex;align-items:center;gap:.4rem;max-width:100%;min-height:44px;margin:0;padding:.15rem .5rem .15rem .35rem;border:0;border-radius:var(--app-radius);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.timeline-title-button>span{min-width:0;overflow-wrap:anywhere}
.timeline-title-button:hover{background:var(--app-hover)}
.timeline-title-button:focus-visible,.timeline-tool-button:focus-visible,.timeline-filter-summary:focus-visible,.timeline-clear-filters:focus-visible,.timeline-menu .ft-menu-item:focus-visible{outline:2px solid var(--app-focus,var(--app-accent));outline-offset:2px}
.timeline-chevron{flex:0 0 auto;color:var(--app-muted);transition:transform .15s ease}
.timeline-title-button[aria-expanded="true"] .timeline-chevron{transform:rotate(180deg)}
.timeline-subtitle{margin:.1rem 0 0 .35rem;font-size:.92rem;color:var(--app-muted)}
.timeline-filter-summary{display:block;max-width:100%;margin:.2rem 0 0 .35rem;padding:0;border:0;background:none;color:var(--app-accent);font:inherit;font-size:.9rem;text-align:left;text-decoration:underline;text-underline-offset:.15em;cursor:pointer;overflow-wrap:anywhere}
.timeline-filter-summary[hidden]{display:none}
.timeline-actions{align-items:center;gap:.5rem;margin-left:auto}
.timeline-actions>.timeline-menu-anchor{order:2}
.timeline-actions #timeline-filters-toggle{order:1}
.timeline-tool-button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:40px;margin:0;padding:.45rem .8rem;border:1px solid var(--app-border);border-radius:var(--app-radius);background:var(--app-card);color:var(--app-control-text);font:inherit;font-weight:600;cursor:pointer}
.timeline-tool-button:hover{background:var(--app-hover)}
.timeline-tool-icon{width:40px;padding:.45rem}
.timeline-tool-button.is-active,.timeline-tool-button[aria-expanded="true"]{background:var(--app-accent-soft);border-color:var(--app-accent);color:var(--app-accent)}
.timeline-filter-count{display:inline-flex;align-items:center;justify-content:center;min-width:1.3rem;height:1.3rem;padding:0 .35rem;border-radius:var(--app-radius-pill,999px);background:var(--app-accent);color:var(--app-accent-text);font-size:.75rem;font-weight:700;line-height:1}
.timeline-filter-count[hidden]{display:none}
/* Dropdown menus (shared ft-menu look; scoped here so the timeline works before the shell stylesheet defines it). */
.timeline-menu{position:absolute;left:0;top:calc(100% + .35rem);z-index:40;min-width:14rem;max-width:calc(100vw - 2rem);padding:.35rem;border:1px solid var(--app-border);border-radius:var(--app-radius);background:var(--app-card);color:var(--app-text);box-shadow:var(--app-menu-shadow)}
.timeline-menu[hidden]{display:none}
.timeline-menu-end{left:auto;right:0}
.timeline-menu .ft-menu-item{display:flex;align-items:center;gap:.6rem;width:100%;min-height:40px;margin:0;padding:.5rem .65rem;border:0;border-radius:var(--app-radius-sm);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.timeline-menu .ft-menu-item:hover,.timeline-menu .ft-menu-item:focus-visible{background:var(--app-hover)}
.timeline-menu .ft-menu-item[aria-checked="true"]{background:var(--app-accent-soft);color:var(--app-accent);font-weight:650}
.timeline-menu .ft-menu-item:disabled{opacity:.55;cursor:not-allowed}
.timeline-menu .menu-label{flex:1 1 auto;min-width:0}
/* Filter panel: a card below the toolbar. */
.timeline-filters>label,.timeline-filters>.timeline-date-filters>label{display:grid;gap:.35rem;font-weight:600;color:var(--app-text)}
.timeline-filters .checkbox-row,.timeline-filters .timeline-event-type-options label{display:flex;align-items:center;gap:.55rem;font-weight:400}
.timeline-filters input:not([type=checkbox]),.timeline-filters select{box-sizing:border-box;width:100%;min-height:40px;margin:0;padding:.45rem .6rem;border:1px solid var(--app-border);border-radius:var(--app-radius-sm);background:var(--app-field);color:var(--app-control-text);font:inherit;font-weight:400}
.timeline-filters .timeline-date-jump{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.35rem .5rem;align-items:end}
.timeline-filters .timeline-date-jump label{grid-column:1/-1;margin:0;font-weight:600}
.timeline-filters .timeline-date-jump input{margin:0}
.timeline-filters .timeline-date-jump button{min-height:40px;padding:.45rem .9rem;border:1px solid var(--app-border);border-radius:var(--app-radius-sm);background:var(--app-card);color:var(--app-control-text);font:inherit;font-weight:600;cursor:pointer}
.timeline-filters .timeline-date-jump button:hover{background:var(--app-hover)}
.timeline-filters fieldset{min-width:0;margin:0;padding:.75rem;border:1px solid var(--app-border);border-radius:var(--app-radius)}
.timeline-filters legend{padding:0 .35rem;font-weight:650;color:var(--app-text)}
.timeline-filters .timeline-event-type-options{max-height:13rem;overflow:auto}
.timeline-filters .timeline-date-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
.timeline-filters{grid-template-columns:repeat(auto-fit,minmax(15rem,1fr));gap:1rem;margin-top:.85rem;padding:1rem;border:1px solid var(--app-border);border-radius:var(--app-radius-lg,14px);background:var(--app-card);box-shadow:var(--app-shadow)}
.timeline-filters[hidden]{display:none}
.timeline-filters>fieldset,.timeline-filters>.timeline-filters-head,.timeline-filters>.timeline-date-jump{grid-column:1/-1}
.timeline-filters-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.timeline-filters-title{margin:0;font-size:1rem;color:var(--app-text)}
.timeline-clear-filters{min-height:36px;padding:.3rem .65rem;border:0;border-radius:var(--app-radius-sm);background:transparent;color:var(--app-accent);font:inherit;font-weight:650;cursor:pointer}
.timeline-clear-filters:hover:not(:disabled){background:var(--app-accent-soft)}
.timeline-clear-filters:disabled{color:var(--app-muted);cursor:default}
@media(max-width:650px){
  .timeline-header{flex-direction:row;flex-wrap:nowrap;align-items:flex-start}
  .timeline-title-block{flex:1 1 0}
  .timeline-header .timeline-actions{width:auto;flex:0 0 auto;flex-wrap:nowrap}
  .timeline-header .timeline-actions>*{flex:0 0 auto;min-width:0;white-space:nowrap}
  .timeline-tool-label{display:none}
  #timeline-filters-toggle{width:auto;min-width:40px}
  .timeline-filters{grid-template-columns:1fr;padding:.85rem}
  .timeline-menu-anchor:has(.timeline-menu-end) .timeline-menu{right:0}
}
@media(prefers-reduced-motion:reduce){.timeline-chevron{transition:none}}
.timeline-jump-popover{min-width:16rem;display:grid;gap:.4rem}
.timeline-jump-popover label{font-weight:600;font-size:.9rem}
.timeline-jump-row{display:flex;gap:.5rem;align-items:center}
.timeline-jump-row input{flex:1 1 auto;min-width:0}
.timeline-jump-popover .message{margin:0}
