/* Just Health 1.13 · shared visual system. Loaded after legacy layout rules.
   All themes, pages and data states share these tokens and components. */
:root,html[data-theme="pink"]{
 --bg:#0c1218;--panel:#151d25;--panel2:#10171e;--surface:#1c2631;
 --text:#f3f5f8;--muted:#a9b4c3;--line:#2b3743;
 --accent:#ff91b5;--accent2:#ffb0ca;--accentText:#1c1117;--chart-line:var(--accent);
 --jh-radius-sm:10px;--jh-radius-md:14px;--jh-radius-lg:20px;
 --jh-control-h:42px;--jh-button-h:40px;--jh-button-h-small:34px;
 --jh-card-pad:18px;--jh-section-gap:16px;--ui-block-gap:16px;--ui-inner-gap:12px;
 --jh-font-value:1.65rem;--jh-font-label:.85rem;--jh-font-meta:.8rem;
 --jh-danger:#bd405b;--jh-danger-border:#df647d;
 --ui-shadow:0 10px 34px #00000020;--ui-positive:#69df9e;--ui-negative:#ff718c;
 --ui-font:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 color-scheme:dark;
}
html[data-theme="graphite"]{--accent:#c4ccd8;--accent2:#e0e5ed;--chart-line:var(--accent)}
html[data-theme="glacier"]{--accent:#8cdbef;--accent2:#b8edfa;--chart-line:var(--accent)}
html[data-theme="nature"]{--accent:#a5d5ad;--accent2:#c4e8ca;--chart-line:var(--accent)}
html[data-theme="light"]{
 --bg:#edf1f5;--panel:#fff;--panel2:#f6f8fb;--surface:#e9eef4;
 --text:#202b37;--muted:#586575;--line:#d6dfe8;
 --accent:#ad3d67;--accent2:#c5507b;--accentText:#fff;--chart-line:var(--accent);
 --ui-shadow:0 8px 26px #1c30420a;--ui-positive:#187747;--ui-negative:#b52e4e;
 color-scheme:light;
}
html{scroll-padding-top:100px}
body{
 font-family:var(--ui-font);font-size:14px;line-height:1.5;
 background:radial-gradient(ellipse at 50% 0%,color-mix(in srgb,var(--panel) 75%,transparent),transparent 65%),var(--bg);
 color:var(--text);margin:0;
}
body main{width:calc(100% - 48px);max-width:1600px;margin:0 auto;padding:0 0 24px!important;min-width:0}
button,input,select,textarea{font-family:inherit;box-sizing:border-box}
button,a.button-link{transition:background .16s,border-color .16s,color .16s,box-shadow .16s}
button:disabled{opacity:.38;cursor:not-allowed}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
 outline:2px solid var(--accent);outline-offset:3px;box-shadow:none!important;
}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ui-icon{width:22px;height:22px;display:inline-block;flex:0 0 auto;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ui-icon-heart{fill:currentColor;stroke-width:1.2}
/* Header: one navigation, one theme selector, one account control. */
body main > .app-header{
 display:flex;align-items:center;gap:24px;flex-wrap:nowrap;min-height:76px;
 padding:12px 4px;border-bottom:1px solid var(--line);background:var(--bg);
 position:relative;z-index:30;
}
.app-header .logo-btn{
 display:inline-flex;align-items:center;gap:11px;background:transparent!important;
 border:0!important;padding:0!important;color:var(--text)!important;
 min-width:0;flex:0 0 auto;font-style:normal;font-size:25px!important;font-weight:750;letter-spacing:-.6px;
 height:auto!important;min-height:44px!important;
}
.brand-heart{display:flex;color:var(--accent)}
.brand-heart .ui-icon{width:34px;height:34px}
.brand-name strong{color:var(--accent);font-weight:750}
.app-header .header-logo-img{max-width:190px!important;max-height:48px!important;width:auto!important;height:auto!important}
.app-header .topnav{
 flex:1;display:flex;align-items:center;justify-content:center;gap:12px;
 margin:0!important;padding:0;background:transparent;border:0;border-radius:0;
 flex-wrap:nowrap;min-width:0;overflow:visible;
}
.app-header .topnav .nav-item{
 display:inline-flex;align-items:center;gap:9px;height:48px!important;min-height:48px!important;
 padding:0 9px!important;border-radius:0!important;position:relative;font-size:14px!important;
 font-weight:600!important;color:var(--muted)!important;line-height:1.2;background:transparent!important;
 border:0!important;
}
.app-header .topnav .nav-item:hover{color:var(--text)!important;background:transparent!important}
.app-header .topnav .nav-item.active{color:var(--accent)!important;background:transparent!important}
.app-header .topnav .nav-item.active:after{content:"";position:absolute;bottom:0;left:4px;right:4px;height:3px;border-radius:3px;background:var(--accent)}
.app-header .header-actions{margin-left:auto;display:flex;flex-direction:row;align-items:center;gap:10px;flex:0 0 auto;width:auto}
.app-header .theme-chip{padding:0;background:transparent;border:0;margin:0;display:block}
.app-header .theme-chip select{height:38px;min-height:38px;font-size:12px!important;width:105px;background:var(--panel);padding:0 10px;border-radius:12px}
.app-menu{position:relative}
.app-menu summary{
 list-style:none;display:flex;align-items:center;justify-content:center;gap:7px;
 height:38px;padding:0 10px;border:1px solid var(--line);border-radius:12px;
 color:var(--muted);background:var(--panel);cursor:pointer;font-size:12px;font-weight:600;
}
.app-menu summary::-webkit-details-marker{display:none}
.app-menu[open] summary{border-color:var(--accent);color:var(--accent)}
.app-menu summary .ui-icon{width:18px;height:18px}
.app-menu .app-menu-panel{
 position:absolute;top:calc(100% + 12px);right:0;width:260px;max-height:70vh;overflow-y:auto;
 padding:10px;display:flex;flex-direction:column;gap:3px;background:var(--panel);
 border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 50px #0006;z-index:40;
}
.app-menu-panel > small,.app-menu-panel > b{padding:10px 12px 6px;color:var(--muted);font-size:12px}
.app-menu-panel > small:not(:first-child){border-top:1px solid var(--line);margin-top:6px}
.app-menu-panel button.nav-item{
 width:100%;display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:10px 12px!important;
 background:transparent!important;color:var(--text)!important;border:0!important;border-radius:10px!important;
 font-size:14px!important;min-height:42px;height:auto;font-weight:550;
}
.app-menu-panel button.nav-item:hover,.app-menu-panel button.nav-item.active{background:var(--surface)!important;color:var(--accent)!important}
.user-menu summary{border:0;background:transparent;padding:0;height:40px}
.user-avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;font-size:12px;color:var(--text);background:color-mix(in srgb,var(--accent) 24%,var(--panel));border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line))}
.app-context{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 4px 4px;min-height:32px}
.app-context .brand-subtitle{font-size:11px;color:var(--muted);font-weight:500;margin:0;letter-spacing:.04em;white-space:normal}
.app-context .current-date{font-size:11px;opacity:1;margin:0;line-height:1.5;color:var(--muted);text-align:right}
/* Page and panel hierarchy. */
body main > section > .card{
 padding:24px!important;margin-top:12px;background:linear-gradient(135deg,color-mix(in srgb,var(--surface) 45%,var(--panel)),var(--panel));
 border:1px solid var(--line);border-radius:20px;box-shadow:var(--ui-shadow);
 max-width:none;width:100%;min-width:0;
}
body main section h2{font-size:23px!important;line-height:1.25;font-weight:700;letter-spacing:-.4px;margin:0 0 5px}
body main section h3{font-size:18px!important;line-height:1.3;letter-spacing:-.2px;margin:0 0 3px}
body main section h2 .ui-icon,body main section h3 .ui-icon{color:var(--accent);width:27px;height:27px;margin-right:12px}
body main section small{font-size:12px;line-height:1.5;color:var(--muted)}
body main section .section-head{align-items:center;gap:14px;min-width:0;margin-bottom:12px}
body main section .section-head > div:first-child{min-width:0}
body main section .compare-block,body main section .profile-section-card{
 padding:18px!important;border:1px solid var(--line)!important;border-radius:16px!important;
 background:var(--panel2)!important;margin-top:16px!important;min-width:0;box-shadow:none;
}
body main section .health-stat,body main section .body-metric-card,
body main section .period-grid > div,body main section .detail-grid > div,
body main section .stats > div,body main section .insights > div{
 border:1px solid var(--line);background:var(--panel2);border-radius:14px;
 padding:18px!important;min-width:0;box-shadow:none;
}
body main section .health-stat b,body main section .body-metric-card b{font-size:27px!important;font-weight:700;letter-spacing:-.6px;color:var(--text)!important;line-height:1.2;overflow-wrap:anywhere}
body main section .health-stat small,body main section .body-metric-card small{font-size:13px!important;font-weight:600;color:var(--text);margin-bottom:8px}
body main section .health-stat span,body main section .body-metric-card span{font-size:12px!important;color:var(--muted)}
body main section .period-grid b,body main section .detail-grid b,body main section .stats b{font-size:22px;color:var(--text)!important;letter-spacing:-.4px}
body main section .period-grid,body main section .detail-grid,body main section .health-summary-grid,
body main section .dashboard-summary,body main section .body-overview-grid{gap:12px}
body main section .info-box{background:color-mix(in srgb,var(--accent) 4%,var(--panel2));border:1px solid var(--line);border-radius:12px;box-shadow:none;padding:14px 16px;color:var(--muted)}
body main section .info-box b{font-size:13px;color:var(--text)}
body main section .info-box span{font-size:12px;line-height:1.6}
body main section .empty,body main section .chart-empty{border:1px dashed var(--line);border-radius:12px;background:transparent;color:var(--muted);padding:24px 16px;text-align:center;line-height:1.6;grid-column:1/-1}
body main section .data-status{font-size:11px!important;color:var(--muted);background:transparent;border:0;padding:0;line-height:1.6}
.metric-heading-icon{display:flex;align-items:center;gap:8px}
.metric-heading-icon .ui-icon{width:19px;height:19px;color:var(--accent)}
/* Controls use content-sized desktop actions and larger touch targets. */
body main section button:not(.nav-item):not(.metric):not(.close),body main section a.button-link{
 border-radius:10px!important;min-height:40px!important;height:auto!important;padding:9px 14px!important;
 font-size:13px!important;line-height:1.3!important;font-weight:600!important;white-space:normal;
 background:var(--accent);color:var(--accentText);border-color:var(--accent);box-shadow:none!important;
 transform:none!important;max-width:100%;
}
body main section button.small,body main section a.button-link.small,body main section .row-actions button{
 min-height:34px!important;padding:7px 11px!important;font-size:12px!important;
}
body main section button.secondary,body main section a.button-link.secondary,body main section .row-actions .small:not(.danger){background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
body main section button:hover:not(:disabled),body main section a.button-link:hover{filter:brightness(1.08);transform:none!important}
body main section button.danger,body main section .row-actions button.danger,body main section .maintenance-danger-zone button{background:transparent!important;color:var(--ui-negative)!important;border-color:color-mix(in srgb,var(--ui-negative) 45%,var(--line))!important}
body main section button.danger:hover{background:color-mix(in srgb,var(--ui-negative) 12%,var(--panel))!important}
body main section input:not([type="checkbox"]):not([type="radio"]),body main section select,body main section textarea{
 border:1px solid var(--line);border-radius:10px;min-height:42px;background:var(--panel2);color:var(--text);font-size:14px!important;padding:10px 12px;max-width:100%;
}
body main section input[type="checkbox"],body main section input[type="radio"]{accent-color:var(--accent);min-height:0}
body main section input[type="file"]::file-selector-button{border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--text);padding:7px 12px;margin-right:12px;font-family:inherit;cursor:pointer}
body main section .chart-controls{gap:4px;background:var(--panel2);border:1px solid var(--line);padding:4px;border-radius:11px}
body main section .chart-controls .metric{background:transparent;color:var(--muted);border:0;font-size:12px!important;padding:7px 10px;min-height:32px;border-radius:7px;line-height:1.2;box-shadow:none}
body main section .chart-controls .metric.active{background:color-mix(in srgb,var(--accent) 15%,var(--panel));color:var(--accent)}
body main section .filters{gap:10px}
body main section .svg-chart .trendline,body main section .svg-chart circle{stroke:var(--chart-line)}
body main section .svg-chart circle{fill:var(--chart-line)}
body main section .table{border:1px solid var(--line);border-radius:12px;background:var(--panel2);margin-top:14px}
body main section table th{background:var(--surface);font-size:10px!important;font-weight:650;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);padding:12px}
body main section table td{font-size:12px!important;padding:13px 12px;border-color:var(--line)}
body main section table tbody tr:last-child td{border-bottom:0}
body main section table tbody tr:hover{background:color-mix(in srgb,var(--accent) 4%,var(--panel2))}
body main section .sport-badge{background:color-mix(in srgb,var(--accent) 12%,var(--panel));color:var(--accent);border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));border-radius:7px;font-size:11px;padding:3px 8px}
body main section .pager{flex-wrap:wrap;gap:6px;margin-top:14px}
body main section .pager button.active{background:var(--accent)!important;color:var(--accentText)!important}
/* Import, export, profile and settings use the same panel system. */
body main #settings .settings-card{padding:0!important;overflow:hidden}
body main #settings .settings-hero{background:transparent;padding:24px;border-bottom:1px solid var(--line)}
body main #settings .settings-grid{padding:20px 24px;gap:16px}
body main #settings .settings-group{background:var(--panel2);border:1px solid var(--line);padding:20px;border-radius:14px}
body main #settings .settings-section-title{background:transparent;padding:8px 0 0;border:0}
body main #settings .settings-version{background:var(--panel2);color:var(--muted);border:1px solid var(--line)}
body main #settings .settings-savebar{padding:16px 24px;background:var(--panel);border-top:1px solid var(--line);margin-top:0!important;box-shadow:none}
body main section .export-box,body main section .maintenance-card,body main section .route-card{padding:20px;background:var(--panel2);border:1px solid var(--line);border-radius:14px;min-width:0}
body main #export .export-grid{gap:16px;margin-top:16px}
body main #export .export-box{margin-top:0!important;display:flex;flex-direction:column;align-items:stretch}
body main #export .button-link{margin-top:16px!important;align-self:flex-start!important;position:static!important;transform:none!important;flex:0 0 auto}
body main #export .button-link:hover,body main #export .button-link:focus{margin-top:16px!important;transform:none!important}
body main #export .raw-link{font-size:12px;padding:0;background:transparent;border:0;color:var(--muted)}
body main .bottomnav-wrap{width:100%;max-width:none!important;margin:18px 0 0!important;padding:0!important}
body main .bottomnav{width:100%;margin:0!important;display:flex;justify-content:flex-start!important;gap:6px;padding:7px!important;background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:none;flex-wrap:wrap;overflow:visible}
body main .bottomnav .nav-item{display:inline-flex;align-items:center;gap:7px;padding:8px 12px!important;min-height:36px!important;height:auto;font-size:12px!important;font-weight:550!important;border-radius:9px!important;background:transparent!important;color:var(--muted)!important}
body main .bottomnav .nav-item .ui-icon{width:16px;height:16px}
body main .bottomnav .nav-item.active,body main .bottomnav .nav-item:hover{background:var(--surface)!important;color:var(--accent)!important}
body main .app-footer{max-width:none!important;width:100%;font-size:10px!important;padding:14px 4px 0;margin:0;opacity:.85;line-height:1.6}
body .modal-card{background:var(--panel);border:1px solid var(--line);border-radius:20px;box-shadow:0 30px 90px #0008}
/* Insights: the reference's five-column overview and independent sections. */
body main #insights > .insights-page{padding:0!important;background:transparent;border:0;box-shadow:none}
.insights-overview-panel,body main #insights .compare-block{
 padding:18px!important;border:1px solid var(--line)!important;border-radius:20px!important;
 background:linear-gradient(135deg,color-mix(in srgb,var(--surface) 40%,var(--panel)),var(--panel))!important;
 box-shadow:var(--ui-shadow);margin-top:12px!important;
}
.insights-overview-panel{margin-top:0!important}
.insights-head{margin-bottom:16px!important}
.insight-period-controls{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:13px;background:var(--panel2);padding:4px}
.insight-period-controls #insightPeriod{min-width:155px;text-align:center;font-size:12px;color:var(--muted)}
body main #insights .insight-period-controls button{background:transparent!important;color:var(--muted)!important;border:0!important;padding:3px 8px!important;min-width:30px;min-height:30px!important;font-size:20px!important}
body main #insights .insight-overview-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:0}
body main #insights .insight-card{
 padding:16px!important;gap:6px;border:1px solid var(--line);border-radius:14px;background:var(--panel2);
 display:flex;flex-direction:column;min-width:0;
}
.insight-card-heading{display:flex;align-items:center;gap:10px;margin-bottom:4px;min-width:0}
.insight-card-heading .ui-icon{color:var(--accent);width:23px;height:23px}
body main #insights .insight-card-heading small{font-size:13px;font-weight:600;color:var(--text);margin:0}
body main #insights .insight-card > b{font-size:27px!important;font-weight:700;letter-spacing:-.7px;line-height:1.18;color:var(--text);overflow-wrap:anywhere}
body main #insights .insight-card > b .metric-unit{font-size:18px;font-weight:600;letter-spacing:-.2px}
body main #insights .insight-card em{font-style:normal;font-size:11px;color:var(--muted)}
body main #insights .insight-delta{font-size:16px;font-weight:650;line-height:1.3}
body main #insights .delta-positive{color:var(--ui-positive)}
body main #insights .delta-negative{color:var(--ui-negative)}
body main #insights .delta-neutral{color:var(--muted)}
.insight-spark{display:block;width:100%;height:86px;margin-top:auto;overflow:visible}
.insight-spark .spark-grid{stroke:var(--line);stroke-width:.6}
.insight-spark .spark-line{fill:none;stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.insight-spark .spark-dot{fill:var(--accent);stroke:var(--panel2);stroke-width:1.5}
.insight-spark text{font-size:8px;fill:var(--muted)}
.insight-coverage{display:flex;align-items:center;gap:9px;font-size:10px;color:var(--muted);margin-top:4px;white-space:nowrap}
.insight-coverage progress{appearance:none;width:44%;height:8px;border:0;border-radius:9px;background:var(--surface);overflow:hidden}
.insight-coverage progress::-webkit-progress-bar{background:var(--surface)}
.insight-coverage progress::-webkit-progress-value{background:var(--accent);border-radius:9px}
.insight-coverage progress::-moz-progress-bar{background:var(--accent);border-radius:9px}
body main #insights .insight-training-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.training-insight-card{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(100px,42%);gap:8px!important;align-items:center}
.training-insight-card .insight-card-heading{grid-column:1/-1;margin:0}
.training-insight-value b{font-size:25px;display:block;letter-spacing:-.5px;line-height:1.2;margin-bottom:6px;overflow-wrap:anywhere}
.training-insight-value em{display:block;margin-top:4px}
.insight-bars{width:100%;height:85px;overflow:visible}
.insight-bars text{fill:var(--muted);font-size:8px}
.insight-bars .bar-current{fill:var(--accent)}
.insight-bars .bar-previous{fill:color-mix(in srgb,var(--muted) 35%,var(--surface))}
body main #insights .insight-route-grid{grid-template-columns:1fr;gap:12px}
body main #insights .insight-route-card{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,3fr);gap:18px;padding:16px;background:var(--panel2);border:1px solid var(--line);border-radius:14px}
.insight-route-head{align-items:center;justify-content:flex-start;gap:12px}
.insight-route-head > .ui-icon{width:42px;height:42px;color:var(--accent);padding:8px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.insight-route-head button{display:flex;align-items:center;gap:6px}
body main #insights .insight-route-values{margin:0;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}
body main #insights .insight-route-values > div{padding:0;border:0;background:transparent;min-width:0}
body main #insights .insight-route-values b{font-size:19px;line-height:1.3;overflow-wrap:anywhere;letter-spacing:-.3px}
body main #insights .insight-route-values span{font-size:11px}
.route-comparison-track{height:8px;background:var(--surface);border-radius:8px;margin:8px 0;position:relative;overflow:hidden}
.route-comparison-track i{position:absolute;inset:0 auto 0 0;background:var(--accent);border-radius:8px}
.route-comparison-track em{position:absolute;top:0;width:8px;height:8px;border-radius:50%;background:var(--muted)}
body main #insights .insight-route-card > p{grid-column:1/-1;margin:0;font-size:10px;color:var(--muted)}
body main #insights .insight-relation-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body main #insights .insight-relation-card{display:grid;grid-template-columns:minmax(0,1fr) 140px;align-items:center;gap:14px;padding:16px;background:var(--panel2);border:1px solid var(--line);border-radius:14px}
body main #insights .insight-relation-card b{font-size:13px}
body main #insights .insight-relation-card p,body main #insights .insight-relation-card small{font-size:11px;line-height:1.6}
.insight-scatter{width:140px;height:90px;border-left:1px solid var(--line);padding-left:10px}
.insight-scatter circle{fill:var(--accent);opacity:.8}
.insight-scatter path{stroke:var(--accent);stroke-width:1.5;fill:none}
.insight-scatter text{fill:var(--muted);font-size:8px}
.insights-footnote{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 4px 0;color:var(--muted);font-size:10px}
body main #insightMeta{margin:0!important;font-size:10px!important}
/* Login */
body.login-body{min-height:100dvh;display:grid;place-items:center}
body.login-body .login-shell{max-width:430px;width:calc(100% - 32px);margin:30px auto;padding:0!important}
body .login-card{padding:32px;background:var(--panel);border:1px solid var(--line);border-radius:22px;box-shadow:var(--ui-shadow)}
.login-brand{font-size:26px!important;letter-spacing:-.5px;color:var(--text)!important;font-style:normal!important;display:flex;align-items:center;gap:7px;margin-bottom:28px}
.login-brand strong,.login-heart{color:var(--accent)}
.login-heart{font-size:35px;margin-right:6px}
.login-card h1{font-size:24px;letter-spacing:-.3px}
.login-card form{display:grid;gap:16px;margin-top:22px}
.login-card form label{display:grid;gap:7px;font-size:13px;color:var(--muted)}
.login-card input{height:44px;width:100%;font-size:16px;background:var(--panel2);border-color:var(--line)}
.login-card button{background:var(--accent);color:var(--accentText);height:44px;border-color:var(--accent)}
/* Responsive layout: cards keep readable widths; no horizontal page overflow. */
@media(min-width:1450px){body main{width:calc(100% - 64px)}.app-header .topnav{gap:24px}}
@media(max-width:1200px){
 body main > .app-header{gap:16px}.app-header .topnav{gap:4px}.app-header .topnav .nav-item{font-size:13px!important;padding:0 7px!important;gap:6px}
 .app-header .logo-btn{font-size:22px!important}.brand-heart .ui-icon{width:29px;height:29px}.more-label{display:none}
 .app-header .theme-chip select{width:92px}.app-header .header-actions{gap:8px}
 body main #insights .insight-overview-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 body main #insights .insight-card > b{font-size:26px!important}
}
@media(max-width:950px){
 body main > .app-header{display:grid;grid-template-columns:1fr auto;gap:6px 16px;padding:12px 0 0}
 .app-header .topnav{grid-column:1/-1;grid-row:2;justify-content:flex-start;gap:14px;overflow-x:auto;scrollbar-width:none}
 .app-header .topnav::-webkit-scrollbar{display:none}.app-header .topnav .nav-item{flex:0 0 auto;min-height:46px!important}
 .app-header .header-actions{grid-column:2;grid-row:1}
 body main #insights .insight-training-grid{grid-template-columns:1fr}
 body main #insights .insight-relation-grid{grid-template-columns:1fr}
 body main #insights .insight-route-card{grid-template-columns:1fr}
 body main #insights .insight-route-values{grid-template-columns:repeat(3,minmax(0,1fr))}
 .training-insight-card{grid-template-columns:minmax(0,1fr) minmax(120px,35%)}
 .training-insight-card .insight-card-heading{grid-column:1}
 .training-insight-card .insight-bars{grid-column:2;grid-row:1/3}
}
@media(max-width:700px){
 body main{width:calc(100% - 24px)!important;padding:0 0 16px!important;max-width:100%;margin:0 auto}
 body main > .app-header{padding-top:10px}.app-header .logo-btn{font-size:21px!important;gap:8px}.brand-heart .ui-icon{width:27px;height:27px}
 .app-header .theme-chip select{width:85px;padding:0 6px;font-size:11px!important;height:36px;min-height:36px}
 .app-menu summary{height:36px;padding:0 8px}.user-avatar{width:34px;height:34px;font-size:11px}
 .app-header .header-actions{gap:6px}.app-header .topnav{gap:14px}.app-header .topnav .nav-item{font-size:13px!important;padding:0 2px!important;gap:6px}
 .app-header .topnav .ui-icon{width:18px;height:18px}.app-context{padding:9px 1px 0}.app-context .brand-subtitle,.app-context .current-date{font-size:9px}
 .app-menu .app-menu-panel{position:fixed;top:62px;right:12px;max-width:calc(100vw - 24px);width:280px}
 body main > section > .card{padding:16px!important;border-radius:16px;margin-top:12px}
 body main section .compare-block,body main section .profile-section-card{padding:14px!important;margin-top:14px!important;border-radius:13px!important}
 body main section h2{font-size:21px!important}body main section h3{font-size:17px!important}
 body main section .section-head{flex-wrap:wrap;gap:12px;align-items:flex-start}
 body main section .section-head > div:first-child{flex:1 1 180px}
 body main section .health-stat,body main section .body-metric-card{padding:14px!important}
 body main section .health-stat b,body main section .body-metric-card b{font-size:24px!important}
 body main section .health-summary-grid,body main section .body-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body main section .health-stat small{font-size:12px!important}
 body main section button:not(.nav-item):not(.metric):not(.close),body main section a.button-link,body main section button.small,body main section .row-actions button{min-height:44px!important;font-size:13px!important}
 body main section input:not([type="checkbox"]):not([type="radio"]),body main section select,body main section textarea{min-height:44px;font-size:16px!important}
 body main section .chart-controls{width:100%;overflow-x:auto;flex-wrap:nowrap;gap:3px}
 body main section .chart-controls .metric{white-space:nowrap;flex:0 0 auto;min-height:38px;font-size:12px!important;padding:6px 8px}
 body main section .mobile-card-table{min-width:0!important}
 body main section .mobile-card-table tbody tr{border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--panel2);margin:10px;overflow:hidden}
 body main section .mobile-card-table td{font-size:12px!important;padding:6px!important}
 body main section .mobile-card-table td[data-label="Aktionen"]{border-top:1px solid var(--line);padding-top:10px!important;margin-top:6px}
 body main section .row-actions{flex-wrap:wrap;gap:6px}
 body main #settings .settings-grid{padding:16px;grid-template-columns:1fr}
 body main #settings .settings-group{padding:16px}.settings-group-half,.settings-group-wide{grid-column:1/-1!important}
 body main #settings .settings-hero{padding:16px;gap:10px;flex-wrap:wrap}
 body main #settings .settings-savebar{padding:16px}
 body main #export .button-link{align-self:stretch!important;width:100%;text-align:center}
 body main .bottomnav{flex-wrap:wrap;overflow:visible;gap:2px;padding:5px!important}
 body main .bottomnav .nav-item{padding:7px 9px!important;min-height:40px!important;font-size:11px!important}
 body main #insights .insight-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body main #insights .insight-card{padding:13px!important}
 body main #insights .insight-card > b{font-size:25px!important}
 body main #insights .insight-card > b .metric-unit{font-size:14px}
 body main #insights .insight-card-heading{gap:7px}
 body main #insights .insight-card-heading small{font-size:12px}
 body main #insights .insight-delta{font-size:14px}
 .insights-overview-panel,body main #insights .compare-block{padding:14px!important;border-radius:16px!important}
 .insight-period-controls{width:100%;justify-content:center}
 body main #insights .insight-period-controls button{min-height:36px!important;font-size:22px!important}
 .insight-coverage{font-size:9px;gap:5px}.insight-spark{height:82px}
 body main #insights .insight-route-values{grid-template-columns:1fr;gap:16px}
 body main #insights .insight-route-values > div{border-top:1px solid var(--line);padding-top:12px}
 body main #insights .insight-relation-card{grid-template-columns:minmax(0,1fr) 90px;gap:10px}
 .insight-scatter{width:90px;height:100px}
 .insights-footnote{font-size:10px;padding:10px 2px 0}
}
@media(max-width:380px){
 .app-header .logo-btn{font-size:18px!important}.brand-heart .ui-icon{width:23px;height:23px}
 .app-header .header-actions{gap:4px}.app-header .theme-chip select{width:76px;font-size:10px!important}
 body main #insights .insight-overview-grid{grid-template-columns:1fr}
 body main section .health-summary-grid,body main section .body-overview-grid{grid-template-columns:1fr!important}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
body main #insights button.insight-open{margin-left:auto;background:transparent!important;color:var(--muted)!important;border:0!important;min-height:28px!important;padding:0 6px!important;font-size:20px!important}
body main #insights button.route-open{background:transparent!important;border:0!important;padding:0!important;color:var(--text)!important;font-size:16px!important;min-height:36px!important;text-align:left}
.spark-empty{margin-top:auto;min-height:86px;display:grid;place-items:center;font-size:11px;color:var(--muted);text-align:center;border:1px dashed var(--line);border-radius:9px;padding:8px}
/* Explicit resets for layout inherited from the old navigation system. */
body main .bottomnav-wrap{position:static!important;bottom:auto!important;filter:none;z-index:auto;width:100%!important}
body main .bottomnav{flex-wrap:wrap!important;overflow:visible!important;white-space:normal!important;border:1px solid var(--line)!important;border-radius:14px!important;box-shadow:none!important;backdrop-filter:none}
body main > .app-header .header-actions{flex-wrap:nowrap!important;width:auto!important}
body main > .app-header .theme-chip{width:auto!important;flex:0 0 auto;min-width:0}
body main > .app-header .topnav{box-shadow:none}
body main > .app-header .topnav .nav-item{box-shadow:none!important}
body main section .section-head{flex-direction:row!important}
@media(max-width:700px){
 body main #insights .insight-overview-grid > .insight-card:last-child:nth-child(odd){grid-column:1/-1}
 body main section .section-head > div:first-child{flex:1 1 auto}
 body main .bottomnav .nav-item{height:auto!important}
}
/* Semantic actions supersede historical page-specific pink button overrides. */
body main :is(#dash,#analysis,#routes,#settings,#healthdata,#sleepdata,#body,#heart,#cardio,#import,#export,#profile,#updates,#log,#info) button.danger,
body main :is(#dash,#analysis,#routes,#settings) .row-actions button.danger,
body main #settings .maintenance-danger-zone button{
 background:transparent!important;color:var(--ui-negative)!important;border:1px solid color-mix(in srgb,var(--ui-negative) 45%,var(--line))!important;
}
body main :is(#dash,#analysis,#routes,#settings) .row-actions button.small:not(.danger),
body main :is(#dash,#analysis,#routes,#settings) .row-actions a.button-link{
 background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--line)!important;
}
html body main > .app-header .logo-btn,html body main > .app-header .logo-btn .brand-name{color:var(--text)!important}
html body main > .app-header .logo-btn .brand-name strong{color:var(--accent)!important}
html body main > .app-header .theme-chip select{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important}
html body main > .app-header .topnav .nav-item{color:var(--muted)!important;background:transparent!important}
html body main > .app-header .topnav .nav-item.active{color:var(--accent)!important;background:transparent!important}
html body main .bottomnav .nav-item{color:var(--muted)!important}
html body main .bottomnav .nav-item.active{color:var(--accent)!important}
@media(max-width:700px){
 body main > .app-header .topnav{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:2px;width:100%;overflow:visible}
 body main > .app-header .topnav .nav-item{flex-direction:column;justify-content:center;gap:4px!important;padding:7px 0!important;min-height:56px!important;height:56px!important;font-size:11px!important;white-space:normal;text-align:center;letter-spacing:-.15px}
 body main > .app-header .topnav .nav-item:after{left:7px;right:7px}
 body main #insights .insight-card > b{font-size:23px!important}
}
@media(max-width:380px){body main > .app-header .topnav .nav-item{font-size:10px!important}}
/* Eight directly visible destinations, with a stable two-row phone layout. */
@media(min-width:1351px){body main > .app-header{gap:14px}.app-header .topnav{gap:3px}.app-header .topnav .nav-item{gap:5px;padding:0 6px!important;font-size:13px!important}}
@media(max-width:1350px){body main > .app-header{display:grid;grid-template-columns:1fr auto;gap:6px 16px;padding:12px 0 0}.app-header .header-actions{grid-column:2;grid-row:1}.app-header .topnav{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-auto-flow:row;gap:2px;width:100%;overflow:visible}.app-header .topnav .nav-item{justify-content:center;padding:0 2px!important;font-size:12px!important;gap:5px}}
@media(max-width:700px){body main > .app-header .topnav{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-flow:row;grid-auto-columns:auto}.app-header .topnav .nav-item{font-size:11px!important}}
.metric-interactive{position:relative;cursor:pointer;transition:border-color .15s,background .15s;padding-right:38px!important}
.metric-interactive:hover,.metric-interactive:focus-within{border-color:var(--accent)!important;background:var(--panel2)!important}
.metric-selected{box-shadow:inset 3px 0 var(--accent)}
html body main .metric-open{position:absolute;top:9px;right:9px;display:grid;place-items:center;width:28px;height:28px;min-height:28px;padding:0;border:1px solid var(--line);border-radius:8px;color:var(--accent);background:var(--surface);font-size:17px;box-shadow:none}
html body main .metric-open:focus-visible,.interactive-point:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.interactive-point{cursor:pointer;pointer-events:all}.interactive-point:hover,.interactive-point.point-selected{stroke:var(--text);stroke-width:2}
.chart-point-value{margin-top:10px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--panel2);color:var(--text);font-size:12px}
#chart,#cardioChart{cursor:crosshair}
@media(prefers-reduced-motion:reduce){.metric-interactive{transition:none}}
