/* Timeline — «смена дорожками». Loaded last on timeline.html only.
   Legacy app.css / design.css / ux.css paint intervals with fixed light colours under !important,
   which is why bars and dialogs broke in dark themes; this layer re-states them with theme tokens.
   The !important flags below exist only to outrank those legacy declarations. */

.timeline-page{
  --tl-amber:#a8650a;--tl-amber-soft:color-mix(in srgb,#d4900f 13%,var(--surface));--tl-danger:#b42318;
  --tl-row-hover:color-mix(in srgb,var(--tint) 45%,var(--surface));
}
:root[data-theme=graphite] .timeline-page{--tl-amber:#f2c063;--tl-amber-soft:color-mix(in srgb,#f2c063 12%,var(--surface));--tl-danger:#ffb4a8}

/* Day figures: one quiet strip instead of four tiles */
.timeline-page #day-view>.metrics{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:0!important;margin:0 0 18px!important;background:var(--surface);border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:var(--shadow-sm)}
.timeline-page #day-view>.metrics>.metric-card{display:flex;align-items:flex-start;gap:14px;background:transparent!important;border:0!important;border-left:1px solid var(--line)!important;border-radius:0!important;box-shadow:none!important;padding:16px 20px!important;min-height:0!important}
.timeline-page #day-view>.metrics>.metric-card:first-child{border-left:0!important}
.timeline-page #day-view .metric-icon{display:grid!important;place-items:center;flex:none;width:36px;height:36px;border-radius:12px;background:var(--tint)!important;color:var(--strong)!important;font-size:16px}
.timeline-page #day-view .metric-amber .metric-icon{background:var(--tl-amber-soft)!important;color:var(--tl-amber)!important}
.timeline-page #day-view .metric-card span:not(.metric-icon){color:var(--muted)!important;font-size:12.5px!important;font-weight:550}
.timeline-page #day-view .metric-card strong{display:block;margin:2px 0;color:var(--ink)!important;font-size:22px!important;line-height:1.2;font-weight:650;font-variant-numeric:tabular-nums}
.timeline-page #day-view .metric-card small{color:var(--muted)!important;font-size:12px!important}

/* Card head: one legend (bottom), no duplicated hints */
.timeline-page .timeline-card{border-radius:20px!important;background:var(--surface)!important;border:1px solid var(--line)!important;box-shadow:var(--shadow-sm)!important;overflow:hidden}
.timeline-page .timeline-card-head h2{color:var(--ink)!important;font-size:18px;letter-spacing:-.01em}
.timeline-page .timeline-card-head p{color:var(--muted)!important}
.timeline-page .timeline-card-head .legend,.timeline-page .design-timeline-foot small{display:none!important}
.timeline-page .zoom-control{border:1px solid var(--line)!important;background:var(--soft)!important;border-radius:99px!important}
.timeline-page .zoom-control button{color:var(--strong)!important}
.timeline-page .zoom-control span{color:var(--ink)!important;font-variant-numeric:tabular-nums}

/* Ruler and grid */
.timeline-page .timeline-header{background:var(--soft)!important;border-bottom:1px solid var(--line)!important;position:sticky;top:0;z-index:7}
.timeline-page .person-head{background:var(--soft)!important;color:var(--muted)!important;font-size:12px!important;font-weight:600;letter-spacing:0!important;text-transform:none!important}
.timeline-page .hour-label{color:var(--muted)!important;font-size:11px!important;font-variant-numeric:tabular-nums}
/* --track-width is set on #timeline-grid by the zoom control, so the hour step is computed here */
.timeline-page .track{--tl-hour:calc(var(--track-width,1152px)/24);background-color:var(--surface)!important;background-image:linear-gradient(90deg,var(--line) 1px,transparent 1px),linear-gradient(90deg,transparent 50%,color-mix(in srgb,var(--tint) 38%,transparent) 50%)!important;background-size:var(--tl-hour) 100%,calc(var(--tl-hour)*2) 100%!important}
.timeline-page .timeline-row{border-bottom:1px solid var(--line)!important;transition:background-color .2s}
.timeline-page .timeline-row:last-child{border-bottom:0!important}
/* Touch screens keep :hover after a tap, so the row highlight is for real pointers only */
@media(hover:hover){.timeline-page .timeline-row:hover .track{background-color:var(--tl-row-hover)!important}
.timeline-page .timeline-row:hover .person{background:var(--tl-row-hover)!important}}
/* The sticky person column stays above everything that scrolls under it */
.timeline-page .timeline-row>.person{z-index:8!important}
.timeline-page .timeline-header>.person-head{z-index:12!important}

/* Person column */
.timeline-page .person{background:var(--surface)!important;border-right:1px solid var(--line)!important;transition:background-color .2s}
.timeline-page .design-avatar{display:grid!important;place-items:center;flex:none;width:36px!important;height:36px!important;border-radius:50%!important;background:var(--tint)!important;color:var(--strong)!important;font-size:12px!important;font-weight:700}
.timeline-page .person-name{color:var(--ink)!important;font-size:13.5px;font-weight:650;line-height:1.3}
.timeline-page .you-chip{margin-left:6px;padding:1px 7px;border-radius:99px;background:var(--tint)!important;color:var(--strong)!important;font-size:10.5px!important;font-weight:650;vertical-align:1px}
.timeline-page .design-person-status{display:inline-flex!important;align-items:center;gap:6px;margin-top:4px;background:none!important;border:0!important;padding:0!important;color:var(--muted)!important;font-size:12px!important;font-weight:550}
.timeline-page .design-person-status::before{content:"";width:7px;height:7px;border-radius:50%;background:color-mix(in srgb,var(--muted) 55%,transparent)}
.timeline-page .design-person-status.active{color:var(--strong)!important}
.timeline-page .design-person-status.active::before{background:var(--green);box-shadow:0 0 0 3px color-mix(in srgb,var(--green) 22%,transparent)}
.timeline-page .design-person-status.paused::before,.timeline-page .design-person-status.completion_pending::before{background:var(--tl-amber)}
.timeline-page .design-person-status.completed::before{background:var(--strong)}
.timeline-page .person-kpis{display:flex;flex-wrap:wrap;gap:2px 10px;margin-top:4px;color:var(--muted)!important}
.timeline-page .person-kpis span:first-child{color:var(--ink)!important;font-weight:600}
.timeline-page .track-empty{color:color-mix(in srgb,var(--muted) 80%,transparent)!important;font-size:12px}

/* Intervals */
.timeline-page .interval{border-radius:12px!important;border:1px solid color-mix(in srgb,var(--bar,var(--green)) 32%,var(--line))!important;border-left:4px solid var(--bar,var(--green))!important;background:color-mix(in srgb,var(--bar,var(--green)) 11%,var(--surface))!important;color:var(--ink)!important;box-shadow:var(--shadow-sm)!important;padding:8px 10px 8px 9px!important;overflow:hidden;transition:transform .2s cubic-bezier(.23,1,.32,1),box-shadow .2s,border-color .2s}
.timeline-page .interval b{color:var(--ink)!important;font-size:12.5px;font-weight:650;line-height:1.3;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.timeline-page .interval small{color:var(--muted)!important;font-size:11px!important;display:flex;align-items:center;gap:4px;white-space:nowrap;font-variant-numeric:tabular-nums}
.timeline-page .interval .design-task-id{color:color-mix(in srgb,var(--bar,var(--green)) 70%,var(--ink))!important;font-size:10.5px!important;font-weight:700;letter-spacing:.01em}
.timeline-page .interval .bar-clock{width:12px;height:12px;flex:none}
@media(hover:hover){.timeline-page .interval:hover{transform:translateY(-1px);box-shadow:var(--shadow-md)!important;border-color:color-mix(in srgb,var(--bar,var(--green)) 55%,var(--line))!important;z-index:5}}
.timeline-page .interval:focus-visible{outline:2px solid var(--green)!important;outline-offset:2px}

/* Running work: solid accent, growing edge */
.timeline-page .interval.is-active{background:var(--green)!important;border-color:var(--green)!important;border-left-color:color-mix(in srgb,var(--green) 60%,var(--ink))!important;color:var(--on-green)!important}
.timeline-page .interval.is-active :is(b,small,.design-task-id){color:var(--on-green)!important}
.timeline-page .interval.is-active small{opacity:.85}
.timeline-page .interval.is-active::after{content:"";position:absolute;right:8px;top:9px;width:7px;height:7px;border-radius:50%;background:var(--on-green);box-shadow:0 0 0 0 color-mix(in srgb,var(--on-green) 60%,transparent)}
:root[data-motion=full] .timeline-page .interval.is-active::after{animation:tl-live 1.8s ease-out infinite}
@keyframes tl-live{70%{box-shadow:0 0 0 7px transparent}100%{box-shadow:0 0 0 0 transparent}}

/* Pause and pending report */
.timeline-page .interval.is-paused{background:repeating-linear-gradient(135deg,var(--tl-amber-soft) 0 7px,var(--surface) 7px 13px)!important;border-color:color-mix(in srgb,var(--tl-amber) 35%,var(--line))!important;border-left-color:var(--tl-amber)!important}
.timeline-page .interval.is-report{background:var(--surface)!important;border:1.5px dashed color-mix(in srgb,var(--tl-amber) 70%,var(--line))!important;border-left:4px solid var(--tl-amber)!important}
.timeline-page .interval:is(.is-paused,.is-report) .design-task-id{color:var(--tl-amber)!important}

/* Gaps between work: a dotted connector with a duration chip */
.timeline-page .design-gap{background:repeating-linear-gradient(90deg,color-mix(in srgb,var(--muted) 45%,transparent) 0 4px,transparent 4px 9px) center/100% 1.5px no-repeat!important;border:0!important;display:flex!important;align-items:center;justify-content:center;pointer-events:auto}
.timeline-page .design-gap span{padding:2px 8px;border-radius:99px;background:var(--surface)!important;border:1px solid var(--line);color:var(--muted)!important;font-size:11px!important;font-weight:550;white-space:nowrap;font-variant-numeric:tabular-nums}

/* Now line */
.timeline-page .design-now-line{width:2px!important;background:var(--accent-2,var(--green))!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent-2,var(--green)) 15%,transparent);z-index:4!important}
.timeline-page .design-now-line span{background:var(--accent-2,var(--green))!important;color:var(--on-green)!important;border-radius:99px!important;padding:2px 7px!important;font-size:10.5px!important;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}

/* Status filter row */
.timeline-page .design-status-tabs{background:var(--soft)!important;border:1px solid var(--line)!important;border-radius:12px!important;padding:3px!important}
.timeline-page .design-status-tabs button{border:0!important;background:transparent!important;color:var(--muted)!important;border-radius:9px!important;font-size:12.5px!important;font-weight:550}
.timeline-page .design-status-tabs button.selected{background:var(--surface)!important;color:var(--strong)!important;box-shadow:var(--shadow-sm)!important}

/* Legend with real swatches */
.timeline-page .design-timeline-foot{display:flex!important;flex-wrap:wrap;gap:8px 18px;padding:14px 20px!important;border-top:1px solid var(--line)!important;background:var(--surface)!important;color:var(--muted)!important;font-size:12px!important}
.timeline-page .design-timeline-foot span{display:inline-flex;align-items:center;gap:8px;font-size:0}
.timeline-page .design-timeline-foot span::before{content:"";width:22px;height:12px;border-radius:4px;flex:none}
.timeline-page .design-timeline-foot span::after{font-size:12px;color:var(--muted)}
.timeline-page .design-timeline-foot span:nth-of-type(1)::before{background:var(--green)}
.timeline-page .design-timeline-foot span:nth-of-type(1)::after{content:"В работе"}
.timeline-page .design-timeline-foot span:nth-of-type(2)::before{background:color-mix(in srgb,var(--green) 13%,var(--surface));border:1px solid color-mix(in srgb,var(--green) 32%,var(--line));border-left:3px solid var(--green)}
.timeline-page .design-timeline-foot span:nth-of-type(2)::after{content:"Завершено"}
.timeline-page .design-timeline-foot span:nth-of-type(3)::before{background:var(--surface);border:1.5px dashed var(--tl-amber);border-left:3px solid var(--tl-amber)}
.timeline-page .design-timeline-foot span:nth-of-type(3)::after{content:"Ожидает отчёта"}
.timeline-page .design-timeline-foot span:nth-of-type(4)::before{height:2px;border-radius:0;background:repeating-linear-gradient(90deg,var(--muted) 0 4px,transparent 4px 8px)}
.timeline-page .design-timeline-foot span:nth-of-type(4)::after{content:"Промежуток между работами"}

/* ---------- Interval dialog ---------- */
.timeline-page #detail-dialog{border:1px solid var(--line)!important;border-radius:22px!important;box-shadow:var(--shadow-md)!important;background:var(--surface)!important;color:var(--ink)!important;width:min(720px,calc(100vw - 24px))!important}
.timeline-page #detail-dialog .dialog-head{border-bottom:1px solid var(--line)!important;padding:18px 22px 14px!important;background:var(--surface)!important}
.timeline-page #detail-dialog .dialog-head .eyebrow{display:none}
.timeline-page #detail-dialog #detail-title{margin:0;color:var(--ink)!important;font-size:19px;line-height:1.3;letter-spacing:-.01em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;cursor:pointer;overflow-wrap:anywhere}
.timeline-page #detail-dialog #detail-title.is-expanded{-webkit-line-clamp:unset}
.timeline-page :is(#detail-dialog,#correction-dialog,#admin-edit-dialog,#admin-delete-dialog) .icon-button{display:grid!important;place-items:center;flex:none;padding:0!important;font-size:20px!important;line-height:1!important;min-height:0!important;width:36px;height:36px;border-radius:50%!important;border:1px solid var(--line)!important;background:transparent!important;color:var(--muted)!important}
.timeline-page #detail-dialog #detail-body{padding:18px 22px 22px!important;background:var(--surface)!important}

.interval-summary{margin:0 0 16px}
.interval-summary p{margin:0 0 12px;color:var(--muted);font-size:13px;line-height:1.5}
.interval-summary p b{color:var(--ink);font-weight:650}
.day-strip{position:relative;height:10px;border-radius:99px;background:var(--soft);border:1px solid var(--line);overflow:hidden}
.day-strip span{position:absolute;top:0;bottom:0;min-width:3px;border-radius:99px;background:var(--bar,var(--green))}
.day-strip span.is-open{background:var(--green);box-shadow:0 0 0 2px color-mix(in srgb,var(--green) 25%,transparent)}
.day-strip i{position:absolute;top:-2px;bottom:-2px;width:2px;background:var(--accent-2,var(--green))}
.day-strip-scale{display:flex;justify-content:space-between;margin-top:5px;color:var(--muted);font-size:10.5px;font-variant-numeric:tabular-nums}

.timeline-page #detail-dialog .detail-status-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.timeline-page #detail-dialog .work-status,.timeline-page #detail-dialog .type-chip{display:inline-flex;align-items:center;gap:7px;padding:5px 11px!important;border-radius:99px!important;font-size:12.5px!important;font-weight:600;border:1px solid var(--line)!important;background:var(--soft)!important;color:var(--ink)!important}
.timeline-page #detail-dialog .work-status::before,.timeline-page #detail-dialog .type-chip::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--muted)}
.timeline-page #detail-dialog .type-chip::before{background:var(--type-color,var(--green))}
.timeline-page #detail-dialog .work-status.is-active{background:var(--tint)!important;color:var(--strong)!important;border-color:transparent!important}
.timeline-page #detail-dialog .work-status.is-active::before,.timeline-page #detail-dialog .work-status.is-completed::before{background:var(--green)}
.timeline-page #detail-dialog .work-status:is(.is-paused,.is-report){background:var(--tl-amber-soft)!important;color:var(--ink)!important;border-color:color-mix(in srgb,var(--tl-amber) 30%,var(--line))!important}
.timeline-page #detail-dialog .work-status:is(.is-paused,.is-report)::before{background:var(--tl-amber)}

.timeline-page #detail-dialog .detail-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px!important;margin:0 0 6px}
.timeline-page #detail-dialog .detail-grid>div{background:transparent!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;padding:11px 0!important;min-width:0}
.timeline-page #detail-dialog .detail-grid dt{color:var(--muted)!important;font-size:12px!important;font-weight:550!important;text-transform:none!important;letter-spacing:0!important;margin:0 0 3px}
.timeline-page #detail-dialog .detail-grid dd{margin:0;color:var(--ink)!important;font-size:14px!important;font-weight:550;line-height:1.45;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.timeline-page #detail-dialog .task-link{color:var(--strong)!important;font-weight:650;text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--strong) 35%,transparent);text-underline-offset:3px}

.timeline-page #detail-dialog .detail-section{background:transparent!important;border:0!important;border-radius:0!important;padding:14px 0 0!important;margin:0!important;box-shadow:none!important}
.timeline-page #detail-dialog .detail-section h4{margin:0 0 6px;color:var(--muted)!important;font-size:12px!important;font-weight:600!important;text-transform:none!important;letter-spacing:0!important}
.timeline-page #detail-dialog .detail-section p{margin:0;color:var(--ink)!important;font-size:14px;line-height:1.55}
.timeline-page #detail-dialog .detail-section.pause-note{margin-top:14px!important;padding:12px 14px!important;border-radius:12px!important;background:var(--tl-amber-soft)!important;border-left:3px solid var(--tl-amber)!important}
.timeline-page #detail-dialog .detail-section.reminder-note{margin-top:14px!important;padding:12px 14px!important;border-radius:12px!important;background:var(--tint)!important;border-left:3px solid var(--green)!important}
.timeline-page #detail-dialog .answer-list{display:grid;gap:0;background:transparent!important;border:0!important}
.timeline-page #detail-dialog .answer{display:grid!important;grid-template-columns:26px minmax(0,1fr);gap:10px;padding:10px 0!important;background:transparent!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important}
.timeline-page #detail-dialog .answer:last-child{border-bottom:0!important}
.timeline-page #detail-dialog .answer>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--tint)!important;color:var(--strong)!important;font-size:11.5px;font-weight:700}
.timeline-page #detail-dialog .answer b{color:var(--muted)!important;font-size:12.5px;font-weight:600}
.timeline-page #detail-dialog .answer p{color:var(--ink)!important;margin:3px 0 0}
.timeline-page #detail-dialog .attachment{background:var(--soft)!important;border:1px solid var(--line)!important;color:var(--ink)!important;border-radius:12px!important}
.timeline-page #detail-dialog .attachment small{color:var(--muted)!important}

.timeline-page #detail-dialog .dialog-actions{border-top:1px solid var(--line)!important;background:var(--surface)!important;padding:14px 22px!important;gap:8px}
.timeline-page #detail-dialog .dialog-actions .btn{border-radius:99px!important}
.timeline-page #detail-dialog #close-detail-bottom{margin-left:auto;background:var(--green)!important;color:var(--on-green)!important;border-color:var(--green)!important}
.timeline-page :is(#detail-dialog,#admin-delete-dialog) .btn.danger{background:transparent!important;color:var(--tl-danger)!important;border:1px solid color-mix(in srgb,var(--tl-danger) 40%,var(--line))!important}

/* Correction and admin dialogs share the same surface */
.timeline-page :is(#correction-dialog,#admin-edit-dialog,#admin-delete-dialog){border:1px solid var(--line)!important;border-radius:20px!important;background:var(--surface)!important;color:var(--ink)!important;box-shadow:var(--shadow-md)!important}
.timeline-page :is(#correction-dialog,#admin-edit-dialog,#admin-delete-dialog) .eyebrow{color:var(--muted)!important;text-transform:none!important}
.timeline-page :is(#correction-dialog,#admin-edit-dialog,#admin-delete-dialog) label{color:var(--muted)!important;font-weight:600}

@media(max-width:760px){
  .timeline-page #day-view>.metrics{grid-template-columns:1fr 1fr!important;border-radius:16px}
  .timeline-page #day-view>.metrics>.metric-card{padding:12px 14px!important;gap:10px;border-left:0!important;border-top:1px solid var(--line)!important}
  .timeline-page #day-view>.metrics>.metric-card:nth-child(-n+2){border-top:0!important}
  .timeline-page #day-view>.metrics>.metric-card:nth-child(even){border-left:1px solid var(--line)!important}
  .timeline-page #day-view .metric-icon{display:none!important}
  .timeline-page #day-view .metric-card strong{font-size:19px!important}
  .timeline-page .design-avatar{display:none!important}
  .timeline-page .person-name{font-size:12.5px;word-break:normal!important;overflow-wrap:normal!important;hyphens:manual}
  .timeline-page .person-kpis{flex-direction:column;gap:1px}
  .timeline-page #detail-dialog .detail-grid{grid-template-columns:1fr 1fr;gap:0 14px!important}
  .timeline-page #detail-dialog .dialog-actions{flex-wrap:wrap}
  .timeline-page #detail-dialog #close-detail-bottom{flex:1 1 100%;order:-1}
}
.timeline-page .timeline-row:not(:first-child) .design-now-line span{display:none!important}
.timeline-page .you-chip{text-transform:none!important;letter-spacing:0!important}
.timeline-page :is(#correction-dialog,#admin-edit-dialog,#admin-delete-dialog){width:min(640px,calc(100vw - 24px))!important;max-width:min(640px,calc(100vw - 24px))!important}
.timeline-page .view-tabs .view-tab{flex:none!important;white-space:nowrap!important;padding:9px 16px!important}
@media(max-width:760px){.timeline-page #detail-dialog #detail-title{font-size:17px;-webkit-line-clamp:2}.timeline-page #detail-dialog .dialog-head{padding:14px 16px 12px!important}.timeline-page #detail-dialog #detail-body{padding:14px 16px 18px!important}}
/* Timeline as a tab of the workspace (mobile.html): the SPA content already has page padding */
.spa-timeline .timeline-shell{padding:0!important;margin:0!important;max-width:none!important;width:auto!important;min-height:0!important}
.spa-timeline #reload{display:none!important}
.spa-timeline .app-header #viewer{font-weight:400!important;font-size:12.5px!important;color:var(--muted)!important;margin:4px 0 0}
.spa-timeline :is(select,input:not([type=checkbox]):not([type=radio]),textarea){background-color:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}

/* The time header is above sticky names, and every name fills its grid row. */
.timeline-page .timeline-scroll{isolation:isolate}
.timeline-page .timeline-header{z-index:20;min-height:48px;height:auto}
.timeline-page .timeline-header .person-head{height:auto!important;min-height:48px;align-self:stretch;background:var(--surface);box-shadow:0 1px 0 var(--line)}
.timeline-page .timeline-row{background:var(--surface);align-items:stretch}
.timeline-page .timeline-row .person{height:auto!important;align-self:stretch;background:var(--surface);box-shadow:0 1px 0 var(--line)}
.timeline-page .design-person-body{min-width:0;flex:1}
.timeline-page .person-name{display:block;white-space:normal;overflow-wrap:anywhere}
.timeline-page .person-name .you-chip{display:inline-block;white-space:nowrap;overflow-wrap:normal}
.timeline-page .timeline-grid{width:calc(var(--person-width) + var(--track-width))}
.timeline-page .timeline-card-head>div,.timeline-page .timeline-toolbar>*{min-width:0}
@media(min-width:761px){
 .timeline-page .app-header .brand{min-width:0;flex:0 1 auto}
 .timeline-page .app-header .page-filters{flex:0 1 auto;justify-content:flex-end}
 .timeline-page .timeline-toolbar{gap:12px;flex-wrap:wrap}
}

/* A flex-basis in a column becomes height. Use an explicit grid instead of the
   legacy row/column cascade, and let the available content width choose layout. */
.timeline-page .timeline-shell {container:workday / inline-size}
.timeline-page .app-header {display:grid!important;grid-template-columns:minmax(0,1fr);align-items:start;gap:16px;height:auto;min-height:0}
.timeline-page .app-header .brand {min-width:0;min-height:0;align-self:start}
.timeline-page .app-header .page-filters {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;align-items:end;align-content:start;min-height:0;margin:0;padding:0;border:0;background:transparent;width:100%;max-width:none}
.timeline-page .page-filters .compact-field {min-width:0;max-width:none;width:auto;margin:0}
.timeline-page .page-filters :is(input:not([type=checkbox]),select) {width:100%;max-width:none;min-width:0}
.timeline-page .page-filters .day-navigation {grid-column:1/-1;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;width:100%;gap:8px;margin:0}
.timeline-page .page-filters .day-navigation .btn {width:100%;max-width:none;min-width:0;min-height:40px;margin:0}
.timeline-page .page-filters .timeline-shift-filter {grid-column:1/-1;flex-wrap:wrap;min-width:0;margin:0}
.timeline-page .timeline-toolbar {display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 18px}
.timeline-page .timeline-toolbar input {flex:1 1 200px;min-width:0;width:auto;max-width:none}
.timeline-page .timeline-toolbar .design-status-tabs {flex:1 1 auto;min-width:0;max-width:100%;overflow-x:auto;justify-content:flex-start}
.timeline-page .timeline-toolbar .design-status-tabs button {flex:none}
@container workday (min-width:650px) {
 .timeline-page .app-header .page-filters {grid-template-columns:minmax(150px,.75fr) minmax(180px,1fr) auto}
 .timeline-page .page-filters .day-navigation {grid-column:3;grid-row:1;grid-template-columns:40px auto 40px;width:auto}
}
@container workday (min-width:1100px) {
 .timeline-page .app-header {grid-template-columns:minmax(220px,1fr) minmax(620px,1.8fr)}
}
@container workday (max-width:900px) {
 .timeline-page #day-view>.metrics {grid-template-columns:repeat(2,minmax(0,1fr))}
 .timeline-page #day-view>.metrics>.metric-card:nth-child(odd) {border-left:0!important}
 .timeline-page #day-view>.metrics>.metric-card:nth-child(n+3) {border-top:1px solid var(--line)!important}
}
@media (min-width:761px) and (max-width:1024px) {
 .timeline-page .timeline-grid {--person-width:210px}
 .timeline-page .person {padding:12px}
}

/* ==== Timeline A (owner's choice, 17.11.2026) ============================================
   One toolbar for the day, filters in a sheet, totals in the card header on a PC, a list with
   day lines on a phone, the hour grid fitted to the width from 601 px and a full-screen view
   with explicit exits. Vertical scrolling always belongs to the page. Sizes in px: the
   Android WebView keeps textZoom at 100. */
.timeline-page .tl-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.timeline-page .tl-i,.tl-viewer .tl-i,.tl-sheet .tl-i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
html .timeline-page .app-header.tl-head{display:block!important;position:static;height:auto;min-height:0;margin:0 0 12px;padding:0;border:0;background:none;box-shadow:none}
.timeline-page .tl-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.timeline-page .tl-ibtn,.tl-viewer .tl-ibtn,.tl-sheet .tl-ibtn{display:inline-grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:12px;background:none;color:var(--muted);cursor:pointer;flex:none}
.timeline-page .tl-ibtn:hover:not(:disabled),.tl-viewer .tl-ibtn:hover:not(:disabled),.tl-sheet .tl-ibtn:hover:not(:disabled){background:var(--soft);color:var(--ink)}
.timeline-page .tl-date{display:flex;align-items:center;gap:4px;min-width:0}
.timeline-page .tl-date-pick{position:relative;display:inline-flex;align-items:center;gap:10px;height:44px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;min-width:0;margin:0}
.timeline-page .tl-date-pick .tl-i{color:var(--green)}
.timeline-page .tl-date-pick>span{display:flex;align-items:baseline;gap:8px;white-space:nowrap}
.timeline-page .tl-date-pick b{font-size:15px;font-weight:650}
.timeline-page .tl-date-pick small{font-size:12px;font-weight:600;color:var(--muted)}
.timeline-page .tl-date-pick input#date{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;opacity:0;cursor:pointer}
.timeline-page .tl-today{height:36px;min-height:36px;padding:0 12px;border:0;border-radius:10px;background:var(--tint);color:var(--strong);font-size:13px;font-weight:600;cursor:pointer}
html .timeline-page .view-tabs.tl-tabs{display:flex;gap:2px;margin:0;padding:3px;border:1px solid var(--line);border-radius:12px;background:var(--soft);box-shadow:none;overflow:visible}
html .timeline-page .view-tabs.tl-tabs .view-tab{position:relative;height:36px;min-height:36px;padding:0 14px;border:0;border-radius:9px;background:none;color:var(--muted);font-size:14px;font-weight:600;box-shadow:none;white-space:nowrap}
html .timeline-page .view-tabs.tl-tabs .view-tab.active{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm)}
html .timeline-page .view-tabs.tl-tabs .view-tab.hidden{display:none}
.timeline-page .tl-search,.tl-sheet .tl-search{display:flex;align-items:center;gap:8px;height:44px;padding:0 12px;border-radius:12px;background:var(--soft);color:var(--muted);cursor:text;margin:0}
.timeline-page .tl-search input,.tl-sheet .tl-search input{flex:1;min-width:0;height:100%;min-height:0;margin:0;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;outline:0;color:var(--ink);font-size:14px}
.timeline-page .tl-search:focus-within,.tl-sheet .tl-search:focus-within{box-shadow:0 0 0 2px var(--green)}
.timeline-page .tl-toolbar>.tl-search{display:none;flex:1;min-width:200px}
.timeline-page .tl-worked,.timeline-page .tl-filter-btn{display:inline-flex;align-items:center;gap:8px;height:44px;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:600;white-space:nowrap;cursor:pointer}
.timeline-page .tl-worked{display:none}
.timeline-page .tl-worked b{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--soft);color:var(--muted);font-size:12px}
.timeline-page .tl-filter-btn{margin-left:auto}
.timeline-page .tl-filter-btn b{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--green);color:var(--on-green,#fff);font-size:12px}
.timeline-page :is(.tl-worked,.tl-filter-btn).is-on,.timeline-page :is(.tl-worked,.tl-filter-btn).is-on:hover:not(:disabled){background:var(--tint);border-color:color-mix(in srgb,var(--green) 50%,transparent);color:var(--strong)}
.timeline-page .tl-toolbar #reload{display:none}
@media(min-width:1025px){
 .timeline-page .tl-toolbar{flex-wrap:nowrap;padding:6px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow-sm)}
 .timeline-page .tl-toolbar :is(.tl-date,.tl-tabs,.tl-filter-btn){flex:none}
 .timeline-page .tl-toolbar .tl-date-pick{border-color:transparent;background:var(--soft)}
 .timeline-page .tl-toolbar>.tl-search{display:flex}
 .timeline-page .tl-toolbar .tl-filter-btn{margin-left:0;border-color:transparent;background:var(--soft)}
}
@media(min-width:1440px){.timeline-page .tl-worked{display:inline-flex;border-color:transparent;background:var(--soft)}}
@media(max-width:600px){
 .timeline-page .tl-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
 .timeline-page .tl-date{grid-column:1}
 .timeline-page .tl-date-pick{flex:1;justify-content:center;padding:0 10px;gap:8px}
 .timeline-page .tl-date-pick b{font-size:14px}
 .timeline-page .tl-today{display:none}
 .timeline-page .tl-filter-btn{grid-column:2;grid-row:1;width:44px;padding:0;justify-content:center;position:relative;margin:0}
 .timeline-page .tl-filter-btn span{display:none}
 .timeline-page .tl-filter-btn b{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;font-size:11px;border:2px solid var(--page)}
 html .timeline-page .view-tabs.tl-tabs{grid-column:1/-1}
 html .timeline-page .view-tabs.tl-tabs .view-tab{flex:1;padding:0 6px;font-size:13px}
}

/* Totals: tiles on a phone and a fold, one line in the card header on a PC. */
@media(min-width:1025px){html .timeline-page #day-view>.metrics{display:none!important}}
html .timeline-page .timeline-card{overflow:clip}
html .timeline-page .timeline-card-head.tl-team-head{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"title stats open" "legend legend tools";align-items:center;gap:10px 24px;margin:0;padding:14px 16px 12px;border-bottom:1px solid var(--line)}
.timeline-page .tl-team-title{grid-area:title}
.timeline-page .tl-team-title h2{margin:0;font-size:17px;font-weight:650}
.timeline-page .tl-team-title p{margin:0;font-size:13px;color:var(--muted)}
.timeline-page .tl-istats{grid-area:stats;display:none;margin:0}
.timeline-page .tl-open{grid-area:open;justify-self:end;display:inline-flex;align-items:center;gap:8px;min-height:44px}
.timeline-page .tl-team-head .tl-head-legend{grid-area:legend}
.timeline-page .tl-team-head>.timeline-actions{grid-area:tools;justify-self:end;display:flex!important;align-items:center;gap:8px;margin:0}
@media(min-width:1025px){
 .timeline-page .tl-istats{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 22px;min-width:0}
 .timeline-page .tl-istats div{display:flex;align-items:baseline;gap:7px;white-space:nowrap}
 .timeline-page .tl-istats dt{font-size:13px;color:var(--muted)}
 .timeline-page .tl-istats dd{margin:0;font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
 .timeline-page .tl-istats .is-warn dd{color:var(--tl-amber,#a8650a)}
}
.timeline-page .tl-legend,.tl-viewer .tl-legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0;font-size:12px;color:var(--muted)}
.timeline-page .tl-legend span,.tl-viewer .tl-legend span{display:inline-flex;align-items:center;gap:6px}
.tl-lg{display:inline-block;width:14px;height:9px;border-radius:3px;background:color-mix(in srgb,var(--green) 35%,var(--surface));box-shadow:inset 3px 0 color-mix(in srgb,var(--green) 70%,var(--surface))}
.tl-lg.is-active{background:var(--green);box-shadow:none}
.tl-lg.is-paused{background:repeating-linear-gradient(135deg,var(--tl-amber-soft,#f8ead0) 0 3px,var(--surface) 3px 6px);box-shadow:inset 3px 0 var(--tl-amber,#a8650a)}
.tl-lg.is-report{background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--tl-amber,#a8650a)}
.tl-lg.is-gap{background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--muted) 30%,transparent) 0 2px,transparent 2px 5px);box-shadow:inset 0 0 0 1px var(--line)}
.timeline-page .tl-foot-legend{display:none;padding:10px 14px;border-top:1px solid var(--line)}
html .timeline-page .zoom-control{display:flex;align-items:center;gap:0;padding:2px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
html .timeline-page .zoom-control button,.tl-viewer .zoom-control button{display:inline-grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:9px;background:none;color:var(--ink)}
html .timeline-page .zoom-control button:disabled,.tl-viewer .zoom-control button:disabled{opacity:.35}
html .timeline-page #zoom-label,.tl-viewer #zoom-label{min-width:58px;text-align:center;font-size:13px;font-weight:650;white-space:nowrap;font-variant-numeric:tabular-nums}
html .timeline-page #focus-now,.tl-viewer #focus-now{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 12px}

/* The inline grid scrolls only sideways: vertical swipes always scroll the page. */
html .timeline-page .timeline-card>.timeline-scroll{max-height:none!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior:auto!important}
.timeline-page .tl-vrest{display:none}
.timeline-page .tl-team-list{display:none;margin:0;padding:0 6px 4px;list-style:none}

/* Phone (folded): the list; the hour grid opens in the full-screen view. */
@media(max-width:600px){
 html .timeline-page .timeline-card-head.tl-team-head{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title open";padding:12px 12px 8px 14px;border-bottom:0}
 .timeline-page .tl-team-head .tl-head-legend,.timeline-page .tl-team-head>.timeline-actions{display:none!important}
 .timeline-page .tl-open{min-height:40px;padding:0 12px;font-size:13px}
 .timeline-page .tl-team-list{display:block}
 html .timeline-page .timeline-card>.timeline-scroll{display:none!important}
 .timeline-page .tl-foot-legend{display:flex}
}
.timeline-page .tl-team-list li{margin:0}
.timeline-page .tl-team-list li+li{border-top:1px solid var(--line)}
.timeline-page .tl-scale{display:grid;grid-template-columns:32px minmax(0,1fr) 46%;gap:10px;padding:2px 8px 4px;border:0!important}
.timeline-page .tl-scale>div{position:relative;height:14px}
.timeline-page .tl-scale i{position:absolute;transform:translateX(-50%);font-style:normal;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.timeline-page .tl-scale i:first-child{transform:none}.timeline-page .tl-scale i:last-child{transform:translateX(-100%)}
.timeline-page .tl-row{display:grid;grid-template-columns:32px minmax(0,1fr) 46%;align-items:center;gap:10px;width:100%;min-height:56px;padding:8px;border:0;border-radius:12px;background:none;color:var(--ink);text-align:left;cursor:pointer;box-shadow:none}
.timeline-page .tl-row:hover:not(:disabled){background:var(--soft)}
.timeline-page .tl-ava{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--soft);border:1px solid var(--line);color:var(--muted);font-size:12px;font-weight:700}
.timeline-page .tl-ava.is-you{background:var(--tint);border-color:transparent;color:var(--strong)}
.timeline-page .tl-who{display:grid;min-width:0;line-height:1.3}
.timeline-page .tl-who b{font-size:14px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.timeline-page .tl-who small{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.timeline-page .tl-st.is-active{color:var(--strong);font-weight:600}.timeline-page .tl-st.is-paused,.timeline-page .tl-st.is-completion_pending{color:var(--tl-amber,#a8650a);font-weight:600}
.timeline-page .tl-mini{position:relative;height:14px;border-radius:6px;background:var(--soft);overflow:hidden}
.timeline-page .tl-mini i{position:absolute;top:0;bottom:0;border-radius:4px;background:color-mix(in srgb,var(--bar,var(--green)) 45%,var(--surface))}
.timeline-page .tl-mini i.is-active{background:var(--green)}
.timeline-page .tl-mini i.is-paused{background:var(--tl-amber,#a8650a)}
.timeline-page .tl-mini i.is-report{background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--tl-amber,#a8650a)}
.timeline-page .tl-mini .tl-now{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:var(--ink)}
.timeline-page .tl-empty{padding:24px 12px;text-align:center;color:var(--muted)}

/* Filters sheet: bottom sheet on a phone, centred dialog on a wide screen. */
html .tl-sheet{width:min(480px,calc(100vw - 32px));max-width:none;max-height:min(86dvh,720px);margin:auto;padding:0;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow-md);overflow:auto;overscroll-behavior:contain}
html .tl-sheet[open]{display:flex;flex-direction:column}
.tl-sheet::backdrop,.timeline-page #detail-dialog::backdrop{background:rgba(10,20,15,.38)}
.tl-sheet .tl-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 12px 4px 20px}
.tl-sheet .tl-sheet-head h2{margin:0;font-size:18px;font-weight:650}
.tl-sheet .tl-sheet-body{display:grid;gap:14px;padding:8px 20px 16px}
.tl-sheet .tl-field{display:grid;gap:6px;margin:0}
.tl-sheet .tl-field>span:first-child{font-size:13px;font-weight:600;color:var(--muted);text-transform:none;letter-spacing:0}
.tl-sheet .tl-field[hidden]{display:none}
.tl-sheet select#employee{height:46px;border-radius:12px}
.tl-sheet .tl-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;border:0;background:none}
.tl-sheet .tl-chips button,.tl-sheet .tl-chip{height:38px;min-height:38px;padding:0 14px;border:1px solid var(--line);border-radius:99px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:500;box-shadow:none}
.tl-sheet .tl-chips button.selected,.tl-sheet .tl-chips button.is-on,.tl-sheet .tl-chips button.selected:hover,.tl-sheet .tl-chips button.is-on:hover{background:var(--tint);border-color:color-mix(in srgb,var(--green) 55%,transparent);color:var(--strong);font-weight:600}
.tl-sheet .tl-chip small{font-size:12px;font-weight:650;color:var(--muted)}
.tl-sheet .tl-switch{display:flex;align-items:center;gap:12px;min-height:44px;margin:0;font-size:15px;cursor:pointer;text-transform:none;letter-spacing:0;color:var(--ink)}
.tl-sheet .tl-switch input{width:20px;height:20px;min-height:0;margin:0;accent-color:var(--green)}
.tl-sheet .tl-switch>span{display:grid;line-height:1.3}
.tl-sheet .tl-switch small{font-size:12px;color:var(--muted)}
.tl-sheet .tl-switch.is-lead{padding:10px 12px;border-radius:14px;background:var(--soft)}
.tl-sheet .timeline-shift-filter{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.tl-sheet .tl-sheet-foot{position:sticky;bottom:0;display:flex;gap:8px;padding:12px 20px calc(16px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface)}
.tl-sheet .tl-sheet-foot .btn{flex:1;min-height:44px}
@media(max-width:760px){html .tl-sheet{width:100%;max-width:100%;max-height:90dvh;margin:auto 0 0;border-radius:20px 20px 0 0;border-bottom:0}}

/* Full-screen view: covers the shell, its own scroll on both axes, explicit exits. */
html .tl-viewer{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:var(--surface);color:var(--ink);overflow:hidden}
html .tl-viewer[open]{display:flex;flex-direction:column}
.tl-viewer::backdrop{background:var(--page)}
html.tl-locked{overflow:hidden}
.tl-viewer .tl-vhead{display:flex;align-items:center;gap:8px;padding:calc(6px + env(safe-area-inset-top)) 12px 6px 8px;border-bottom:1px solid var(--line);background:var(--surface)}
.tl-viewer .tl-vclose{color:var(--ink)}
.tl-viewer .tl-vtitle{display:grid;flex:1;min-width:0;line-height:1.25}
.tl-viewer .tl-vtitle b{font-size:16px;font-weight:650}
.tl-viewer .tl-vtitle small{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-viewer .tl-vfilter{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 12px}
.tl-viewer .tl-vfilter b{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--green);color:var(--on-green,#fff);font-size:12px}
.tl-viewer .tl-vfilter.is-on{background:var(--tint);color:var(--strong)}
.tl-viewer .tl-vtools>.timeline-actions{display:flex!important;align-items:center;gap:8px;margin:0}
.tl-viewer .zoom-control{display:flex;align-items:center;padding:2px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.tl-viewer .tl-vbody{flex:1;min-height:0;display:flex}
html .tl-viewer .tl-vbody>.timeline-scroll{flex:1;min-width:0;height:100%;max-height:none!important;overflow:auto!important;overscroll-behavior:contain!important}
.tl-viewer .tl-vrest{position:sticky;left:0;display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:min(100%,100vw);padding:10px 12px}
.tl-viewer .tl-vrest p:first-child:empty{display:none}
.tl-viewer .tl-vrest>p:first-child{margin:0;font-size:14px;color:var(--muted)}
.tl-viewer .timeline-row.is-focus .person{background:var(--tint)!important;box-shadow:inset 3px 0 var(--green)}
.tl-viewer .tl-vnote{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:5;width:max-content;max-width:calc(100vw - 32px);margin:0;padding:12px 16px;border-radius:14px;background:var(--ink);color:var(--surface);font-size:14px;box-shadow:var(--shadow-md)}
.tl-viewer .tl-vbar{display:none}
@media(max-width:600px) and (orientation:portrait){
 .tl-viewer .tl-vhead{gap:6px;padding-right:8px}
 .tl-viewer .tl-vfilter{display:none}
 .tl-viewer #focus-now{width:40px;padding:0;justify-content:center}
 .tl-viewer #focus-now span{display:none}
 .tl-viewer #zoom-label{min-width:44px}
 .tl-viewer .tl-vbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px 6px calc(6px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface)}
 .tl-viewer .tl-vbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:58px;padding:4px 2px;border:0;border-radius:12px;background:none;color:var(--ink);text-align:center;box-shadow:none}
 .tl-viewer .tl-vbar button:hover:not(:disabled){background:var(--soft)}
 .tl-viewer .tl-vbar .tl-i{width:22px;height:22px}
 .tl-viewer .tl-vbar span{display:grid;line-height:1.2}
 .tl-viewer .tl-vbar b{font-size:13px;font-weight:650}
 .tl-viewer .tl-vbar small{max-width:100%;overflow:hidden;font-size:11px;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}
 .tl-viewer .tl-vbar .is-on,.tl-viewer .tl-vbar .is-on:hover:not(:disabled){background:var(--tint);color:var(--strong)}
}
@media(max-width:380px){.tl-viewer .tl-vtitle small{display:none}}

/* Interval card: full screen on a phone (portrait or rotated), like the previous design;
   the day strip shows the person's other works. */
.day-strip em{position:absolute;top:2px;bottom:2px;min-width:2px;border-radius:99px;background:color-mix(in srgb,var(--muted) 32%,transparent)}
@media(max-width:760px),(max-height:520px){
 html .timeline-page #detail-dialog{position:fixed;inset:0;width:100vw!important;max-width:100vw!important;height:100dvh;max-height:100dvh!important;margin:0;border:0!important;border-radius:0!important;box-shadow:none!important}
 html .timeline-page #detail-dialog .dialog-head{flex:none;align-items:center;padding:calc(12px + env(safe-area-inset-top)) 12px 12px 16px!important}
 html .timeline-page #detail-dialog #detail-body{flex:1;min-height:0}
 html .timeline-page #detail-dialog .dialog-actions{flex:none;margin:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom))!important}
}
@media(min-width:761px) and (min-height:521px){html .timeline-page #detail-dialog{width:min(620px,calc(100vw - 32px))!important;border-radius:20px!important}}
/* Narrow hours (under 52 px): every second hour label. */
.timeline-page .tl-dense .hour-label:nth-child(even){visibility:hidden}

/* Shell header rules must not add their minimum height to this dialog header. */
html .timeline-page #timeline-viewer .tl-vhead{height:auto;min-height:0;flex:0 0 auto;margin:0;padding:6px 12px 6px 8px}
html:not(.android-app) .timeline-page #timeline-viewer .tl-vhead{padding-top:calc(6px + env(safe-area-inset-top))}

/* One search surface in standalone pages and the workspace, including focused inputs. */
html .tl-search>input:is(#timeline-search,#filter-search){background:transparent!important;box-shadow:none!important;outline:0!important;border:0!important;border-radius:0;appearance:none;-webkit-appearance:none}
