/* App chart view; print remains controlled by the print SVG renderer. */
#profile-panel .profile-chart-scroll{display:block!important;flex:1!important;min-height:160px;overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}
#profile-panel .chart.source-profile{flex:none!important;min-width:0!important;max-width:none!important;max-height:none!important;margin:0;display:block}
/* Interactive app concept — print continues to use SVG attributes and profile-pdf.js. */
.profile-body{position:relative}
.profile-scale-tools{gap:8px;overflow:visible;flex-wrap:nowrap;max-width:100%;min-width:0;justify-content:flex-end}
.profile-zoom-group{display:flex;align-items:center;gap:3px;flex:none}
.profile-zoom-group>span{display:flex;color:var(--secondary)}
.profile-scale-tools .profile-zoom-group button,.profile-scale-tools>button{display:grid;place-items:center;min-width:28px;min-height:28px;padding:3px;border:0;background:transparent}
.profile-scale-tools output{font-size:11px;min-width:25px}
.profile-scale-tools input[type=range]{width:54px;min-width:0}
.profile-scale-options{position:relative;flex:none}
.profile-scale-options>summary{display:grid;place-items:center;cursor:pointer;padding:5px;list-style:none}
.profile-scale-options>summary::-webkit-details-marker{display:none}
.profile-scale-options>div{position:absolute;right:0;top:100%;z-index:20;width:240px;padding:8px;background:var(--surface,#fff);border:1px solid var(--line,#d1d8df);border-radius:6px;display:grid;gap:8px;box-shadow:0 4px 16px #0002}
.profile-scale-options label{justify-content:space-between}
#profile-panel .profile-chart-scroll{margin-right:0;touch-action:pan-x pan-y}
#profile-panel svg.source-profile{cursor:grab;touch-action:none}
.profile-choice-trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:8px;max-width:240px;min-width:82px;height:30px;padding:3px 7px!important;font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:var(--surface,#fff);color:var(--ink);border:1px solid var(--line,#d1d8df);border-radius:4px}
.profile-choice-menu{position:fixed;margin:0;padding:4px;background:var(--surface,#fff);color:var(--ink);border:1px solid var(--line,#d1d8df);border-radius:6px;overflow:auto;box-shadow:0 4px 16px #0002;inset:auto;font:13px/1.4 inherit}
.profile-choice-menu button{display:block;text-align:left;width:100%;min-height:32px;padding:6px 24px 6px 8px;border:0;background:transparent;color:inherit;border-radius:3px;position:relative}
.profile-choice-menu button:hover,.profile-choice-menu button:focus-visible{background:var(--shell,#f3f5f7)}
.profile-choice-menu button[aria-selected=true]{background:color-mix(in srgb,var(--accent,#1d5fbf) 10%,transparent)}
.profile-choice-menu button[aria-selected=true]::after{content:'✓';position:absolute;right:7px;color:var(--accent)}
.profile-label-toolbar .phone-event-picker{display:flex!important;align-items:center;gap:6px;margin-left:auto;min-width:0}
.profile-label-toolbar .phone-event-picker>span{display:none}
.profile-label-toolbar .profile-choice-trigger{max-width:250px}
#profile-format-toolbar select[hidden],[data-profile-view][hidden],[data-chart-event-picker][hidden]{display:none!important}
#profile-panel .profile-flight-segment{stroke-width:2}
#profile-panel .profile-axis{stroke:var(--line,#cad3dd)!important}
@media(max-width:640px){
 .profile-scale-tools{justify-content:space-between;gap:2px}
 .profile-scale-tools input[type=range]{display:none}
 .profile-scale-tools .profile-zoom-group button,.profile-scale-tools>button,.profile-scale-options summary{min-height:44px;min-width:30px}
 .profile-zoom-group{gap:1px}.profile-zoom-group>span svg{width:13px}
 .profile-choice-trigger{min-height:44px;font-size:16px;max-width:210px}
 .profile-choice-menu button{min-height:44px;font-size:16px}
 .profile-label-toolbar .profile-label-hint{display:none}
 .profile-label-toolbar{min-height:44px;justify-content:flex-end}
}
@media(max-width:640px){
 #profile-panel .profile-body{max-height:none}
 #profile-panel .profile-chart-scroll{min-height:400px}
 #profile-fullscreen-dialog #profile-panel .profile-chart-scroll{min-height:180px}
}
.profile-scale-options>summary::before,.profile-scale-options>summary::after{display:none!important;content:none!important}
.profile-scale-options>summary{margin:0;min-width:28px}

/* Remove the old empty formatting placeholder; real controls use only their own row. */
#profile-panel .profile-body::before{content:none!important;display:none!important;height:0!important;flex-basis:0!important;margin:0!important}
#profile-panel .profile-label-toolbar{padding:0!important;min-height:30px;flex-direction:row;flex-wrap:nowrap}
#profile-panel .profile-label-hint{display:none}
.profile-scale-tools{padding:0;min-height:34px}
.profile-choice-trigger{font-size:14px}
#profile-panel svg.source-profile>text{font-size:var(--profile-reading-font,18px)!important}
@media(min-width:900px){
 #profile-panel .profile-label-toolbar{position:absolute;top:1px;left:0;max-width:calc(100% - 560px);z-index:2}
 #profile-panel .profile-label-toolbar .phone-event-picker{margin-left:0}
}
@media(max-width:640px){
 #profile-panel .profile-label-toolbar{min-height:44px}
 .profile-choice-trigger{font-size:16px}
 #profile-panel svg.source-profile>text.profile-detail-caption{display:none}
}

/* Scroll room below the canvas preserves the pointer anchor when real properties open. */
#profile-fullscreen-dialog .profile-chart-scroll[data-stable-canvas]::after{content:'';display:block;height:var(--profile-anchor-tail,0px)}

#profile-panel svg.source-profile>.profile-legend-text,#profile-panel svg.source-profile>line:not([class]){display:none}

#profile-panel .profile-chart-scroll{scrollbar-gutter:stable}


/* Fixed tab rail / scrolling properties / fixed close: one baseline, no clipped values. */
#profile-panel #profile-format-toolbar{flex:none;box-sizing:border-box;width:100%;max-width:100%;height:52px;min-height:52px;max-height:52px;padding:2px 0;margin:0 0 4px;overflow:hidden;background:var(--surface-raised,var(--shell,#f3f5f7));border-block:1px solid var(--line,#d1d8df)}
#profile-panel #profile-format-toolbar #profile-label-properties{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;width:100%;min-width:0;max-width:100%;height:100%;margin:0;white-space:nowrap}
#profile-panel #profile-format-toolbar #profile-label-properties .label-format-heading{display:flex;align-items:center;gap:0;width:auto;margin:0}
#profile-panel #profile-format-toolbar #profile-label-properties .label-format-heading>strong,#profile-panel #profile-format-toolbar #profile-label-properties .label-live-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#profile-panel #profile-format-toolbar #profile-label-properties .label-format-tabs{display:flex;gap:2px;flex-wrap:nowrap;margin:0}
#profile-panel #profile-format-toolbar #profile-label-properties .label-format-tabs button,#profile-panel #profile-format-toolbar #profile-label-properties>[data-label-close]{display:grid;place-items:center;width:32px;min-width:32px;height:32px;min-height:32px;padding:0;margin:0;border:0;background:transparent;color:var(--secondary);border-radius:4px}
#profile-panel #profile-format-toolbar #profile-label-properties .label-format-tabs button[aria-selected=true]{background:var(--surface,#fff);color:var(--ink);box-shadow:inset 0 -2px var(--accent,#1d5fbf)}
#profile-panel #profile-format-toolbar #profile-label-properties .profile-property-rail{display:flex;align-items:center;min-width:0;width:100%;height:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-inline:contain}
#profile-panel #profile-format-toolbar #profile-label-properties fieldset:not([hidden]){display:flex!important;align-items:center;flex:none;gap:10px;width:max-content;min-width:0;margin:0;padding:0;border:0}
#profile-panel #profile-format-toolbar #profile-label-properties [hidden]{display:none!important}
#profile-panel #profile-format-toolbar #profile-label-properties legend,#profile-panel #profile-format-toolbar #profile-label-properties .event-property-hint{display:none}
#profile-panel #profile-format-toolbar #profile-label-properties .event-property-row,#profile-panel #profile-format-toolbar #profile-label-properties .event-property-grid,#profile-panel #profile-format-toolbar #profile-label-properties .event-reposition-options:not([hidden]),#profile-panel #profile-format-toolbar #profile-label-properties .label-property-grid,#profile-panel #profile-format-toolbar #profile-label-properties .label-wording:not([hidden]){display:flex!important;align-items:center;flex:0 0 auto;flex-wrap:nowrap;gap:10px;min-width:0;width:max-content;margin:0}
#profile-panel #profile-format-toolbar #profile-label-properties .field{display:flex;align-items:center;flex:0 0 auto;flex-direction:row;gap:5px;width:max-content;min-width:0;margin:0;padding:0}
#profile-panel #profile-format-toolbar #profile-label-properties .field>span:first-child{min-height:0;line-height:normal;font-size:13px;font-weight:500;white-space:nowrap}
#profile-panel #profile-format-toolbar #profile-label-properties .field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),#profile-panel #profile-format-toolbar #profile-label-properties .profile-choice-trigger{box-sizing:border-box;flex:none;width:90px;min-width:0;max-width:none;height:32px;min-height:32px;padding:3px 6px;font-size:14px;margin:0}
#profile-panel #profile-format-toolbar #profile-label-properties .label-wording input,#profile-panel #profile-format-toolbar #profile-label-properties .event-title-field input{width:150px;min-width:150px}
#profile-panel #profile-format-toolbar #profile-label-properties .field input[type=color]{width:32px;min-width:32px;height:32px;min-height:32px;flex:none;padding:2px}
#profile-panel #profile-format-toolbar #profile-label-properties .label-slider input[type=range]{display:none}
#profile-panel #profile-format-toolbar #profile-label-properties .label-slider input[type=number]{width:58px}
#profile-panel #profile-format-toolbar #profile-label-properties .range-row{display:flex;align-items:center;gap:0;margin:0;width:auto;min-width:0}
#profile-panel #profile-format-toolbar #profile-label-properties .event-minute-spinner{display:flex;align-items:stretch;flex:0 0 100px;width:100px;min-width:100px;max-width:100px;height:32px;gap:0}
#profile-panel #profile-format-toolbar #profile-label-properties .event-minute-spinner>input{display:block;flex:0 0 76px;width:76px;min-width:76px;max-width:76px;height:32px;min-height:32px;margin:0;padding:3px 5px;box-sizing:border-box}
#profile-panel #profile-format-toolbar #profile-label-properties .event-minute-spinner>span{display:flex;flex-direction:column;flex:0 0 24px;width:24px;min-width:24px;height:32px}
#profile-panel #profile-format-toolbar #profile-label-properties .event-minute-spinner button{display:grid;place-items:center;flex:1;width:24px;min-width:24px;height:16px;min-height:16px;padding:0;line-height:1;font-size:12px}
#profile-panel #profile-format-toolbar #profile-label-properties .event-toggle-control{display:flex;align-items:center;justify-content:center;width:auto;height:32px;flex:none}
#profile-panel #profile-format-toolbar #profile-label-properties .label-stepper{display:grid;grid-template-columns:58px 24px;grid-template-rows:16px 16px;gap:0;width:82px;min-width:82px}
#profile-panel #profile-format-toolbar #profile-label-properties .label-stepper input{grid-row:1/3;grid-column:1;width:58px}
#profile-panel #profile-format-toolbar #profile-label-properties .label-stepper button{grid-column:2;width:24px;min-width:24px;height:16px;min-height:16px;padding:0;line-height:1}
#profile-panel #profile-format-toolbar #profile-label-properties .label-stepper button[data-direction='1']{grid-row:1}
#profile-panel #profile-format-toolbar #profile-label-properties .label-stepper button[data-direction='-1']{grid-row:2}
#profile-panel #profile-format-toolbar #profile-label-properties .sc-surface{flex:none;min-width:90px;max-width:150px;margin:0}
#profile-panel #profile-format-toolbar #profile-label-properties .profile-choice-trigger{width:auto;min-width:90px;max-width:160px}
#profile-panel #profile-format-toolbar #profile-label-properties .event-reposition-toggle{justify-content:flex-start;gap:5px}
#profile-panel #profile-format-toolbar #profile-label-properties .event-reposition-toggle input[role=switch]{width:32px;min-width:32px;height:20px;min-height:20px}
.profile-scale-tools [data-profile-zoom-output]{display:inline-block;flex:0 0 48px;width:48px;min-width:48px;text-align:center;font-variant-numeric:tabular-nums}
@media(any-pointer:coarse),(max-width:640px){
 #profile-panel #profile-format-toolbar{height:64px;min-height:64px;max-height:64px}
 #profile-panel #profile-format-toolbar #profile-label-properties .label-format-tabs button,#profile-panel #profile-format-toolbar #profile-label-properties>[data-label-close]{width:36px;min-width:36px;height:44px;min-height:44px}
 #profile-panel #profile-format-toolbar #profile-label-properties .field input:not([type=checkbox]):not([type=radio]):not([type=range]),#profile-panel #profile-format-toolbar #profile-label-properties .profile-choice-trigger{height:44px;min-height:44px;font-size:16px}
 #profile-panel #profile-format-toolbar #profile-label-properties .event-minute-spinner,#profile-panel #profile-format-toolbar #profile-label-properties .event-minute-spinner>span,#profile-panel #profile-format-toolbar #profile-label-properties .event-toggle-control{height:44px}
 #profile-panel #profile-format-toolbar #profile-label-properties .event-minute-spinner button{height:22px;min-height:22px}
 #profile-panel #profile-format-toolbar #profile-label-properties .label-stepper{grid-template-rows:22px 22px}
 #profile-panel #profile-format-toolbar #profile-label-properties .label-stepper button{height:22px;min-height:22px}
 #profile-panel #profile-format-toolbar #profile-label-properties .event-reposition-toggle input[role=switch]{height:20px;min-height:20px}
}
.profile-scale-tools{display:flex;align-items:center;flex:none;white-space:nowrap;font-size:14px}
.profile-scale-tools label{display:flex;align-items:center;gap:6px}
.profile-scale-tools input[type=range]{padding:0;min-height:28px;accent-color:var(--accent,#1d5fbf)}
#profile-panel #profile-format-toolbar #profile-label-properties .event-minute-spinner>input{width:76px!important;min-width:76px!important;max-width:76px!important}
#profile-panel #profile-format-toolbar #profile-label-properties .label-wording input,#profile-panel #profile-format-toolbar #profile-label-properties .event-title-field input{width:150px!important;min-width:150px!important}
#profile-panel #profile-format-toolbar #profile-label-properties .label-slider input[type=number],#profile-panel #profile-format-toolbar #profile-label-properties .label-stepper input{width:58px!important;min-width:58px!important}

#profile-panel .profile-location-change{pointer-events:none}
@media(any-pointer:coarse),(max-width:640px){
 #profile-panel #profile-format-toolbar #profile-label-properties .field input:not([type=checkbox]):not([type=radio]):not([type=range]){height:44px!important;min-height:44px!important;font-size:16px}
}

#profile-panel .profile-chart-scroll.profile-panning,#profile-panel .profile-chart-scroll.profile-panning svg{cursor:grabbing}
#profile-panel .profile-chart-scroll{margin-right:0}
.profile-scale-tools [data-profile-zoom-output]{font-size:14px}
