.home-semantic-icon{display:inline-block;width:1.15rem;height:1.15rem;object-fit:contain;vertical-align:-.18em}.module-entry .home-semantic-icon,.insulin-split-action .home-semantic-icon{width:1rem;height:1rem;filter:brightness(0) invert(1)}
.summary-grid.module-grid [data-module]{min-width:0}
.home-record-summary{display:grid;gap:5px;margin:10px 0;font-size:.82rem;overflow-wrap:anywhere}
.home-record-summary time,.home-contract-note{color:var(--muted);font-size:.75rem;line-height:1.5}
.home-contract-note{margin:10px 0;overflow-wrap:anywhere}
.home-plan-warnings{margin-top:12px;padding:10px;border-radius:10px;background:var(--orange-bg);color:var(--ink);font-size:.8rem;line-height:1.5}
.home-plan-warnings p{margin:0 0 4px}
.home-native-activity{margin:18px 0}
.home-native-activity h2{font-size:1rem}
.home-native-activity p{font-size:.85rem;color:var(--muted);line-height:1.6}
.module-grid .metric-header{flex-wrap:wrap;gap:8px}
.module-grid .metric-header .tag{max-width:100%;white-space:normal}
.module-grid .metric{padding-bottom:70px}
.module-grid .insulin-module-card{padding-bottom:16px}
.module-grid .insulin-name{white-space:normal;overflow-wrap:anywhere}
.module-grid button{min-height:44px;min-width:44px}
/* NutritionTrackingView: one workspace, the existing entry forms and records. */
.nutrition-workspace{--nutrition-surface:#fff;--nutrition-background:#f0f1f8;--nutrition-text:#15171c;--nutrition-muted:#65666d;--nutrition-line:#dce0e7;--nutrition-tile:#edf3fe;--nutrition-action:#1b59c5;width:min(680px,calc(100% - 24px));max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:28px;background:var(--nutrition-background);color:var(--nutrition-text);box-sizing:border-box;overflow:auto;overscroll-behavior:contain}
:root[data-web-theme="dark"] .nutrition-workspace{--nutrition-surface:#303136;--nutrition-background:#1c1d21;--nutrition-text:#f5f5f7;--nutrition-muted:#b0b1ba;--nutrition-line:#494a50;--nutrition-tile:#23324b;--nutrition-action:#2769ce}
.nutrition-workspace::backdrop{background:rgba(15,25,40,.48)}
.nutrition-workspace button,.nutrition-workspace summary{font:inherit;cursor:pointer;min-height:44px}
.nutrition-workspace button:disabled{opacity:.55;cursor:wait}
.nutrition-workspace button:focus-visible,.nutrition-workspace summary:focus-visible{outline:3px solid #5198ff;outline-offset:3px}
.nutrition-workspace-toolbar{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:12px 18px;background:var(--nutrition-background);border-bottom:1px solid var(--nutrition-line)}
.nutrition-workspace-toolbar button{background:var(--nutrition-surface);border:1px solid var(--nutrition-line);border-radius:28px;padding:8px 15px;color:var(--nutrition-text);font-weight:650}
.nutrition-workspace-toolbar svg{display:block;width:26px;height:26px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
.nutrition-workspace-body{padding:8px 20px 24px}
.nutrition-workspace h2{font-size:clamp(1.85rem,5.8vw,2.5rem);line-height:1.15;letter-spacing:-.035em;margin:8px 0 28px;color:var(--nutrition-text);font-weight:800}
.nutrition-workspace-card{padding:20px;margin:0 0 16px;border-radius:22px;background:var(--nutrition-surface)}
.nutrition-workspace [hidden]{display:none!important}
.nutrition-workspace h3{display:flex;align-items:center;gap:8px;font-size:1.13rem;margin:0 0 16px;color:var(--nutrition-text)}
.nutrition-workspace h3 :is(svg,img){width:23px;height:26px;flex-shrink:0}
.nutrition-workspace h3 .nutrition-fluid-icon{fill:currentColor}
.nutrition-workspace-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px}
.nutrition-workspace-actions button{border:0;border-radius:40px;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--nutrition-action);color:#fff;padding:14px 10px;font-size:1rem;line-height:1.25;font-weight:750;min-height:62px}
.nutrition-workspace-actions :is(svg,img){width:24px;height:28px;flex-shrink:0;fill:currentColor}
.nutrition-workspace-actions img{filter:brightness(0) invert(1)}
.nutrition-workspace-actions .nutrition-fluid-icon .bottle-label{stroke:var(--nutrition-action)}
.nutrition-workspace-actions .nutrition-fluid-icon .bottle-drop{fill:var(--nutrition-action)}
#nutritionWorkspaceTiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#nutritionWorkspaceTiles .today-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;padding:12px;border:0;border-radius:14px;background:var(--nutrition-tile)}
#nutritionWorkspaceTiles .today-item>span{color:var(--nutrition-muted);font-weight:650;overflow-wrap:anywhere;font-size:.92rem}
#nutritionWorkspaceTiles .today-item>span:before{content:'';display:inline-block;width:12px;height:16px;margin-right:7px;background:currentColor;clip-path:path('M6 0C5 3 0 8 0 11a6 6 0 0 0 12 0C12 8 7 3 6 0Z')}
#nutritionWorkspaceTiles strong{font-size:1.65rem;color:var(--nutrition-text)}
#nutritionWorkspaceTiles small{font-size:.9rem;font-weight:650;color:var(--nutrition-muted)}
.nutrition-workspace-empty{grid-column:1/-1;color:var(--nutrition-muted);margin:0;line-height:1.5}
.nutrition-workspace-record{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 0;border-bottom:1px solid var(--nutrition-line)}
.nutrition-workspace-record:first-child{padding-top:0}
.nutrition-workspace-record:last-child{border-bottom:0;padding-bottom:0}
.nutrition-workspace-record-copy{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere;font-size:1.05rem}
.nutrition-workspace-record-copy strong{font-size:1.12rem;color:var(--nutrition-text)}
.nutrition-workspace-record-copy time,.nutrition-workspace-record-copy p{color:var(--nutrition-muted);font-size:.9rem;margin:0;line-height:1.4}
.nutrition-workspace-menu{position:relative;flex-shrink:0}
.nutrition-workspace-menu summary{display:grid;place-items:center;list-style:none;width:48px;border-radius:25px;background:var(--nutrition-background);color:#2266d1}
.nutrition-workspace-menu summary::-webkit-details-marker{display:none}
.nutrition-workspace-menu summary svg{width:24px;height:24px}
.nutrition-workspace-menu>div{position:absolute;right:0;top:48px;z-index:3;min-width:120px;padding:4px;background:var(--nutrition-surface);border:1px solid var(--nutrition-line);border-radius:12px;box-shadow:0 6px 20px #0002}
.nutrition-workspace-menu button{display:block;width:100%;border:0;border-radius:8px;padding:8px 12px;background:transparent;color:var(--nutrition-text);text-align:left}
.nutrition-workspace-menu button:last-child{color:#cc3535}
#nutritionWorkspaceStatus{line-height:1.5;color:var(--nutrition-muted)}
@media(max-width:480px){.nutrition-workspace{width:100%;max-width:100%;max-height:calc(100dvh - 16px);margin:16px 0 0;border-radius:26px 26px 0 0}.nutrition-workspace-body{padding:8px 16px 24px}.nutrition-workspace-card{padding:16px}.nutrition-workspace-actions{padding:14px;gap:10px}}
.module-grid button:focus-visible,.mood-trigger:focus-visible{outline:3px solid var(--blue-dark);outline-offset:3px}
@media(max-width:650px){.summary-grid.module-grid{grid-template-columns:1fr}.module-grid .insulin-split-grid{grid-template-columns:1fr}}

/* DashboardView / ThemeColors: keep the existing data-web-theme authority. */
[data-view="home"],#entryDialog,.home-support-dialog,.home-support-actions{--home-surface:#fff;--home-secondary:#f7f9fb;--home-ink:#1b2631;--home-muted:#5d6d7e;--home-accent:#2980b9}
:root[data-web-theme="dark"] :is([data-view="home"],#entryDialog,.home-support-dialog,.home-support-actions){--home-surface:#1c232e;--home-secondary:#141a24;--home-ink:#f2f4f7;--home-muted:#9aa5b1;--home-accent:#68b9ed}
:root[data-web-theme] [data-view="home"] .module-grid .metric{border-radius:20px;background:var(--home-surface)!important;color:var(--home-ink);box-shadow:0 5px 10px rgba(0,0,0,.03);padding:16px}
[data-view="home"] .metric-header{flex-wrap:nowrap;align-items:center;color:var(--home-muted);min-height:44px;margin-bottom:12px}
[data-view="home"] .metric-header>span:first-child{display:flex;align-items:center;gap:8px;min-width:0;font-size:1rem;font-weight:650}
[data-view="home"] .metric-icon .home-semantic-icon{width:24px;height:24px}
[data-view="home"] .home-header-action .module-entry{position:static;margin-left:auto;flex-shrink:0}
[data-view="home"] .home-header-action .module-entry>span{display:none}
[data-view="home"] .module-entry button{width:44px;height:44px;min-width:44px;border-radius:50%;background:#2980b9;box-shadow:none}
[data-view="home"] .module-entry button:has(img[src$="/add.svg"]){background:transparent!important}
[data-view="home"] .module-entry img[src$="/add.svg"]{width:44px;height:44px;filter:none}
[data-view="home"] #medicationCount[hidden]{display:none}
[data-view="home"] .insulin-split-head{gap:8px;padding:14px}
[data-view="home"] .insulin-name{font-size:1.05rem}
[data-view="home"] .insulin-type{color:var(--home-accent);font-size:.9rem}
[data-view="home"] .insulin-dose{color:var(--home-ink);font-size:2rem}
[data-view="home"] :is(.insulin-dose-label,.insulin-time){font-size:.82rem;color:var(--home-muted)}
[data-view="home"] .insulin-split-action{font-size:.9rem;color:var(--home-accent)}
[data-view="home"] .metric-value{font-size:clamp(2rem,3vw,2.5rem);line-height:1.15;font-variant-numeric:tabular-nums;color:var(--home-ink)}
[data-view="home"] .metric-unit{color:var(--home-muted)}
[data-view="home"] .home-value-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
[data-view="home"] .home-value-row .tag{flex-shrink:0}
[data-view="home"] .home-header-action{padding-bottom:16px!important}
[data-view="home"] .home-nutrition-card{--nutrition-orange:#b95008;--nutrition-blue:#2675e5;--nutrition-button:#faece3;padding-bottom:16px}
:root[data-web-theme="dark"] [data-view="home"] .home-nutrition-card{--nutrition-orange:#ffad67;--nutrition-blue:#78b4ff;--nutrition-button:#382a23}
[data-view="home"] .home-nutrition-card .metric-header{gap:12px;align-items:center;margin-bottom:20px}
[data-view="home"] .home-nutrition-card .metric-header>span:first-child{font-size:1.05rem;line-height:1.25}
[data-view="home"] .home-nutrition-card .metric-icon{flex:none}
[data-view="home"] .nutrition-add{display:flex;flex-direction:column;align-items:center;gap:5px;flex:none;margin-left:auto;max-width:46%;padding:9px 10px;border:0;border-radius:12px;background:var(--nutrition-button);color:var(--nutrition-orange);font:700 .8rem/1.2 system-ui;cursor:pointer}
[data-view="home"] .nutrition-add-icons{display:flex;gap:5px;align-items:center}
[data-view="home"] .nutrition-add-icons .home-semantic-icon,.nutrition-fluid-icon{width:22px;height:22px;flex:none}
.nutrition-fluid-icon{fill:var(--nutrition-blue,#2675e5);vertical-align:middle}
.nutrition-fluid-icon .bottle-label{fill:none;stroke:var(--home-surface,#fff);stroke-width:1.4}
.nutrition-fluid-icon .bottle-drop{fill:var(--home-surface,#fff)}
[data-view="home"] .home-nutrition-card .metric-value{display:flex;align-items:baseline;gap:10px;margin:0 0 20px;font-size:2.6rem;font-weight:800}
[data-view="home"] .home-nutrition-card .metric-value .metric-unit{font-size:1.1rem;font-weight:700}
[data-view="home"] #nutritionCompleteness:empty{display:none}
[data-view="home"] #nutritionCompleteness{font-size:.78rem;color:var(--home-muted)}
[data-view="home"] .nutrition-latest{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:8px;border-top:1px solid var(--line);padding-top:16px;margin-top:16px;align-items:start;overflow-wrap:anywhere}
[data-view="home"] .nutrition-latest-icon .home-semantic-icon{width:22px;height:22px}
[data-view="home"] .nutrition-latest-body{display:contents}
[data-view="home"] .nutrition-latest-label{color:var(--home-muted);font-size:.85rem;font-weight:600}
[data-view="home"] .nutrition-latest-name{grid-column:2/-1;font-size:1rem;line-height:1.3;font-weight:650;color:var(--home-ink)}
[data-view="home"] #nutritionLatestMeal .nutrition-latest-name{color:var(--nutrition-orange)}
[data-view="home"] .nutrition-latest-description{grid-column:2/-1;font-size:.82rem;line-height:1.45;color:var(--home-muted)}
[data-view="home"] .nutrition-latest time{grid-column:3;grid-row:1;font-size:.78rem;color:var(--home-muted);line-height:1.5;text-align:right;max-width:105px}
[data-view="home"] .nutrition-daily-details{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}
.nutrition-entry-choice{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--home-secondary);color:var(--home-ink);font:600 1rem system-ui;cursor:pointer}
.nutrition-entry-choice:focus-visible{outline:3px solid var(--home-accent);outline-offset:2px}
:root[data-web-theme="dark"] .home-nutrition-card .home-semantic-icon{filter:brightness(1.6)}
[data-view="home"] .home-contract-note{font-size:.78rem;color:var(--home-muted)}
[data-view="home"] .home-medication-periods{display:flex;gap:12px;margin:8px 0;color:var(--home-accent);font-size:1.3rem}
[data-view="home"] .home-medication-periods .morning{color:#d88722}
[data-view="home"] .home-medication-periods .noon{color:#a77a10}
[data-view="home"] .home-medication-periods .night{color:#927de4}
[data-view="home"] .exercise-records{margin-bottom:0}
[data-view="home"] .home-native-activity{border-radius:20px;background:var(--home-surface)!important}
.home-support-actions{display:flex;gap:10px;margin-left:auto}
.shell:has([data-view="home"]:not(.active)) .home-support-actions{display:none}
#entryDialog .insulin-dose-panel>label{display:grid;gap:8px;margin-block:16px}
.home-support-actions button,.home-support-head button{display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:50%;background:var(--home-surface);color:var(--home-accent);font:700 1.35rem system-ui;cursor:pointer}
.home-support-actions .product-icon{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.home-support-dialog{width:min(540px,calc(100% - 32px));max-height:85dvh;box-sizing:border-box;padding:20px;border:1px solid var(--line);border-radius:20px;background:var(--home-surface);color:var(--home-ink)}
.home-support-dialog::backdrop{background:rgba(11,25,45,.48)}
.home-support-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.home-support-head h2{margin:0;font-size:1.15rem}
.home-support-dialog details{border-top:1px solid var(--line);padding:14px 0}
.home-support-dialog summary{cursor:pointer;min-height:30px;font-weight:650}
.home-support-dialog p{color:var(--home-muted);line-height:1.6}

/* Only Home entry sheets; settings, reports and login retain their styling. */
#entryDialog{background:var(--home-surface)!important;color:var(--home-ink);border-radius:20px;max-height:calc(100dvh - 40px)}
#entryDialog :is(h2,h3,strong,label){color:var(--home-ink)!important}
#entryDialog :is(p,small,.parity-unit,.parity-hero small,.medication-dose-copy>span,.insulin-dose-heading>span){color:var(--home-muted)}
#entryDialog :is(.parity-hero,.parity-optional,.insulin-previous,.medication-daily-summary,.medication-dose-row,.medication-daily-empty,.meal-food-row,.meal-main-fields){background:var(--home-secondary);border-color:var(--line);color:var(--home-ink)}
#entryDialog :is(input,select,textarea,.parity-input-unit){background:var(--home-surface);color:var(--home-ink);border-color:var(--line)}
#entryDialog .parity-number-control{grid-template-columns:minmax(0,1fr) auto;gap:10px}
#entryDialog .parity-number-control input{font-size:1.25rem;font-variant-numeric:tabular-nums;appearance:textfield;-moz-appearance:textfield}
#entryDialog input[type="number"]::-webkit-inner-spin-button,#entryDialog input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
#entryDialog .dialog-actions{background:var(--home-surface);border-color:var(--line)}
#entryDialog .dialog-actions .cancel{background:var(--home-secondary);color:var(--home-ink);min-height:44px}
#entryDialog .dialog-actions .save{background:#2980b9;color:#fff;min-height:44px}
#entryDialog .medication-dose-row.is-taken{background:var(--green-bg)}
#entryDialog .insulin-dose-value strong{color:var(--home-accent)!important}
#entryDialog .parity-kicker{color:var(--home-accent)}
@media(max-width:650px){[data-view="home"] .greeting{flex-wrap:wrap;gap:12px}.entry-modal{padding:8px!important}#entryDialog{width:100%;max-height:calc(100dvh - 16px);padding:18px 16px;border-radius:20px}#entryDialog .dialog-actions{bottom:-18px;margin-inline:-16px;margin-bottom:-18px;padding:14px 16px}.home-support-dialog{width:calc(100% - 16px)}}
@media(max-width:650px){.greeting:has(.home-support-actions){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}.greeting:has(.home-support-actions)>div:first-child{grid-column:1/-1}}

