.home-chart-controls{gap:6px!important;}
.home-timeline #patient_chart_range_btns{display:grid;grid-template-columns:.8fr 1fr 1fr 1.35fr;gap:5px;min-width:0;}
#patient_chart_range_btns .chart-range-btn{min-width:0!important;flex:initial!important;min-height:34px;padding:6px 3px!important;white-space:nowrap;font-size:11px!important;border-radius:9px;}
.home-chart-reset{width:34px;min-width:34px!important;min-height:34px!important;padding:6px 3px!important;}
.home-timeline .home-chart-controls{margin-bottom:6px;grid-template-columns:minmax(0,1fr) 34px;}
.timeline-heading-actions{display:flex;align-items:center;flex:none;gap:2px;}
.timeline-fullscreen-toggle{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:10px;background:#eef6f0;color:#2d694b;cursor:pointer;font-size:19px;}
.timeline-fullscreen-toggle:focus-visible{outline:3px solid #6caa7e;outline-offset:2px;}
.home-timeline .factor-card-heading h3{min-width:0;}
.timeline-window-label{font-size:12px;line-height:1.5;color:#5f7969;margin:14px 0 6px;font-variant-numeric:tabular-nums;}
#chart_scroll_container{border:0!important;border-radius:0;background:#fff;overflow:hidden;margin-inline:-10px;width:calc(100% + 20px);}
#chart_wrapper{height:290px!important;min-height:260px;}
#glucoseChart{touch-action:pan-y!important;}
.timeline-context{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:10px 0 8px;font-size:11px;color:#657a6b;}
#timeline_target_label{background:#eff7f1;border-radius:8px;padding:5px 8px;color:#51775b;}
.timeline-sources{font-size:11px;line-height:1.5;color:#657a6b;margin:8px 0 0;}
.timeline-events-open{font:inherit;font-size:12px;color:#346a4d;background:transparent;border:0;padding:8px 0;cursor:pointer;text-align:left;}
.timeline-events-open:disabled{color:#657a6b;cursor:default;}
.timeline-gesture-hint{margin:5px 0 0;font-size:10px;line-height:1.4;color:#657a6b;}
.timeline-events-dialog{margin:auto;width:min(460px,calc(100% - 28px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #dbe7df;border-radius:24px;background:#fff;padding:24px;color:#214c37;}
.timeline-events-dialog::backdrop{background:#132a2380;}
.timeline-events-dialog h2{font-size:24px;margin:4px 0 12px;}
#timeline_events_list{list-style:none;margin:0;padding:0;}
#timeline_events_list li{display:flex;flex-direction:column;gap:5px;padding:14px 0;border-bottom:1px solid #e6eee8;font-size:14px;line-height:1.4;}
#timeline_events_list time,#timeline_events_count{font-size:12px;color:#657a6b;}
.glucose-measurement-age{display:flex;align-items:center;gap:3px;min-height:28px;}
.glucose-stale-help{position:relative;z-index:2;flex:none;border:0;background:transparent;color:#aa762d;padding:4px;font-size:17px;line-height:1;cursor:pointer;}
.glucose-freshness-note{position:relative;z-index:2;font-size:12px;line-height:1.5;color:#87672f;margin:5px 0 0;}
.glucose-stale-help[hidden],.glucose-freshness-note[hidden]{display:none!important;}
.timeline-fullscreen-dialog{position:fixed;inset:0;margin:0;width:100vw;max-width:none;height:100dvh;max-height:none;padding:0;border:0;background:#fff;overflow:hidden;color:#214c37;box-sizing:border-box;}
.timeline-fullscreen-dialog::backdrop{background:#fff;}
.timeline-fullscreen-dialog .home-timeline{display:flex;flex-direction:column;height:100%;width:100%;margin:0!important;padding:0!important;border:0;border-radius:0;box-shadow:none;min-height:0;}
.timeline-fullscreen-dialog .factor-card-heading{position:absolute;right:max(8px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));z-index:5;margin:0;}
.timeline-fullscreen-dialog .factor-card-heading h3,.timeline-fullscreen-dialog .metric-help,.timeline-fullscreen-dialog .home-chart-meta,.timeline-fullscreen-dialog .home-chart-controls,.timeline-fullscreen-dialog .timeline-window-label,.timeline-fullscreen-dialog .timeline-context,.timeline-fullscreen-dialog .timeline-sources{display:none!important;}
.timeline-fullscreen-dialog .factor-card-heading h3{font-size:18px;line-height:1.2;}
.timeline-fullscreen-dialog .home-chart-meta{margin:0 0 4px;}
.timeline-fullscreen-dialog .home-chart-controls{flex:none;max-width:600px;margin-bottom:0;}
.timeline-fullscreen-dialog .timeline-window-label{margin:4px 0;line-height:1.3;}
.timeline-fullscreen-dialog #chart_scroll_container{position:absolute;inset:0;margin:0;width:100%;height:100%;min-height:0;}
.timeline-fullscreen-dialog #chart_wrapper{position:absolute;inset:0;height:100%!important;min-height:0!important;width:100%!important;}
.timeline-fullscreen-dialog .timeline-context{margin:4px 0 0;line-height:1.2;}
.timeline-fullscreen-dialog #timeline_target_label{padding:3px 6px;}
.timeline-fullscreen-dialog .timeline-events-open{padding:4px 0;}
.timeline-fullscreen-dialog .timeline-sources,.timeline-fullscreen-dialog .timeline-gesture-hint{display:none;}
@media(min-width:768px){#chart_wrapper{height:340px!important;}#patient_chart_range_btns .chart-range-btn{font-size:13px!important;}}
@media(max-width:360px){.home-timeline #patient_chart_range_btns{grid-template-columns:.7fr .9fr .9fr 1.55fr;}}
