
:root{--bg:#f4f8f7;--card:#fff;--text:#153332;--muted:#728583;--line:#dceae7;--soft:#e9f5f2;--green:#45b982;--mint:#45b982;--teal:#087f78;--deep:#087f78;--profile-primary:#087f78;--profile-soft:#e9f5f2;--shadow:0 16px 38px rgba(5,85,80,.08)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}button,input,select{font:inherit}.app-shell{min-height:100vh}.side{display:none}.content{max-width:720px;margin:auto;padding:18px 14px 95px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.brand{display:flex;gap:11px;align-items:center}.brand .logo{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-size:34px;font-weight:900;color:var(--mint);border:4px solid var(--teal);transform:rotate(-25deg)}.brand b{font-size:30px;color:var(--deep);letter-spacing:-1.5px}.brand small{display:block;color:var(--muted);font-size:11px}.avatar{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:#fff;font-weight:800}.datebar{display:grid;grid-template-columns:46px 1fr 46px;gap:9px;margin-bottom:14px}.datebar button{border:1px solid var(--line);background:#fff;border-radius:16px;box-shadow:0 5px 18px rgba(5,85,80,.03)}.date{padding:10px 14px;text-align:left}.date span{display:block;color:var(--muted);font-size:12px}.date b{font-size:18px}.dashboard{display:grid;gap:14px}.card{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:18px;box-shadow:var(--shadow)}.hero{background:linear-gradient(145deg,#fff 20%,#e9f8f1 100%)}.eyebrow{font-size:12px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:var(--deep)}.energy{font-size:38px;font-weight:900;letter-spacing:-1.8px;margin-top:8px}.energy small{font-size:17px;color:var(--muted);letter-spacing:0}.progress{height:11px;background:#dfeeea;border-radius:99px;overflow:hidden;margin:15px 0}.progress div{height:100%;background:linear-gradient(90deg,var(--green),var(--teal))}.macros{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.macro{background:rgba(255,255,255,.8);border:1px solid var(--line);border-radius:15px;padding:11px}.macro span{font-size:12px;color:var(--muted)}.macro b{display:block;margin-top:4px;font-size:14px}.title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.title h2{margin:0;font-size:20px}.link{border:0;background:none;color:var(--deep);font-weight:800}.meal,.row{display:flex;justify-content:space-between;gap:12px;padding:14px 2px;border-top:1px solid var(--line);cursor:pointer}.meal:first-of-type,.row:first-of-type{border-top:0}.meal small,.tag{display:block;color:var(--muted);font-size:12px;margin-top:4px;line-height:1.45}.quickgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.quick{border:1px solid var(--line);background:#fff;border-radius:17px;padding:15px;text-align:left;color:var(--text)}.quick b{display:block;margin-top:6px}.assistant{background:linear-gradient(145deg,#0a8d83,#0aa6a0);color:#fff}.assistant p{color:#d9fff5;line-height:1.5}.btn{width:100%;border:0;border-radius:15px;padding:13px 14px;background:var(--deep);color:#fff;font-weight:850}.secondary{background:#e9f5f2;color:var(--deep)}.danger{background:#fff0f0;color:#9b1c1c}.sheet{position:fixed;inset:0;display:none;align-items:flex-end;justify-content:center;background:rgba(11,47,45,.38);z-index:40}.sheet.open{display:flex}.panel{width:min(680px,100%);max-height:92vh;overflow:auto;background:#f9fcfb;border-radius:26px 26px 0 0;padding:18px 16px 30px}.handle{width:46px;height:5px;background:#c9d9d6;border-radius:99px;margin:0 auto 16px}.search,.input{width:100%;border:1px solid var(--line);border-radius:15px;padding:13px 14px;background:#fff}.label{display:block;color:var(--muted);font-size:13px;margin:14px 0 6px}.result{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px;margin-top:9px}.result>div{flex:1}.star{font-size:22px;color:#d7aa1f}.pills{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.pill{border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 12px;font-weight:750}.pill.active{background:var(--deep);color:#fff}.bottom{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(720px,100%);display:grid;grid-template-columns:repeat(5,1fr);padding:10px 8px 16px;background:rgba(255,255,255,.96);border-top:1px solid var(--line);z-index:30}.bottom button{border:0;background:none;color:var(--muted);font-size:12px}.bottom .active{color:var(--deep);font-weight:850}.bottom .fab{width:48px;height:48px;border-radius:50%;background:linear-gradient(145deg,var(--mint),var(--teal));color:#fff;font-size:25px;margin:-26px auto 0}.toast{position:fixed;left:50%;bottom:92px;transform:translate(-50%,20px);background:var(--text);color:#fff;padding:11px 16px;border-radius:14px;opacity:0;transition:.2s;z-index:60}.toast.show{opacity:1;transform:translate(-50%,0)}.error{background:#fff0f0;color:#8f2929;padding:13px;border-radius:15px}.empty{color:var(--muted);padding:18px 0}
@media(min-width:760px){.content{max-width:1120px;padding:24px 24px 80px}.dashboard{grid-template-columns:minmax(280px,.85fr) minmax(380px,1.2fr)}.meals{grid-column:2;grid-row:1/span 2}.quickcard{grid-column:1/-1}.quickgrid{grid-template-columns:repeat(4,1fr)}}
@media(min-width:1120px){.app-shell{display:grid;grid-template-columns:250px 1fr}.side{display:flex;position:sticky;top:0;height:100vh;flex-direction:column;padding:26px 20px;background:#eef8f5;border-right:1px solid var(--line)}.side nav{display:flex;flex-direction:column;gap:7px;margin-top:34px}.side nav button{border:0;background:transparent;text-align:left;padding:12px 14px;border-radius:14px;color:var(--muted);font-weight:750}.side nav .active{background:#fff;color:var(--deep);box-shadow:var(--shadow)}.side footer{margin-top:auto;color:var(--muted);font-size:12px}.content{max-width:1380px;width:100%;padding:28px 34px 50px}.mobile{display:none}.bottom{display:none}.dashboard{grid-template-columns:minmax(300px,.8fr) minmax(460px,1.2fr) minmax(280px,.75fr)}.hero{grid-column:1}.meals{grid-column:2;grid-row:1/span 2}.assistant{grid-column:3}.quickcard{grid-column:1;grid-row:2}.recent{grid-column:3;grid-row:2}.sheet{align-items:center}.panel{border-radius:24px;max-height:86vh}}


/* PEA v0.4.1 – Desktop refinement */
.profile-card,.side-summary{display:none}

@media(min-width:1120px){
  body{overflow-x:hidden}
  .app-shell{grid-template-columns:280px minmax(0,1fr)}
  .side{
    padding:30px 24px 22px;
    background:linear-gradient(180deg,#edf9f6 0%,#f5fbf9 100%);
  }
  .side .brand{padding:0 4px}
  .side .brand .logo{width:54px;height:54px;font-size:39px}
  .side .brand b{font-size:34px}
  .side .brand small{max-width:150px;line-height:1.35;margin-top:5px}
  .profile-card{
    display:flex;align-items:center;gap:11px;
    margin-top:30px;padding:13px;
    background:rgba(255,255,255,.78);
    border:1px solid var(--line);border-radius:16px;
  }
  .profile-avatar{
    width:38px;height:38px;border-radius:50%;
    display:grid;place-items:center;
    color:#fff;font-weight:850;
    background:linear-gradient(145deg,var(--mint),var(--teal));
  }
  .profile-card b{display:block}
  .profile-card small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
  .side nav{margin-top:22px;gap:6px}
  .side nav button{
    display:flex;align-items:center;gap:11px;
    padding:13px 14px;font-size:14px;
  }
  .side nav button span{
    width:22px;text-align:center;font-size:16px;color:var(--deep)
  }
  .side-summary{
    display:block;margin-top:auto;margin-bottom:20px;
    padding:14px;background:#fff;border:1px solid var(--line);border-radius:16px;
  }
  .side-summary div{display:flex;justify-content:space-between;gap:8px;padding:7px 0}
  .side-summary div+div{border-top:1px solid var(--line)}
  .side-summary span{color:var(--muted);font-size:11px}
  .side-summary b{font-size:12px}
  .side footer{margin-top:0}

  .content{
    max-width:none;
    padding:26px clamp(30px,4vw,76px) 52px;
  }
  header{
    min-height:44px;
    margin-bottom:10px;
  }
  .datebar{
    width:min(760px,100%);
    grid-template-columns:42px minmax(320px,1fr) 42px;
    margin:0 0 16px;
  }
  .datebar button{border-radius:13px}
  .date{padding:8px 13px}
  .date span{font-size:11px}
  .date b{font-size:16px}

  .dashboard{
    width:100%;
    max-width:1650px;
    grid-template-columns:minmax(320px,.9fr) minmax(520px,1.45fr) minmax(330px,.9fr);
    grid-template-rows:auto auto;
    gap:16px;
    align-items:stretch;
  }
  .card{
    border-radius:20px;
    padding:20px;
  }
  .hero{grid-column:1;grid-row:1;min-height:250px}
  .meals{
    grid-column:2;grid-row:1 / span 2;
    min-height:560px;
  }
  .assistant{
    grid-column:3;grid-row:1;
    min-height:250px;
  }
  .quickcard{
    grid-column:1;grid-row:2;
    min-height:294px;
  }
  .recent{
    grid-column:3;grid-row:2;
    min-height:294px;
  }

  .energy{font-size:46px;margin-top:12px}
  .macros{margin-top:4px}
  .macro{padding:13px}
  .meal{padding:18px 3px}
  .meal b{font-size:15px}
  .meal small{font-size:12px}
  .quickgrid{
    grid-template-columns:1fr 1fr;
    gap:11px;
  }
  .quick{
    min-height:92px;padding:16px;
    display:flex;flex-direction:column;justify-content:center;
  }
  .quick:first-letter{font-size:21px}
  .assistant h2{font-size:25px;line-height:1.18;margin:10px 0 0}
  .assistant p{font-size:14px}
  .recent .row{padding:16px 2px}
  .sheet{align-items:center}
  .panel{width:min(760px,calc(100vw - 80px))}
}

@media(min-width:1550px){
  .content{padding-left:60px;padding-right:60px}
  .dashboard{gap:20px}
  .card{padding:22px}
}


/* PEA v0.4.2 – interaction fixes */
.recent-button{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:15px 2px;
  border:0;
  border-top:1px solid var(--line);
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}
.recent-button:first-of-type{border-top:0}
.recent-button:hover{color:var(--deep);background:rgba(255,255,255,.55)}
.recent-button:focus-visible{outline:3px solid rgba(25,174,176,.24);outline-offset:3px;border-radius:12px}
.side nav button.active{
  background:#fff!important;
  color:var(--deep)!important;
  box-shadow:0 8px 24px rgba(5,85,80,.06)!important;
}
.side nav button:not(.active){
  background:transparent!important;
  color:var(--muted)!important;
  box-shadow:none!important;
}

/* PEA v0.4.3 */
.recent-button{appearance:none;-webkit-appearance:none;font:inherit}
.recent-button>div{flex:1}
.recent-button .tag{display:block}


/* PEA v0.4.4 – meal selection for recent items */
.meal-choice-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.meal-choice{
  min-height:64px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:16px;
  font-weight:800;
  text-align:left;
  padding:14px;
}
.meal-choice:hover{
  border-color:var(--teal);
  color:var(--deep);
  background:var(--surface-2);
}
@media(min-width:760px){
  .meal-choice-grid{grid-template-columns:repeat(4,1fr)}
}


/* PEA v0.4.6 – compact desktop date navigation */
@media(min-width:1120px){
  .datebar{
    width:auto;
    max-width:none;
    display:inline-grid;
    grid-template-columns:40px auto 40px;
    gap:8px;
    margin:0 0 16px;
    align-items:stretch;
  }
  .datebar .date-main,
  .datebar .date{
    width:auto;
    min-width:250px;
    max-width:340px;
    padding:8px 14px;
  }
  .datebar .date-arrow{
    width:40px;
    min-width:40px;
  }
}

/* PEA v0.5.0 – Smart Entry */
.smart-meal{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;margin:12px 0;background:var(--soft);border:1px solid var(--line);border-radius:16px}
.smart-meal b{display:block;margin-top:3px}
.mini-btn{border:1px solid var(--line);background:#fff;color:var(--deep);border-radius:11px;padding:8px 11px;font-weight:800}
.smart-tabs{display:flex;gap:7px;margin:12px 0 8px}
.smart-tab{border:1px solid var(--line);background:#fff;color:var(--muted);padding:8px 11px;border-radius:999px;font-weight:750}
.smart-tab.active{background:var(--deep);color:#fff;border-color:var(--deep)}
.smart-result{padding:0;overflow:hidden}
.food-main{flex:1;border:0;background:transparent;text-align:left;padding:13px;color:var(--text)}
.food-main b,.food-main span{display:block}
.star-btn{align-self:stretch;width:50px;border:0;border-left:1px solid var(--line);background:#fff;color:#d5a900;font-size:21px}
.entry-context{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:10px 0 12px;padding:10px 12px;background:var(--soft);border:1px solid var(--line);border-radius:14px}
.entry-context button{border:0;background:none;color:var(--deep);font-weight:850}
.meal-choice.selected{border-color:var(--teal);background:var(--soft);color:var(--deep)}
.meal-choice span{display:block;margin-top:6px}

/* PEA v0.6.0 – Effortless Logging */
.effortless{align-items:start}
.quick-entry-card{grid-column:1/-1}
.quick-entry-row{display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:12px}
.quick-submit{width:auto;min-width:110px}
.quick-preview{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#fff}
.quick-preview b,.quick-preview span{display:block}
.quick-preview span{color:var(--muted);font-size:12px;margin-top:4px}
.quick-preview-actions{display:flex;gap:8px;align-items:center}
.quick-preview-actions .btn{width:auto}
.suggestions-card{grid-column:1/-1}
.suggestion-row{width:100%;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 2px;border:0;border-top:1px solid var(--line);background:transparent;text-align:left;color:var(--text)}
.suggestion-row:first-of-type{border-top:0}
.suggestion-row b,.suggestion-row span{display:block}
.suggestion-meta{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.suggestion-meta small{color:var(--muted)}
.confidence{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:800;border-radius:999px;padding:4px 8px;margin-top:6px}
.confidence-high{background:#e7f7ee;color:#26734a}
.confidence-medium{background:#fff4d8;color:#8a6512}
.confidence-low{background:#f2f2f2;color:#666}
@media(min-width:1120px){
  .effortless{grid-template-columns:minmax(320px,.8fr) minmax(520px,1.25fr) minmax(350px,.9fr)}
  .effortless .hero{grid-column:1;grid-row:1}
  .effortless .quick-entry-card{grid-column:2 / span 2;grid-row:1}
  .effortless .meals{grid-column:2;grid-row:2}
  .effortless .suggestions-card{grid-column:1;grid-row:2}
}
@media(max-width:640px){
  .quick-entry-row{grid-template-columns:1fr}
  .quick-submit{width:100%}
  .quick-preview{align-items:stretch;flex-direction:column}
  .quick-preview-actions{display:grid;grid-template-columns:1fr 1fr}
}


/* PEA v0.7.0 – family database */
.profile-choice{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:16px;
  padding:13px 14px;
  margin-top:9px;
  text-align:left;
}
.profile-choice.selected{
  border-color:var(--teal);
  background:var(--soft);
}
.profile-dot{
  width:18px;
  height:18px;
  border-radius:50%;
  flex:0 0 auto;
}
.food-main .tag{display:block}


/* PEA v0.7.3 – performance and database info */
.db-path-row{
  align-items:flex-start;
}
.db-path-row code{
  max-width:72%;
  text-align:right;
  overflow-wrap:anywhere;
  font-size:12px;
  background:var(--soft);
  border:1px solid var(--line);
  border-radius:8px;
  padding:5px 7px;
}

/* PEA v0.8.2 – catalog, source transparency, barcode import and Bistro Lotus */
.catalog-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.title-actions{display:flex;gap:8px;align-items:center}
.food-library-row{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;border:0;border-top:1px solid var(--line);background:transparent;padding:13px 2px;color:var(--text)}
.food-library-row:first-of-type{border-top:0}
.food-library-row b,.food-library-row .tag{display:block}
.food-library-row .confidence{margin-top:5px}
.estimate-box{display:flex;flex-direction:column;gap:4px;margin:8px 0 12px;padding:11px 12px;border:1px solid #e9c86a;border-radius:13px;background:#fff8df}
.estimate-box span{font-size:12px;line-height:1.4;color:var(--muted)}
.source-link{margin:12px 0 0}
.source-link a{color:var(--teal);font-weight:700;text-decoration:none}
.source-note{margin-top:8px;line-height:1.45}
.barcode-row{display:grid;grid-template-columns:1fr auto;gap:9px;align-items:center}
.barcode-row .btn{height:46px;margin:0;padding-inline:18px}
.barcode-preview{display:flex;flex-direction:column;gap:9px;margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--soft)}
.barcode-preview>b,.barcode-preview>span{display:block}
.barcode-macros{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}
.barcode-macros span{font-size:11px;text-align:center;padding:7px 4px;border-radius:9px;background:#fff;border:1px solid var(--line)}
.catalog-package{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 0;border-top:1px solid var(--line)}
.catalog-package:first-of-type{border-top:0}
.catalog-package b,.catalog-package span{display:block}
.catalog-package strong{font-size:18px}
@media(max-width:520px){.catalog-actions{grid-template-columns:1fr}.barcode-macros{grid-template-columns:repeat(2,1fr)}}


/* PEA v0.8.3 – direkte Suche und vollständige Lebensmittelliste */
.quick-suggestions{
  margin-top:8px;
  border-radius:14px;
  overflow:hidden;
}
.typeahead-row{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-bottom:0;
  background:#fff;
  color:var(--text);
  text-align:left;
}
.typeahead-row:first-child{border-radius:13px 13px 0 0}
.typeahead-row:last-child{
  border-bottom:1px solid var(--line);
  border-radius:0 0 13px 13px;
}
.typeahead-row:only-child{border-radius:13px}
.typeahead-row b,.typeahead-row span{display:block}
.typeahead-row span{font-size:12px;color:var(--muted);margin-top:2px}
.typeahead-empty,.searching{
  padding:12px;
  color:var(--muted);
  text-align:center;
}
.food-library-title{align-items:flex-start;gap:12px}
.food-library-title>div:first-child span{display:block;margin-top:3px}
.food-library-title .title-actions{flex-wrap:wrap;justify-content:flex-end}
.food-list-note{margin:10px 0 13px}
.food-library-card .search{margin-top:8px}
.more-export-button{width:100%;margin-top:14px}
@media(max-width:720px){
  .food-library-title{display:block}
  .food-library-title .title-actions{
    justify-content:flex-start;
    margin-top:10px;
  }
}


/* PEA v0.8.4 – Kamerascanner und einfache eigene Rezepte */
.capture-grid{display:grid;gap:10px}
.capture-grid button{display:grid;grid-template-columns:44px 1fr;column-gap:12px;align-items:center;text-align:left;padding:15px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--text)}
.capture-grid button>span{grid-row:1/3;font-size:25px;text-align:center}.capture-grid b,.capture-grid small{display:block}.capture-grid small{color:var(--muted);margin-top:3px}
.three-actions{grid-template-columns:repeat(3,1fr)}
.scanner-frame{position:relative;overflow:hidden;margin:12px 0;border-radius:18px;background:#071817;aspect-ratio:4/3;border:1px solid var(--line)}
.scanner-frame video{width:100%;height:100%;object-fit:cover;display:block}
.scanner-guide{position:absolute;inset:18%;border:2px solid rgba(255,255,255,.85);border-radius:14px;box-shadow:0 0 0 999px rgba(0,0,0,.28)}
.scanner-guide span{position:absolute;left:8%;right:8%;top:50%;height:2px;background:#22d3c5;box-shadow:0 0 8px #22d3c5;animation:scanline 1.8s ease-in-out infinite alternate}
@keyframes scanline{from{transform:translateY(-48px)}to{transform:translateY(48px)}}
.scanner-status{padding:9px 11px;border-radius:11px;background:var(--soft);color:var(--muted);font-size:12px}.scanner-status.success{background:#e7f7ee;color:#26734a}.scanner-status.error{background:#fff0ef;color:#9c2e28}
.scanner-buttons{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}.manual-barcode{margin-top:12px}.manual-barcode summary{cursor:pointer;color:var(--deep);font-weight:800}
.recipe-food-info{display:flex;flex-direction:column;gap:5px;margin-top:12px;padding:12px;border-radius:14px;background:var(--soft);border:1px solid var(--line)}.recipe-food-info span{font-size:12px;color:var(--muted);line-height:1.45}.recipe-food-info button{align-self:flex-start;margin-top:4px}
.recipe-list-card{grid-column:1/-1}.recipe-list-row{display:grid;grid-template-columns:1fr auto;align-items:stretch;border-top:1px solid var(--line)}.recipe-list-row:first-of-type{border-top:0}.recipe-list-row>button:first-child{display:flex;justify-content:space-between;align-items:center;text-align:left;border:0;background:transparent;color:var(--text);padding:14px 4px}.recipe-list-row b,.recipe-list-row span{display:block}.recipe-list-row span{font-size:12px;color:var(--muted);margin-top:4px}.recipe-edit-button{width:48px;border:0;background:transparent;color:var(--deep);font-size:18px}
.recipe-textarea{min-height:145px;resize:vertical;line-height:1.5}.recipe-tools{display:grid;grid-template-columns:1.2fr 1fr .7fr;gap:8px;margin:12px 0}.recipe-tools .btn{margin:0}
.recipe-item{padding:12px;margin:9px 0;border:1px solid var(--line);border-radius:14px;background:#fff}.recipe-item.unmatched{border-color:#e8b04d;background:#fffaf0}.recipe-item-top{display:grid;grid-template-columns:90px 130px 40px;gap:8px}.recipe-quantity,.recipe-unit{margin:0}.recipe-food-select{margin-top:8px}.icon-button{border:1px solid var(--line);border-radius:10px;background:#fff;font-size:20px}.danger-text{color:#b43b35}
.recipe-match-search{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:8px}.recipe-item-meta{margin-top:8px;font-size:12px;font-weight:750;color:var(--deep)}.recipe-item-meta span{display:block;color:var(--muted);font-weight:500;margin-top:3px}.recipe-raw{display:block;color:var(--muted);margin-top:5px}
.recipe-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.recipe-summary>div{padding:11px;border-radius:13px;background:var(--soft);border:1px solid var(--line)}.recipe-summary span,.recipe-summary b{display:block}.recipe-summary span{font-size:11px;color:var(--muted);margin-bottom:4px}.recipe-summary b{font-size:14px}
@media(max-width:700px){.three-actions,.recipe-tools,.recipe-summary{grid-template-columns:1fr}.recipe-item-top{grid-template-columns:1fr 1fr 40px}.scanner-buttons{grid-template-columns:1fr}.scanner-frame{aspect-ratio:3/4}}


/* PEA v0.8.7 – unified logo, security, HelloFresh and audits */
.brand-logo{width:48px;height:48px;display:block;border-radius:14px;flex:0 0 auto}
.side .brand-logo{width:54px;height:54px}
.login-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(145deg,#edf9f6,#f8fbfa);padding:20px}
.login-card{width:min(420px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:var(--shadow);text-align:center}
.login-logo{width:78px;height:78px;border-radius:20px}.login-card h1{font-size:42px;color:var(--deep);margin:8px 0 0}.login-card>p{color:var(--muted);margin:0 0 24px}.login-card form{text-align:left}.login-card .btn{margin-top:14px}.login-card>small{display:block;color:var(--muted);margin-top:18px}.login-error{margin-top:12px}
.recipe-title{align-items:flex-start}.hf-preview{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--soft)}.hf-preview h3{margin:0 0 10px}.hf-ingredients{display:grid;gap:7px;margin:10px 0 14px}.hf-ingredients div{padding:8px 10px;border:1px solid var(--line);border-radius:11px;background:#fff}.external-link{display:block;text-align:center;text-decoration:none;margin-top:12px}
.status-pill{font-size:11px;font-weight:850;border-radius:999px;padding:5px 9px}.status-pill.good{background:#e7f7ee;color:#26734a}.status-pill.warn{background:#fff4d8;color:#8a6512}.status-pill.bad{background:#fff0f0;color:#8f2929}
.security-check{display:flex;gap:10px;padding:11px 0;border-top:1px solid var(--line)}.security-check:first-of-type{border-top:0}.security-check>span{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--soft);color:var(--deep);font-weight:900}.security-check b,.security-check small{display:block}.security-check small{color:var(--muted);font-size:11px;margin-top:3px;line-height:1.35}
.audit-list{display:grid;gap:8px;margin-top:12px}.audit-list button{display:flex;align-items:flex-start;gap:10px;width:100%;text-align:left;border:1px solid var(--line);background:#fff;border-radius:13px;padding:11px;color:var(--text)}.audit-list b,.audit-list small{display:block}.audit-list small{color:var(--muted);margin-top:3px}.audit-severity{font-size:10px;text-transform:uppercase;font-weight:900;border-radius:999px;padding:4px 7px}.audit-severity.kritisch{background:#fff0f0;color:#8f2929}.audit-severity.warnung{background:#fff4d8;color:#8a6512}.audit-severity.hinweis{background:#eef5ff;color:#355d8a}


/* PEA v0.8.8 – altes Logo, Betrieb und sichere Datenbankmigration */
.brand-logo{display:none}
.login-old-logo{
  width:78px!important;
  height:78px!important;
  margin:0 auto;
  font-size:56px!important;
  border-width:6px!important;
}
.macro-link{cursor:pointer}
.macro-link:hover{border-color:var(--teal)}
.command-box{
  display:block;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#eef7f4;
  color:var(--deep);
  overflow-wrap:anywhere;
  line-height:1.5;
}
.setup-steps{
  padding-left:22px;
  color:var(--text);
  line-height:1.65;
}
.migration-checks{
  margin-top:14px;
  display:grid;
  gap:8px;
}
.migration-checks>div{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
}
.migration-checks>div.ok{color:#17633a;background:#effaf2}
.migration-checks>div.bad{color:#8f2929;background:#fff0f0}
.migration-checks>div>span{font-weight:900;margin-right:8px}
.migration-path{
  display:grid;
  grid-template-columns:72px 1fr;
  align-items:start;
  gap:8px;
  color:var(--text)!important;
  background:#fff!important;
}
.migration-path code{
  overflow-wrap:anywhere;
  font-size:12px;
  color:var(--deep);
}


/* PEA v0.8.8.3 – direkte Aktionen für Mahlzeiten und Gewicht */
.meal-overview-date{margin:0 0 12px}
.direct-entry-list,.weight-list{display:grid;gap:10px}
.direct-entry-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:stretch;
  gap:9px;
  padding:0;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
}
.direct-entry-main{
  min-width:0;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  padding:14px 10px 14px 16px;
}
.direct-entry-main b,.direct-entry-main span{display:block}
.direct-entry-main span{
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
.weight-entry-row .direct-entry-main{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.weight-entry-row .direct-entry-main span{
  margin:0;
  font-size:14px;
}
.weight-entry-row .direct-entry-main b{
  white-space:nowrap;
}
.direct-entry-actions{
  display:flex;
  align-items:center;
  gap:7px;
  padding:8px 10px 8px 0;
}
.direct-action{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--deep);
}
.direct-action svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.direct-action.edit:hover,.direct-action.edit:focus-visible{
  background:var(--soft);
  border-color:var(--teal);
}
.direct-action.delete{
  color:#a42d2d;
  background:#fff8f8;
}
.direct-action.delete:hover,.direct-action.delete:focus-visible{
  background:#fff0f0;
  border-color:#d98b8b;
}
.weight-entry-grid{
  display:grid;
  grid-template-columns:minmax(145px,.8fr) minmax(150px,1fr) auto;
  gap:9px;
  align-items:end;
  margin:10px 0 16px;
}
.compact-label{margin-top:0}
.weight-save-button{
  width:auto;
  min-width:110px;
  height:47px;
}
@media(max-width:560px){
  .direct-entry-row{
    grid-template-columns:minmax(0,1fr) 98px;
  }
  .direct-entry-actions{
    gap:6px;
    padding-right:7px;
  }
  .direct-action{
    width:40px;
    height:40px;
    flex-basis:40px;
  }
  .weight-entry-grid{
    grid-template-columns:1fr 1fr;
  }
  .weight-save-button{
    grid-column:1/-1;
    width:100%;
  }
}
@media(max-width:390px){
  .direct-entry-row{
    grid-template-columns:minmax(0,1fr) 90px;
  }
  .direct-entry-main{
    padding-left:12px;
    padding-right:6px;
  }
  .direct-entry-actions{
    gap:4px;
    padding-left:0;
    padding-right:5px;
  }
  .direct-action{
    width:38px;
    height:38px;
    flex-basis:38px;
  }
}


/* PEA v0.8.8.4 – verschachtelte Zurück-Navigation und Profilinformationen */
.profile-card{
  width:100%;
  text-align:left;
  color:var(--text);
}
.profile-choice-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 46px;
  gap:8px;
  align-items:stretch;
  margin-bottom:8px;
}
.profile-choice-row .profile-choice{margin:0}
.profile-choice span:nth-child(2){
  min-width:0;
  text-align:left;
}
.profile-choice small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}
.profile-edit-button{
  width:46px;
  min-height:52px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  color:var(--deep);
}
.profile-edit-button svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.profile-detail-head{
  display:flex;
  align-items:center;
  gap:14px;
  margin:8px 0 16px;
}
.profile-detail-head>div b,
.profile-detail-head>div span{display:block}
.profile-detail-head>div span{
  margin-top:4px;
  color:var(--muted);
}
.profile-large-avatar{
  width:64px;
  height:64px;
  flex:0 0 64px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#fff;
  font-size:24px;
  font-weight:800;
}
.profile-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-bottom:12px;
}
.profile-detail-grid>div{
  padding:11px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
}
.profile-detail-grid span,
.profile-detail-grid b{display:block}
.profile-detail-grid span{
  color:var(--muted);
  font-size:12px;
  margin-bottom:4px;
}
.profile-target-card,
.profile-notes{
  margin:12px 0;
  padding:13px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--soft);
}
.profile-target-card>div{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:8px;
}
.profile-target-card span{
  padding:6px 8px;
  border-radius:999px;
  background:#fff;
  color:var(--deep);
  font-size:12px;
}
.profile-notes p{
  margin:7px 0 0;
  white-space:pre-wrap;
  color:var(--muted);
  line-height:1.5;
}
.profile-form-section{
  margin:14px 0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
}
.profile-form-section h3{
  margin:0 0 10px;
  font-size:16px;
}
.profile-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.profile-form-grid label>span,
.profile-form-section>label>span{
  display:block;
  margin-bottom:5px;
  color:var(--muted);
  font-size:12px;
}
.profile-form-grid .input{margin:0}
.profile-textarea{
  resize:vertical;
  min-height:100px;
}
@media(max-width:620px){
  .profile-form-grid,
  .profile-detail-grid{
    grid-template-columns:1fr;
  }
}


/* PEA v0.8.8.5 – Dialog-Pfeil, X und Gesundheitsorientierung */
.panel{
  position:relative;
  padding-top:8px;
}
.sheet-toolbar{
  position:sticky;
  top:-8px;
  z-index:12;
  display:grid;
  grid-template-columns:48px 1fr 48px;
  align-items:center;
  min-height:56px;
  margin:-8px -4px 10px;
  padding:8px 4px 6px;
  background:linear-gradient(180deg,#f9fcfb 78%,rgba(249,252,251,0));
}
.sheet-toolbar .handle{margin:0 auto}
.sheet-nav-button{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  color:var(--deep);
  font-size:34px;
  line-height:1;
  box-shadow:0 5px 14px rgba(5,85,80,.07);
}
.sheet-nav-button.close{
  justify-self:end;
  color:#8f2929;
  background:#fff8f8;
  font-size:30px;
}
.sheet-nav-button:active{transform:scale(.96)}
.health-summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin:13px 0;
}
.health-summary-grid>div{
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.health-summary-grid span,.health-summary-grid b{display:block}
.health-summary-grid span{
  color:var(--muted);
  font-size:12px;
  margin-bottom:5px;
}
.health-check-list{
  display:grid;
  gap:9px;
  margin:13px 0;
}
.health-check{
  display:grid;
  grid-template-columns:30px 1fr;
  gap:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
}
.health-check>span{
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:50%;
  font-weight:900;
  background:#fff;
}
.health-check b{display:block}
.health-check p{
  margin:4px 0 0;
  color:var(--muted);
  line-height:1.45;
  font-size:13px;
}
.health-check.good{background:#effaf2;color:#17633a}
.health-check.warn{background:#fff8e8;color:#7b5710}
.health-check.info{background:#eef7fb;color:#245c73}
.health-disclaimer{
  margin:13px 0;
  padding:11px 12px;
  border-radius:13px;
  background:#f2f5f4;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.bmi-note{margin:10px 0 12px}
@media(max-width:480px){
  .health-summary-grid{grid-template-columns:1fr}
}


/* PEA v0.8.9.0 – Rezeptkomfort und lokale Fotoerfassung */
.recipe-filter-row{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:10px 0 13px;
}
.recipe-filter-pill{
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--deep);
  padding:7px 11px;
  font-size:12px;
  font-weight:700;
}
.recipe-filter-pill.active{
  color:#fff;
  border-color:var(--teal);
  background:var(--teal);
}
.recipe-list-row.comfort{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:stretch;
}
.recipe-list-row.comfort>.recipe-list-main{
  width:100%;
}
.recipe-list-actions{
  display:flex;
  align-items:center;
  gap:5px;
  padding:7px 8px 7px 0;
}
.recipe-list-actions button{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  color:var(--deep);
  font-weight:800;
}
.recipe-list-actions svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.recipe-photo-drop{
  display:grid;
  place-items:center;
  gap:5px;
  min-height:150px;
  margin:14px 0;
  padding:20px;
  border:2px dashed #9bc9c4;
  border-radius:18px;
  background:var(--soft);
  text-align:center;
  cursor:pointer;
}
.recipe-photo-drop input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.recipe-photo-drop>span{
  font-size:34px;
  color:var(--teal);
}
.recipe-photo-drop small{
  color:var(--muted);
  line-height:1.4;
}
.recipe-photo-preview{
  display:block;
  max-width:100%;
  max-height:340px;
  margin:10px auto;
  border-radius:14px;
  box-shadow:0 8px 24px rgba(0,0,0,.11);
}
.recipe-ocr-work{
  margin:12px 0;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.recipe-ocr-progress{
  height:8px;
  margin-top:8px;
  overflow:hidden;
  border-radius:999px;
  background:#e5efed;
}
.recipe-ocr-progress span{
  display:block;
  width:0;
  height:100%;
  border-radius:999px;
  background:var(--teal);
  transition:width .18s ease;
}
.recipe-ocr-result{
  display:grid;
  gap:8px;
  margin-top:14px;
}
.recipe-ocr-confidence{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:13px;
  background:#edf8f5;
}
.recipe-ocr-confidence span{
  color:var(--muted);
  font-size:12px;
}
.ocr-full-text{
  margin:4px 0 8px;
  color:var(--muted);
}
.ocr-full-text summary{
  cursor:pointer;
  font-size:13px;
  font-weight:700;
}
@media(max-width:520px){
  .recipe-list-row.comfort{
    grid-template-columns:minmax(0,1fr) 94px;
  }
  .recipe-list-actions{
    display:grid;
    grid-template-columns:repeat(2,38px);
    justify-content:end;
    align-content:center;
  }
}


/* PEA v0.8.9.2 – eigene Lebensmittel verwalten */
.food-library-filters{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:10px 0 12px;
}
.food-library-filters button{
  padding:7px 11px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--deep);
  font-size:12px;
  font-weight:800;
}
.food-library-filters button.active{
  color:#fff;
  border-color:var(--teal);
  background:var(--teal);
}
.food-library-manage-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:stretch;
  gap:7px;
  margin-bottom:7px;
}
.food-library-manage-row .food-library-row{margin:0}
.food-library-row.own-main{width:100%}
.food-library-actions{
  display:flex;
  align-items:center;
  gap:6px;
}
.food-library-actions .direct-action{
  width:40px;
  height:40px;
  flex-basis:40px;
}
.own-food-detail-actions{
  display:grid;
  gap:9px;
  margin-top:15px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.own-food-detail-actions .btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.own-food-detail-actions svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.info-box,.warning-box{
  margin-top:11px;
  padding:11px 12px;
  border-radius:13px;
  font-size:12px;
  line-height:1.45;
}
.info-box{
  color:#245c73;
  background:#eef7fb;
  border:1px solid #c6e1ec;
}
.warning-box{
  color:#795713;
  background:#fff8e8;
  border:1px solid #ead7a2;
}
@media(max-width:480px){
  .food-library-manage-row{
    grid-template-columns:minmax(0,1fr) 88px;
  }
  .food-library-actions{gap:4px}
  .food-library-actions .direct-action{
    width:38px;
    height:38px;
    flex-basis:38px;
  }
}


/* PEA v0.8.9.3 – Layoutordnung Phase 1 */
.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.header-actions{
  display:flex;
  align-items:center;
  gap:9px;
}
.header-more{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  color:var(--deep);
  font-weight:900;
  letter-spacing:1px;
}
.header-more.active{
  color:#fff;
  border-color:var(--teal);
  background:var(--teal);
}
.datebar.page-hidden{
  display:none!important;
}
.page-view{
  width:100%;
  max-width:1180px;
}
.page-view>.card{
  width:100%;
}
.page-view .title{
  gap:12px;
  align-items:flex-start;
}
.page-view .title-actions{
  justify-content:flex-end;
}
.side-capture{
  display:none;
}
.side-nav-label{
  display:none;
}
.bottom{
  grid-template-columns:1fr 1.25fr 64px 1fr 1.15fr;
  align-items:end;
}
.bottom button:not(.fab){
  min-width:0;
  min-height:48px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:3px;
  padding:3px 2px;
  line-height:1.05;
  font-size:10.5px;
}
.bottom-icon{
  display:block;
  font-size:18px;
  line-height:1;
}
.bottom .fab{
  align-self:start;
}
@media(max-width:380px){
  .bottom button:not(.fab){
    font-size:9.5px;
  }
  .bottom-icon{
    font-size:17px;
  }
}
@media(min-width:1120px){
  .header-more{
    display:none;
  }
  .side-capture{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    width:100%;
    margin-top:16px;
    padding:12px 14px;
    border:0;
    border-radius:14px;
    color:#fff;
    background:linear-gradient(145deg,var(--mint),var(--teal));
    font-weight:850;
    box-shadow:0 9px 24px rgba(5,85,80,.12);
  }
  .side-capture span{
    font-size:20px;
    line-height:1;
  }
  .side nav{
    margin-top:18px;
  }
  .side-nav-label{
    display:block;
    padding:8px 10px 3px;
    color:var(--muted);
    font-size:10px;
    font-weight:850;
    letter-spacing:.09em;
    text-transform:uppercase;
  }
  .side-nav-label.secondary-label{
    margin-top:10px;
    padding-top:14px;
    border-top:1px solid var(--line);
  }
}

/* Recipe photo: OCR is optional, not a blocker */
.recipe-photo-steps{
  display:grid;
  gap:8px;
  margin:13px 0;
}
.recipe-photo-steps section{
  display:grid;
  grid-template-columns:31px 1fr;
  gap:10px;
  align-items:start;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.step-number{
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#fff;
  background:var(--teal);
  font-weight:900;
  font-size:12px;
}
.recipe-photo-steps b,
.recipe-photo-steps small{
  display:block;
}
.recipe-photo-steps small{
  margin-top:3px;
  color:var(--muted);
  line-height:1.4;
}
.recipe-photo-preview-wrap{
  margin:10px 0 14px;
  text-align:center;
}
.recipe-photo-preview-wrap>span{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:11px;
}
.recipe-text-methods{
  display:grid;
  gap:8px;
  margin:13px 0;
}
.recipe-method-card{
  width:100%;
  display:grid;
  grid-template-columns:38px 1fr;
  gap:10px;
  align-items:center;
  padding:12px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
  color:var(--text);
  text-align:left;
}
.recipe-method-card>span{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--soft);
  color:var(--deep);
  font-size:20px;
  font-weight:900;
}
.recipe-method-card b,
.recipe-method-card small{
  display:block;
}
.recipe-method-card small{
  margin-top:3px;
  color:var(--muted);
  line-height:1.4;
}
.recipe-method-card.experimental{
  border-style:dashed;
}
.recipe-method-card:disabled{
  opacity:.48;
  cursor:not-allowed;
}
.native-text-help{
  margin:13px 0;
  padding:12px;
  border:1px solid #c8e0ec;
  border-radius:14px;
  background:#eef7fb;
  color:#245c73;
}
.native-text-help p{
  margin:7px 0 0;
  font-size:12px;
  line-height:1.45;
}
@media(min-width:680px){
  .recipe-photo-steps{
    grid-template-columns:repeat(3,1fr);
  }
  .recipe-photo-steps section{
    grid-template-columns:31px 1fr;
  }
  .recipe-text-methods{
    grid-template-columns:repeat(3,1fr);
  }
  .recipe-method-card{
    grid-template-columns:1fr;
    align-content:start;
    min-height:132px;
  }
}


/* PEA v0.8.9.4 – Nährwertetikett und erweiterte Produktdaten */
.label-capture-steps{
  display:grid;
  gap:8px;
  margin:13px 0;
}
.label-capture-steps section{
  display:grid;
  grid-template-columns:30px 1fr;
  gap:10px;
  align-items:start;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.label-capture-steps section>span{
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#fff;
  background:var(--teal);
  font-size:12px;
  font-weight:900;
}
.label-capture-steps b,.label-capture-steps small{display:block}
.label-capture-steps small{margin-top:3px;color:var(--muted);line-height:1.4}
.nutrition-photo-drop{min-height:132px}
.nutrition-result-card{
  display:grid;
  gap:10px;
  margin-top:15px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.nutrition-warning-list{
  display:grid;
  gap:7px;
}
.nutrition-warning-list>div{
  display:grid;
  grid-template-columns:25px 1fr;
  gap:8px;
  align-items:start;
  padding:9px 10px;
  border:1px solid #ead7a2;
  border-radius:12px;
  color:#795713;
  background:#fff8e8;
}
.nutrition-warning-list span{
  width:23px;
  height:23px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#fff;
  font-weight:900;
}
.nutrition-warning-list p{margin:2px 0 0;font-size:12px;line-height:1.4}
.nutrition-ok{
  padding:10px 12px;
  border:1px solid #bfe0c9;
  border-radius:12px;
  color:#17633a;
  background:#effaf2;
  font-size:12px;
  font-weight:750;
}
.nutrition-result-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.nutrition-result-grid label>span{
  display:block;
  margin:0 0 5px;
  color:var(--muted);
  font-size:11px;
  font-weight:750;
}
.nutrition-result-grid .wide{grid-column:1/-1}
.label-editor-entry{
  width:100%;
  display:grid;
  grid-template-columns:40px 1fr auto;
  gap:10px;
  align-items:center;
  margin:10px 0 14px;
  padding:12px;
  border:1px solid #9bc9c4;
  border-radius:15px;
  color:var(--text);
  background:var(--soft);
  text-align:left;
}
.label-editor-entry>span{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  color:#fff;
  background:var(--teal);
  font-size:21px;
}
.label-editor-entry b,.label-editor-entry small{display:block}
.label-editor-entry small{margin-top:3px;color:var(--muted);line-height:1.35}
.label-editor-entry strong{font-size:22px;color:var(--deep)}
.label-source-note{
  margin-top:11px;
  padding:10px 12px;
  border:1px solid #bfe0c9;
  border-radius:13px;
  color:#17633a;
  background:#effaf2;
  font-size:12px;
}
.nutrition-detail-card{
  margin:12px 0 0;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.nutrition-detail-card summary{
  padding:11px 12px;
  cursor:pointer;
  color:var(--deep);
  font-size:13px;
  font-weight:800;
}
.nutrition-detail-card>div{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:0 11px 11px;
}
.nutrition-detail-card span{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:9px;
  border-radius:11px;
  background:#f4f8f7;
  color:var(--muted);
  font-size:10px;
}
.nutrition-detail-card b{color:var(--text);font-size:13px}
@media(min-width:680px){
  .label-capture-steps{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:480px){
  .nutrition-result-grid{grid-template-columns:1fr}
  .nutrition-result-grid .wide{grid-column:auto}
}


/* PEA v0.8.9.5 – zuverlässiger Textfluss ohne Browser-OCR */
.capture-fast-path{display:grid;grid-template-columns:42px 1fr;gap:11px;margin:14px 0;padding:13px;border:1px solid #bcded8;border-radius:16px;background:#effaf7}
.capture-fast-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:var(--teal);color:#fff;font-size:22px;font-weight:900}
.capture-fast-path b,.capture-fast-path span,.capture-fast-path small{display:block}
.capture-fast-path span{margin-top:4px;line-height:1.45}
.capture-fast-path small{margin-top:7px;color:var(--muted);line-height:1.4}
.capture-primary-actions,.shared-capture-actions,.capture-photo-actions{display:grid;gap:9px;margin:12px 0}
.capture-primary-actions .btn,.shared-capture-actions .btn,.capture-photo-actions .btn{width:100%}
.capture-photo-helper{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:15px;background:#fff}
.capture-photo-helper summary{cursor:pointer;color:var(--deep);font-weight:850}
.capture-photo-helper>p{color:var(--muted);font-size:12px;line-height:1.45}
.capture-ios-note{display:grid;gap:3px;margin:12px 0 16px;padding:11px 12px;border-left:4px solid #86a7c8;border-radius:9px;background:#f1f6fb}
.capture-ios-note span{color:var(--muted);font-size:12px;line-height:1.4}
.paste-attention{animation:peaPasteAttention 1.1s ease-in-out 2;outline:4px solid rgba(8,127,120,.18)}
@keyframes peaPasteAttention{50%{transform:scale(1.015);box-shadow:0 0 0 7px rgba(8,127,120,.10)}}
.shared-capture-preview{max-height:260px;overflow:auto;margin:13px 0;padding:12px;border:1px solid var(--line);border-radius:14px;background:#f8faf9;white-space:pre-wrap;line-height:1.45;font-size:12px}
@media(min-width:680px){.capture-primary-actions,.capture-photo-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* PEA v0.9.0 – Profilbilder und persönliche Farbschemata */
body,
.side,
.card,
.btn,
.pill,
.bottom button,
.datebar button,
.profile-choice{
  transition:background-color .18s ease,border-color .18s ease,color .18s ease;
}

.profile-avatar-shell{
  position:relative;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  overflow:hidden;
  border-radius:50%;
  border:3px solid var(--profile-ring,var(--profile-primary));
  background:var(--profile-soft,var(--soft));
  color:var(--profile-ring,var(--profile-primary));
  box-shadow:0 0 0 2px #fff;
}
.profile-avatar-shell img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.profile-avatar-fallback{
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  font-weight:900;
  letter-spacing:.02em;
}
.profile-avatar-fill{
  width:100%;
  height:100%;
  border-width:0;
  box-shadow:none;
}
.profile-avatar,
.avatar{
  padding:0;
  overflow:visible;
  background:transparent!important;
  border:0!important;
}
.profile-avatar .profile-avatar-shell,
.avatar .profile-avatar-shell{
  width:100%;
  height:100%;
}
.profile-card{
  border-left:4px solid var(--profile-ring,var(--profile-primary))!important;
}
.profile-picker-note{
  margin:6px 0 14px;
}
.profile-picker-grid{
  display:grid;
  gap:10px;
}
.profile-choice-row{
  grid-template-columns:minmax(0,1fr) 48px;
}
.profile-choice{
  position:relative;
  min-height:82px;
  gap:13px;
  padding:11px 12px;
}
.profile-choice.selected{
  border-color:var(--profile-primary);
  box-shadow:0 0 0 2px color-mix(in srgb,var(--profile-primary) 18%,transparent);
}
.profile-picker-avatar{
  width:58px;
  height:58px;
  font-size:20px;
}
.profile-choice-copy{
  min-width:0;
  flex:1;
}
.profile-choice-copy b,
.profile-choice-copy small,
.profile-choice-copy em{
  display:block;
}
.profile-choice-copy em{
  margin-top:5px;
  color:var(--profile-primary);
  font-size:11px;
  font-style:normal;
  font-weight:800;
}
.profile-active-mark{
  width:24px;
  height:24px;
  display:grid!important;
  place-items:center;
  border-radius:50%;
  background:var(--profile-primary);
  color:#fff;
  font-weight:900;
}
.profile-detail-head{
  padding:12px;
  border:1px solid var(--line);
  border-radius:17px;
  background:var(--soft);
}
.profile-detail-head .profile-large-avatar{
  width:76px;
  height:76px;
  flex-basis:76px;
  font-size:25px;
}
.profile-detail-head>div em{
  display:block;
  margin-top:6px;
  color:var(--profile-primary);
  font-size:12px;
  font-style:normal;
  font-weight:800;
}
.profile-identity-editor{
  display:grid;
  grid-template-columns:118px minmax(0,1fr);
  gap:15px;
  align-items:center;
  margin:10px 0 4px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--soft);
}
.profile-editor-avatar{
  width:112px;
  height:112px;
  font-size:36px;
}
.profile-image-controls{
  display:grid;
  gap:7px;
}
.profile-image-controls>b,
.profile-image-controls>span{
  display:block;
}
.profile-image-controls>span{
  color:var(--muted);
  font-size:12px;
}
.profile-image-controls .btn{
  padding:10px 12px;
  font-size:12px;
}
.profile-image-button{
  display:block;
  text-align:center;
  cursor:pointer;
}
.profile-image-button input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.profile-theme-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:7px;
}
.profile-theme-choice{
  display:grid;
  gap:7px;
  justify-items:center;
  min-width:0;
  padding:10px 6px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  color:var(--text);
}
.profile-theme-choice.selected{
  border-color:var(--profile-primary);
  outline:2px solid color-mix(in srgb,var(--profile-primary) 18%,transparent);
}
.profile-theme-choice b{
  font-size:11px;
}
.profile-theme-swatches{
  display:flex;
  align-items:center;
}
.profile-theme-swatches i{
  width:20px;
  height:20px;
  border:2px solid #fff;
  border-radius:50%;
  box-shadow:0 1px 4px rgba(20,40,39,.16);
}
.profile-theme-swatches i+i{
  margin-left:-6px;
}
.profile-cropper-overlay{
  position:fixed;
  inset:0;
  z-index:80;
  display:grid;
  place-items:center;
  padding:16px;
  background:rgba(9,32,31,.72);
  backdrop-filter:blur(4px);
}
.profile-cropper-card{
  width:min(520px,100%);
  max-height:calc(100vh - 32px);
  overflow:auto;
  padding:15px;
  border-radius:22px;
  background:#f9fcfb;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}
.profile-cropper-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}
.profile-cropper-head b,
.profile-cropper-head span{
  display:block;
}
.profile-cropper-head span{
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}
.profile-cropper-head button{
  width:38px;
  height:38px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  font-size:24px;
}
#profileCropCanvas{
  display:block;
  width:min(100%,420px);
  height:auto;
  margin:auto;
  border:4px solid #fff;
  border-radius:18px;
  box-shadow:0 8px 25px rgba(0,0,0,.15);
  touch-action:none;
  cursor:grab;
}
#profileCropCanvas:active{
  cursor:grabbing;
}
.profile-zoom-label{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  align-items:center;
  margin:14px 2px;
  color:var(--muted);
  font-size:12px;
}
.profile-zoom-label input{
  width:100%;
  accent-color:var(--profile-primary);
}
.profile-cropper-actions{
  display:grid;
  grid-template-columns:1fr 1.4fr;
  gap:9px;
}
@media(min-width:620px){
  .profile-picker-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:620px){
  .profile-theme-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .profile-identity-editor{
    grid-template-columns:92px minmax(0,1fr);
  }
  .profile-editor-avatar{
    width:88px;
    height:88px;
    font-size:28px;
  }
}


/* PEA v0.9.1 – transparenter Tagesziel-Rechner */
.profile-section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.profile-section-title-row h3{margin:0}
.profile-section-title-row small{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.btn.compact{width:auto;padding:9px 12px;font-size:12px}
.target-source-status{display:grid;gap:3px;margin:8px 0 12px;padding:10px 12px;border:1px solid var(--line);border-radius:13px}
.target-source-status b,.target-source-status span{display:block}
.target-source-status span{color:var(--muted);font-size:11px;line-height:1.4}
.target-source-status.calculated{border-color:color-mix(in srgb,var(--profile-primary) 32%,var(--line));background:var(--profile-soft)}
.target-source-status.manual{background:#f8faf9}
.profile-target-card>b small{display:block;margin-top:4px;color:var(--muted);font-size:10px;font-weight:700}
.energy-target-overlay{position:fixed;inset:0;z-index:85;display:grid;place-items:center;padding:15px;background:rgba(9,32,31,.72);backdrop-filter:blur(4px)}
.energy-target-card{width:min(620px,100%);max-height:calc(100vh - 30px);overflow:auto;padding:16px;border-radius:22px;background:#f9fcfb;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.energy-target-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.energy-target-head b,.energy-target-head span{display:block}
.energy-target-head span{margin-top:3px;color:var(--muted);font-size:12px}
.energy-target-head button{width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--text);font-size:24px}
.energy-result{display:grid;justify-items:center;gap:4px;margin:14px 0;padding:17px;border:1px solid color-mix(in srgb,var(--profile-primary) 25%,var(--line));border-radius:18px;background:var(--profile-soft);text-align:center}
.energy-result span{color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.energy-result strong{color:var(--profile-primary);font-size:31px}
.energy-result small{color:var(--muted);line-height:1.4}
.energy-formula-title{margin:14px 0 8px;color:var(--text);font-size:12px;font-weight:850}
.energy-step-list{display:grid;gap:7px}
.energy-step{display:grid;grid-template-columns:29px minmax(0,1fr);gap:9px;align-items:center;padding:9px 10px;border:1px solid var(--line);border-radius:13px;background:#fff}
.energy-step>span{width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:var(--profile-primary);color:#fff;font-size:11px;font-weight:900}
.energy-step b,.energy-step em{display:block}
.energy-step em{margin-top:2px;color:var(--muted);font-size:11px;font-style:normal}
.energy-calculation-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.energy-calculation-summary>div{padding:10px;border-radius:13px;background:#fff;border:1px solid var(--line)}
.energy-calculation-summary span,.energy-calculation-summary b{display:block}
.energy-calculation-summary span{color:var(--muted);font-size:10px}
.energy-calculation-summary b{margin-top:3px;font-size:13px}
.energy-macro-card{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:15px;background:#fff}
.energy-macro-card>div:first-child b,.energy-macro-card>div:first-child span{display:block}
.energy-macro-card>div:first-child span{margin-top:3px;color:var(--muted);font-size:11px}
.energy-macro-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}
.energy-macro-values span{padding:8px 5px;border-radius:11px;background:var(--profile-soft);text-align:center;font-size:10px}
.energy-macro-values b{display:block;margin-bottom:2px;color:var(--profile-primary);font-size:14px}
.energy-macro-toggle{display:flex;align-items:flex-start;gap:9px;margin-top:11px;padding-top:10px;border-top:1px solid var(--line);font-size:12px;line-height:1.4}
.energy-macro-toggle input{width:18px;height:18px;flex:0 0 auto;accent-color:var(--profile-primary)}
.energy-warning{display:grid;grid-template-columns:27px 1fr;gap:9px;align-items:start;margin:8px 0;padding:9px 10px;border:1px solid #efcf9e;border-radius:13px;background:#fff7ea}
.energy-warning>span{width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#a86418;color:#fff;font-weight:900}
.energy-warning p{margin:3px 0 0;font-size:11px;line-height:1.4}
.energy-source-notes{margin:12px 0;padding:10px 12px;border:1px solid var(--line);border-radius:13px;background:#fff}
.energy-source-notes summary{cursor:pointer;font-size:12px;font-weight:850}
.energy-source-notes ul{margin:9px 0 0;padding-left:18px;color:var(--muted);font-size:11px;line-height:1.5}
.energy-target-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:9px;margin-top:14px}
@media(max-width:520px){
  .profile-section-title-row{align-items:stretch;flex-direction:column}
  .profile-section-title-row .btn{width:100%}
  .energy-target-actions{grid-template-columns:1fr}
}


/* PEA v0.9.2 – neu gestaltete Auswertung */
.history-dashboard{gap:12px}
.history-range-card{
  padding:14px;
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(145deg,#fff,var(--profile-soft));
  box-shadow:var(--shadow);
}
.history-range-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.history-range-top span,
.history-range-top b{
  display:block;
}
.history-range-top span{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.history-range-top b{
  margin-top:3px;
  font-size:16px;
}
.history-today-button{
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 11px;
  background:#fff;
  color:var(--profile-primary);
  font-size:11px;
  font-weight:850;
}
.history-range-controls{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 38px;
  gap:8px;
  align-items:center;
  margin-top:12px;
}
.history-period-arrow{
  width:38px;
  height:38px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--profile-primary);
  font-size:24px;
  line-height:1;
}
.history-period-arrow:disabled{
  opacity:.35;
}
.history-range-buttons{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
}
.history-range-button{
  min-width:0;
  border:1px solid var(--line);
  border-radius:11px;
  padding:9px 5px;
  background:#fff;
  color:var(--text);
  font-size:11px;
  font-weight:800;
}
.history-range-button.active{
  border-color:var(--profile-primary);
  background:var(--profile-primary);
  color:#fff;
}
.history-kpi-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.history-kpi{
  min-width:0;
  padding:13px;
  border:1px solid var(--line);
  border-radius:17px;
  background:#fff;
  box-shadow:0 8px 22px rgba(20,55,52,.045);
}
.history-kpi span,
.history-kpi strong,
.history-kpi small{
  display:block;
}
.history-kpi span{
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.history-kpi strong{
  margin-top:5px;
  color:var(--profile-primary);
  font-size:21px;
  letter-spacing:-.04em;
}
.history-kpi small{
  min-height:28px;
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}
.history-section-card{
  overflow:hidden;
}
.history-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.history-section-head>div:first-child span,
.history-section-head h2{
  display:block;
}
.history-section-head>div:first-child span{
  color:var(--profile-primary);
  font-size:10px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.history-section-head h2{
  margin:3px 0 0;
  font-size:21px;
}
.history-section-meta{
  text-align:right;
}
.history-section-meta b,
.history-section-meta small{
  display:block;
}
.history-section-meta b{
  color:var(--profile-primary);
  font-size:14px;
}
.history-section-meta small{
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}
.history-weight-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin:8px 0 12px;
}
.history-weight-summary>div{
  min-width:0;
  padding:9px;
  border-radius:12px;
  background:var(--profile-soft);
}
.history-weight-summary span,
.history-weight-summary b{
  display:block;
}
.history-weight-summary span{
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.history-weight-summary b{
  margin-top:3px;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--profile-primary);
  font-size:13px;
  white-space:nowrap;
}
.history-chart-scroll{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(180deg,#fff,#fbfdfc);
  scrollbar-width:thin;
}
.history-chart{
  display:block;
  width:100%;
  height:auto;
}
.history-grid-line{
  stroke:var(--line);
  stroke-width:1;
}
.history-axis-label{
  fill:var(--muted);
  font-size:10px;
}
.history-target-line{
  stroke:#8c6a2e;
  stroke-width:1.5;
  stroke-dasharray:7 5;
}
.history-target-label{
  fill:#8c6a2e;
  font-size:10px;
  font-weight:800;
}
.history-weight-line{
  fill:none;
  stroke:var(--profile-primary);
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.history-weight-trend{
  stroke:color-mix(in srgb,var(--profile-primary) 58%,#fff);
  stroke-width:3;
  stroke-dasharray:9 6;
}
.history-weight-point{
  cursor:pointer;
}
.history-weight-point circle{
  fill:#fff;
  stroke:var(--profile-primary);
  stroke-width:3;
}
.history-weight-point:hover circle{
  fill:var(--profile-soft);
}
.history-calorie-bar{
  cursor:pointer;
}
.history-calorie-bar.below{
  fill:color-mix(in srgb,var(--profile-primary) 32%,#fff);
}
.history-calorie-bar.near{
  fill:var(--profile-primary);
}
.history-calorie-bar.above{
  fill:color-mix(in srgb,var(--profile-primary) 72%,#263b39);
}
.history-calorie-bar.no-data{
  fill:transparent;
  stroke:var(--line);
  stroke-width:1;
  stroke-dasharray:2 2;
}
.history-legend,
.history-calorie-legend{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  margin-top:9px;
  color:var(--muted);
  font-size:10px;
}
.history-legend span,
.history-calorie-legend span{
  display:flex;
  align-items:center;
  gap:5px;
}
.history-legend i,
.history-calorie-legend i{
  width:18px;
  height:4px;
  display:inline-block;
  border-radius:999px;
}
.legend-actual{background:var(--profile-primary)}
.legend-trend{background:color-mix(in srgb,var(--profile-primary) 58%,#fff)}
.legend-target{border-top:2px dashed #8c6a2e}
.calorie-below{background:color-mix(in srgb,var(--profile-primary) 32%,#fff)}
.calorie-near{background:var(--profile-primary)}
.calorie-above{background:color-mix(in srgb,var(--profile-primary) 72%,#263b39)}
.calorie-empty{border:1px dashed var(--line);background:transparent}
.history-context-note{
  margin:10px 0 0;
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}
.history-chart-empty{
  display:grid;
  justify-items:center;
  gap:5px;
  padding:30px 14px;
  border:1px dashed var(--line);
  border-radius:16px;
  color:var(--muted);
  text-align:center;
}
.history-chart-empty.compact{
  padding:18px 12px;
}
.history-chart-empty>span{
  font-size:27px;
}
.history-chart-empty b{
  color:var(--text);
  font-size:13px;
}
.history-chart-empty small{
  max-width:330px;
  font-size:10px;
  line-height:1.45;
}
.history-weight-list{
  max-height:300px;
  overflow:auto;
  margin-top:8px;
  padding-top:2px;
}
.history-macro-list{
  display:grid;
  gap:15px;
}
.history-macro-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.history-macro-head span{
  color:var(--text);
  font-size:12px;
  font-weight:800;
}
.history-macro-head b{
  color:var(--profile-primary);
  font-size:12px;
}
.history-macro-track{
  height:10px;
  overflow:hidden;
  margin-top:7px;
  border-radius:999px;
  background:var(--profile-soft);
}
.history-macro-track i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--profile-primary),var(--mint));
}
.history-macro-row small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:9px;
}
.history-macro-energy{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:16px;
  padding:10px 12px;
  border-radius:12px;
  background:#f7faf9;
  color:var(--muted);
  font-size:11px;
}
.history-macro-energy b{
  color:var(--text);
}
.history-day-list{
  display:grid;
  gap:6px;
}
.history-day-row{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.25fr) 18px;
  gap:10px;
  align-items:center;
  width:100%;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  color:var(--text);
  text-align:left;
}
.history-day-date b,
.history-day-date small,
.history-day-energy b,
.history-day-energy small{
  display:block;
}
.history-day-date b{
  font-size:11px;
}
.history-day-date small,
.history-day-energy small{
  margin-top:2px;
  color:var(--muted);
  font-size:9px;
  line-height:1.35;
}
.history-day-energy{
  text-align:right;
}
.history-day-energy b{
  color:var(--profile-primary);
  font-size:12px;
}
.history-day-arrow{
  color:var(--profile-primary);
  font-size:20px;
}
.history-list-toggle{
  width:100%;
  border:0;
  padding:10px;
  background:none;
  color:var(--profile-primary);
  font-size:11px;
  font-weight:850;
}
.history-future-card{
  padding:14px;
  border:1px dashed color-mix(in srgb,var(--profile-primary) 35%,var(--line));
  border-radius:18px;
  background:var(--profile-soft);
}
.history-future-card span,
.history-future-card b{
  display:block;
}
.history-future-card span{
  color:var(--profile-primary);
  font-size:9px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.history-future-card b{
  margin-top:3px;
  font-size:14px;
}
.history-future-card p{
  margin:7px 0 0;
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}
.history-loading-card{
  display:flex;
  align-items:center;
  gap:12px;
}
.history-loading-card b,
.history-loading-card small{
  display:block;
}
.history-loading-card small{
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.history-loading-dot{
  width:18px;
  height:18px;
  flex:0 0 auto;
  border:3px solid var(--line);
  border-top-color:var(--profile-primary);
  border-radius:50%;
  animation:historySpin .8s linear infinite;
}
@keyframes historySpin{to{transform:rotate(360deg)}}
@media(min-width:650px){
  .history-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:480px){
  .history-range-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
  .history-section-head{align-items:flex-start}
  .history-section-head .btn{width:auto;max-width:150px}
  .history-day-row{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr) 14px}
}


/* PEA v0.9.3 – rücknehmbarer Testimport */
.import-privacy-card{
  margin:8px 0 13px;
  padding:13px;
  border:1px solid color-mix(in srgb,var(--profile-primary) 28%,var(--line));
  border-radius:16px;
  background:var(--profile-soft);
}
.import-privacy-card span,
.import-privacy-card b{
  display:block;
}
.import-privacy-card span{
  color:var(--profile-primary);
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.import-privacy-card b{
  margin-top:4px;
  font-size:14px;
}
.import-privacy-card p{
  margin:6px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}
.import-preview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:10px 0;
}
.import-preview-grid>div{
  min-width:0;
  padding:11px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.import-preview-grid span,
.import-preview-grid b{
  display:block;
}
.import-preview-grid span{
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.import-preview-grid b{
  margin-top:4px;
  color:var(--profile-primary);
  font-size:18px;
}
.import-preview-grid.report b{
  font-size:20px;
}
.import-validation{
  display:grid;
  grid-template-columns:29px minmax(0,1fr);
  gap:10px;
  align-items:center;
  margin:10px 0 14px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:14px;
}
.import-validation>span{
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#fff;
  font-weight:900;
}
.import-validation.good{
  background:#edf8f1;
}
.import-validation.good>span{
  background:#2f7d4a;
}
.import-validation.warn{
  background:#fff7ea;
}
.import-validation.warn>span{
  background:#a86418;
}
.import-validation b,
.import-validation small{
  display:block;
}
.import-validation b{
  font-size:12px;
}
.import-validation small{
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}
.import-option-list{
  display:grid;
  gap:8px;
  margin:10px 0;
}
.import-option-list label{
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  gap:10px;
  align-items:start;
  padding:11px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.import-option-list input{
  width:19px;
  height:19px;
  margin-top:1px;
  accent-color:var(--profile-primary);
}
.import-option-list b,
.import-option-list small{
  display:block;
}
.import-option-list b{
  font-size:12px;
}
.import-option-list small{
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}
.import-not-included{
  margin:10px 0 14px;
  padding:10px 12px;
  border-radius:13px;
  background:#f7faf9;
}
.import-not-included b,
.import-not-included span{
  display:block;
}
.import-not-included b{
  font-size:11px;
}
.import-not-included span{
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
}
.import-report-head{
  margin:8px 0 12px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f7faf9;
}
.import-report-head.active{
  border-color:color-mix(in srgb,var(--profile-primary) 32%,var(--line));
  background:var(--profile-soft);
}
.import-report-head.rolled-back{
  background:#f1f3f2;
}
.import-report-head span,
.import-report-head b,
.import-report-head small{
  display:block;
}
.import-report-head span{
  color:var(--profile-primary);
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.import-report-head b{
  margin-top:4px;
  font-size:16px;
}
.import-report-head small{
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
}


/* PEA v0.9.5 – eindeutige Bearbeitung und Mengensteuerung */
.direct-entry-row:not(.weight-entry-row) .direct-entry-main{
  cursor:default;
  user-select:text;
}
.portion-stepper{
  display:grid;
  grid-template-columns:52px minmax(90px,1fr) 52px;
  gap:8px;
  align-items:center;
}
.portion-stepper button{
  height:48px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--profile-soft);
  color:var(--profile-primary);
  font-size:24px;
  font-weight:900;
}
.portion-stepper input{
  width:100%;
  height:48px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  color:var(--text);
  font:inherit;
  font-size:18px;
  font-weight:850;
  text-align:center;
}
.portion-stepper input:focus{
  outline:2px solid color-mix(in srgb,var(--profile-primary) 32%,transparent);
  border-color:var(--profile-primary);
}
.portion-calculation-summary{
  margin:9px 0 12px;
  padding:10px 12px;
  border:1px solid color-mix(in srgb,var(--profile-primary) 22%,var(--line));
  border-radius:13px;
  background:var(--profile-soft);
}
.portion-calculation-summary b,
.portion-calculation-summary span{
  display:block;
}
.portion-calculation-summary b{
  color:var(--profile-primary);
  font-size:12px;
}
.portion-calculation-summary span{
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}
.label small{
  color:var(--muted);
  font-size:9px;
  font-weight:500;
}

/* PEA v0.9.6 – Punkte-Labor, Alltagsportionen und historische Kalibrierung */
.hero-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.energy-mode-switch{
  display:inline-grid;
  grid-auto-flow:column;
  gap:3px;
  padding:3px;
  border:1px solid color-mix(in srgb,var(--profile-primary) 18%,var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--profile-soft) 72%,#fff);
}
.energy-mode-switch button{
  border:0;
  border-radius:999px;
  padding:6px 9px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}
.energy-mode-switch button.active{
  background:#fff;
  color:var(--profile-primary);
  box-shadow:0 2px 8px rgba(27,46,43,.08);
}
.points-hero .energy small{
  font-size:.34em;
  font-weight:750;
}
.reflection-card>p{
  margin:0 0 14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.reflection-question{
  display:grid;
  gap:7px;
  padding:11px 0;
  border-top:1px solid var(--line);
}
.reflection-question>b{
  font-size:12px;
}
.reflection-question>div{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}
.reflection-option{
  min-height:39px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  font:inherit;
  font-size:11px;
  font-weight:750;
}
.reflection-option.selected{
  border-color:var(--profile-primary);
  background:var(--profile-soft);
  color:var(--profile-primary);
}
.everyday-portion-pills .pill{
  border-style:dashed;
}
.household-portion-list{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-bottom:10px;
}
.household-portion-list>div{
  display:flex;
  align-items:center;
  gap:2px;
  padding:2px;
  border:1px solid color-mix(in srgb,var(--profile-primary) 18%,var(--line));
  border-radius:999px;
  background:var(--profile-soft);
}
.household-portion-list .pill{
  margin:0;
  border:0;
  background:transparent;
}
.household-delete{
  width:28px;
  height:28px;
  border:0;
  border-radius:50%;
  background:#fff;
  color:var(--muted);
  font-size:17px;
  line-height:1;
}
.household-portion-editor{
  margin:10px 0 13px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
}
.household-portion-editor summary{
  padding:11px 12px;
  color:var(--profile-primary);
  cursor:pointer;
  font-size:11px;
  font-weight:800;
}
.household-portion-editor>div{
  display:grid;
  gap:8px;
  padding:0 12px 12px;
}
.lab-goal-picker{
  display:grid;
  grid-template-columns:1fr repeat(3,auto);
  gap:6px;
  align-items:center;
  margin:14px 0;
}
.lab-goal-picker>span{
  color:var(--muted);
  font-size:11px;
  font-weight:750;
}
.lab-goal-picker button{
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 9px;
  background:#fff;
  color:var(--muted);
  font:inherit;
  font-size:10px;
  font-weight:800;
}
.lab-goal-picker button.active{
  border-color:var(--profile-primary);
  background:var(--profile-soft);
  color:var(--profile-primary);
}
.lab-quality-card{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:15px;
  background:color-mix(in srgb,var(--profile-soft) 58%,#fff);
}
.lab-quality-card>div{
  display:grid;
  gap:3px;
}
.lab-quality-card span,
.lab-model-card span,
.lab-observed-grid span{
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.lab-quality-card b{
  font-size:12px;
}
.lab-quality-card.high{
  border-color:color-mix(in srgb,#2f7d4a 35%,var(--line));
}
.lab-quality-card.medium{
  border-color:color-mix(in srgb,#a86418 35%,var(--line));
}
.lab-model-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:12px 0;
}
.lab-model-card{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
  padding:12px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
}
.lab-model-card.recommended{
  border-color:var(--profile-primary);
  background:var(--profile-soft);
}
.lab-model-card.unavailable{
  opacity:.62;
}
.lab-model-card b{
  font-size:15px;
}
.lab-model-card strong{
  color:var(--profile-primary);
  font-size:18px;
}
.lab-model-card small{
  min-height:30px;
  color:var(--muted);
  font-size:9px;
  line-height:1.35;
}
.lab-model-card .btn{
  margin-top:auto;
  white-space:normal;
}
.lab-observed-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}
.lab-observed-grid article{
  display:grid;
  gap:5px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.lab-observed-grid b{
  font-size:13px;
}
.lab-observed-grid small{
  color:var(--muted);
  font-size:9px;
}
.lab-import-note{
  display:grid;
  gap:4px;
  margin:12px 0;
  padding:12px;
  border-radius:14px;
  background:var(--profile-soft);
}
.lab-import-note b{
  color:var(--profile-primary);
  font-size:12px;
}
.lab-import-note span{
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}
.lab-food-analysis{
  margin:12px 0;
  padding:12px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
}
.lab-food-analysis h3{
  margin:3px 0 8px;
  font-size:12px;
}
.lab-food-analysis>div{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin-bottom:14px;
}
.lab-food-analysis>div>span{
  display:grid;
  gap:2px;
  padding:8px;
  border-radius:10px;
  background:var(--profile-soft);
}
.lab-food-analysis b{
  font-size:10px;
}
.lab-food-analysis small{
  color:var(--muted);
  font-size:8px;
  line-height:1.35;
}
.history-range-top>div:last-child{
  display:flex;
  align-items:center;
  gap:8px;
}
.reflection-history-card .history-weight-summary{
  margin-bottom:8px;
}
@media(max-width:720px){
  .hero-topline{
    align-items:flex-start;
    flex-direction:column;
  }
  .lab-goal-picker{
    grid-template-columns:1fr;
  }
  .lab-goal-picker>span{
    margin-bottom:2px;
  }
  .lab-model-grid{
    grid-template-columns:1fr;
  }
  .lab-observed-grid,
  .lab-quality-card,
  .lab-food-analysis>div{
    grid-template-columns:1fr;
  }
  .history-range-top>div:last-child{
    align-items:flex-end;
    flex-direction:column;
  }
}

/* PEA v0.9.6 – grob anpassbare Alltagsgerichte */
.everyday-component-panel{
  margin:10px 0 14px;
  padding:12px;
  border:1px solid color-mix(in srgb,var(--profile-primary) 20%,var(--line));
  border-radius:15px;
  background:color-mix(in srgb,var(--profile-soft) 70%,#fff);
}
.everyday-component-head b,.everyday-component-head span{display:block}
.everyday-component-head b{color:var(--profile-primary);font-size:13px}
.everyday-component-head span{margin-top:3px;color:var(--muted);font-size:10px;line-height:1.4}
.everyday-component-row{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1.6fr);gap:8px;align-items:center;margin-top:10px}
.everyday-component-row>span{font-size:11px;font-weight:800}
.everyday-component-row>div{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end}
.everyday-component-row button,.component-reset{
  border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--text);font:inherit;font-size:10px;font-weight:750;padding:7px 9px
}
.everyday-component-row button.active{background:var(--profile-primary);border-color:var(--profile-primary);color:#fff}
.component-reset{display:block;margin:11px 0 0 auto;color:var(--profile-primary)}
@media(max-width:560px){.everyday-component-row{grid-template-columns:1fr}.everyday-component-row>div{justify-content:flex-start}}


/* PEA v0.9.7 – eindeutiges Datum, Mahlzeitenschaltflächen und einheitliches Logo */
.brand-logo{
  display:block!important;
  width:46px;
  height:46px;
  flex:0 0 auto;
  border-radius:14px;
}
.side .brand-logo{width:54px;height:54px}
.login-logo{width:82px!important;height:82px!important;margin:0 auto;border-radius:21px}
.login-old-logo{display:none!important}
.entry-context-card{
  margin:12px 0 16px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:17px;
  background:var(--profile-soft);
}
.entry-context-card.compact{margin:8px 0 12px}
.entry-context-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}
.entry-context-heading span{font-size:11px;color:var(--muted);font-weight:750;text-transform:uppercase;letter-spacing:.05em}
.entry-context-heading b{text-align:right;color:var(--profile-primary);font-size:13px}
.entry-date-presets{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.entry-date-presets button,.edit-date-controls button,.batch-select-actions button{
  border:1px solid var(--line);background:#fff;color:var(--text);border-radius:11px;padding:9px 8px;font-weight:800;font-size:12px
}
.entry-date-presets button.active,.edit-date-controls button.active{background:var(--profile-primary);color:#fff;border-color:var(--profile-primary)}
.entry-date-picker{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:9px 0 11px;color:var(--muted);font-size:11px}
.entry-date-picker input{border:1px solid var(--line);background:#fff;border-radius:10px;padding:7px 9px;color:var(--text)}
.entry-meal-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.entry-meal-buttons button{
  min-width:0;border:1px solid var(--line);background:#fff;color:var(--text);border-radius:12px;padding:10px 5px;font-weight:800;font-size:11px
}
.entry-meal-buttons button span{display:block;margin-top:3px;overflow:hidden;text-overflow:ellipsis}
.entry-meal-buttons button.active{background:var(--profile-primary);color:#fff;border-color:var(--profile-primary)}
.entry-source{margin:-5px 0 12px;color:var(--muted);font-size:11px;line-height:1.4}
.late-night-prompt{padding:5px 2px 12px;text-align:center}
.late-night-clock{display:inline-block;padding:6px 10px;border-radius:999px;background:var(--profile-soft);color:var(--profile-primary);font-size:12px;font-weight:850}
.late-night-prompt h2{margin:16px 0 8px}
.late-night-prompt p{color:var(--muted);line-height:1.5}
.late-night-date-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0 13px}
.late-night-date-options button{border:1px solid var(--line);background:#fff;border-radius:17px;padding:18px 12px;color:var(--text)}
.late-night-date-options button:first-child{border-color:var(--profile-primary);background:var(--profile-soft)}
.late-night-date-options b,.late-night-date-options span{display:block}
.late-night-date-options b{font-size:18px;color:var(--profile-primary)}
.late-night-date-options span{margin-top:6px;font-size:11px;color:var(--muted)}
.late-night-prompt small{color:var(--muted);line-height:1.45}
.meals-title .title-actions{display:flex;align-items:center;gap:7px}
.meals-title .title-actions>button{width:auto}
.batch-select-actions{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}
.move-entry-list{display:grid;gap:7px;max-height:310px;overflow:auto;padding:2px}
.move-entry-row{display:grid;grid-template-columns:25px 1fr;gap:9px;align-items:center;border:1px solid var(--line);border-radius:13px;background:#fff;padding:11px;cursor:pointer}
.move-entry-row.selected{border-color:var(--profile-primary);background:var(--profile-soft)}
.move-entry-row input{width:18px;height:18px;accent-color:var(--profile-primary)}
.move-entry-row b,.move-entry-row small{display:block}
.move-entry-row small{margin-top:3px;color:var(--muted);font-size:10px}
.move-target-card{margin:14px 0;padding:13px;border:1px solid var(--line);border-radius:15px;background:#fff}
.move-target-card .label{margin-top:0}
.move-target-card .input{margin:8px 0 12px}
.move-meal-buttons{grid-template-columns:repeat(5,1fr)}
.move-meal-buttons button:first-child{grid-column:auto}
.edit-date-controls{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:8px}
.edit-meal-buttons{margin-bottom:12px}
.btn:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:620px){
  .entry-meal-buttons{grid-template-columns:1fr 1fr}
  .move-meal-buttons{grid-template-columns:1fr 1fr}
  .late-night-date-options{grid-template-columns:1fr}
  .entry-context-heading{display:block}
  .entry-context-heading b{display:block;text-align:left;margin-top:4px}
  .meals-title{align-items:flex-start}
  .meals-title .title-actions{flex-wrap:wrap;justify-content:flex-end}
}


/* PEA v0.9.8 – gerätebezogene Kompaktansicht */
.density-toggle{
  width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--line);
  border-radius:12px;background:#fff;color:var(--profile-primary);font-size:18px;font-weight:900
}
.density-mode-switch{
  display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border:1px solid var(--line);
  border-radius:14px;background:var(--profile-soft);max-width:360px
}
.density-mode-switch button{
  min-height:42px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-weight:850
}
.density-mode-switch button.active{background:#fff;color:var(--profile-primary);box-shadow:0 2px 8px rgba(27,46,43,.08)}
.compact-entry-context-topline{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-bottom:7px}
.compact-entry-date,.compact-entry-today{
  min-height:43px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--text);text-align:left;padding:7px 10px
}
.compact-entry-date span,.compact-entry-date b{display:block}
.compact-entry-date span{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.05em;font-weight:800}
.compact-entry-date b{margin-top:2px;color:var(--profile-primary);font-size:12px}
.compact-entry-today{width:auto;text-align:center;font-size:11px;font-weight:850}
.compact-entry-today.active{background:var(--profile-primary);color:#fff;border-color:var(--profile-primary)}
.compact-meal-buttons{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.compact-meal-buttons button{min-height:43px;padding:6px 3px}
.compact-meal-buttons button span{font-size:9px;margin-top:1px}
.meal small em{font-style:normal;color:var(--profile-primary);font-weight:800}

body.density-compact .content{padding:10px 10px 82px}
body.density-compact header{margin-bottom:7px}
body.density-compact .brand-logo{width:38px;height:38px;border-radius:11px}
body.density-compact .brand b{font-size:24px;letter-spacing:-1px}
body.density-compact .brand small{font-size:9px}
body.density-compact .avatar,body.density-compact .header-more{width:40px;height:40px}
body.density-compact .header-actions{gap:6px}
body.density-compact .datebar{grid-template-columns:42px 1fr 42px;gap:6px;margin-bottom:8px}
body.density-compact .datebar button{min-height:43px;border-radius:13px}
body.density-compact .date{padding:6px 10px}
body.density-compact .date span{font-size:10px}
body.density-compact .date b{font-size:15px}
body.density-compact .dashboard{gap:9px}
body.density-compact .card{padding:12px;border-radius:17px;box-shadow:0 5px 18px rgba(5,85,80,.045)}
body.density-compact .title{margin-bottom:5px}
body.density-compact .title h2{font-size:17px}
body.density-compact .eyebrow{font-size:10px}
body.density-compact .energy{font-size:30px;margin-top:5px;letter-spacing:-1.2px}
body.density-compact .progress{height:8px;margin:9px 0}
body.density-compact .macros{gap:6px}
body.density-compact .macro{border-radius:12px;padding:7px 8px}
body.density-compact .macro span{font-size:9px}
body.density-compact .macro b{margin-top:2px;font-size:11px;line-height:1.25}
body.density-compact .energy-mode-switch button{padding:5px 7px;font-size:9px}
body.density-compact .entry-context-card.compact{margin:5px 0 7px;padding:7px;border-radius:13px}
body.density-compact .quick-entry-card .title{display:none}
body.density-compact .quick-entry-card>p.tag{display:none}
body.density-compact .quick-entry-row{gap:6px}
body.density-compact .quick-entry-row .search{min-height:44px}
body.density-compact .quick-submit{min-height:44px;padding:9px 11px}
body.density-compact .meal,body.density-compact .row{padding:9px 1px;gap:8px}
body.density-compact .meal b{font-size:13px}
body.density-compact .meal small{margin-top:2px;font-size:10px;line-height:1.3}
body.density-compact .meal strong{font-size:11px;white-space:nowrap}
body.density-compact .meals-title .title-actions{gap:5px}
body.density-compact .meals-title .title-actions button{min-height:38px;padding:7px 8px;font-size:10px}
body.density-compact .suggestion-row{padding:9px 1px}
body.density-compact .suggestion-row b{font-size:12px}
body.density-compact .suggestion-row .tag{font-size:10px;margin-top:2px}
body.density-compact .suggestion-meta .confidence{font-size:8px;padding:3px 5px}
body.density-compact .reflection-card>p{display:none}
body.density-compact .reflection-question{grid-template-columns:88px minmax(0,1fr);align-items:center;gap:7px;padding:7px 0}
body.density-compact .reflection-question>div{gap:4px}
body.density-compact .reflection-option{min-height:36px;border-radius:9px;font-size:10px}
body.density-compact .bottom{padding:6px 7px 11px}
body.density-compact .bottom button{font-size:10px}
body.density-compact .bottom .fab{width:46px;height:46px;margin-top:-23px}

/* Dialoge, Listen und Formulare bleiben berührbar, benötigen aber weniger Höhe. */
body.density-compact .panel{max-height:95vh;padding:11px 11px 20px;border-radius:20px 20px 0 0}
body.density-compact .sheet-toolbar{min-height:36px;margin-bottom:5px}
body.density-compact .sheet-toolbar .handle{margin:0 auto}
body.density-compact #sheetContent>h2{font-size:19px;margin:7px 0 8px}
body.density-compact .label{margin:9px 0 4px;font-size:11px}
body.density-compact .search,body.density-compact .input{min-height:44px;padding:10px 11px;border-radius:12px}
body.density-compact .btn{min-height:44px;padding:10px 12px;border-radius:12px}
body.density-compact .pills{gap:5px;margin:8px 0}
body.density-compact .pill{min-height:40px;padding:7px 9px;font-size:11px}
body.density-compact .result{gap:8px;padding:9px;margin-top:6px;border-radius:13px}
body.density-compact .entry-context-card:not(.compact){margin:7px 0 10px;padding:9px;border-radius:14px}
body.density-compact .entry-context-heading{margin-bottom:7px}
body.density-compact .entry-date-presets{gap:5px}
body.density-compact .entry-date-presets button,body.density-compact .edit-date-controls button{min-height:41px;padding:7px 6px}
body.density-compact .entry-date-picker{margin:6px 0 8px}
body.density-compact .entry-meal-buttons{gap:5px}
body.density-compact .entry-meal-buttons button{min-height:43px;padding:7px 3px;border-radius:10px}
body.density-compact .portion-stepper{grid-template-columns:46px minmax(80px,1fr) 46px;gap:6px}
body.density-compact .portion-stepper button,body.density-compact .portion-stepper input{height:44px;border-radius:11px}
body.density-compact .portion-calculation-summary{margin:6px 0 8px;padding:7px 9px;border-radius:11px}
body.density-compact .direct-entry-list,body.density-compact .weight-list{gap:6px}
body.density-compact .direct-entry-row{gap:5px;border-radius:13px}
body.density-compact .direct-entry-main{padding:10px 6px 10px 11px}
body.density-compact .direct-entry-main b{font-size:12px}
body.density-compact .direct-entry-main span{margin-top:2px;font-size:10px}
body.density-compact .direct-entry-actions{gap:5px;padding:5px 6px 5px 0}
body.density-compact .direct-action{width:40px;height:40px;flex-basis:40px;border-radius:10px}
body.density-compact .food-library-row{padding:9px 1px}
body.density-compact .food-library-row b{font-size:12px}
body.density-compact .recipe-list-row>button:first-child{padding:9px 2px}
body.density-compact .recipe-list-row span{font-size:10px;margin-top:2px}
body.density-compact .profile-form-section{padding:11px;margin:8px 0;border-radius:14px}
body.density-compact .profile-form-section h3{font-size:15px;margin-bottom:8px}
body.density-compact .profile-form-grid{gap:8px}

/* Auswertung: kürzere Steuerung und dichtere Kennzahlen. */
body.density-compact .history-dashboard{gap:8px}
body.density-compact .history-range-card,body.density-compact .history-section-card{padding:11px}
body.density-compact .history-range-controls{gap:6px}
body.density-compact .history-range-button{min-height:40px;padding:7px 8px;font-size:10px}
body.density-compact .history-kpi-grid{gap:6px}
body.density-compact .history-kpi{padding:8px;border-radius:12px}
body.density-compact .history-kpi span{font-size:9px}
body.density-compact .history-kpi strong{font-size:17px;margin:3px 0}
body.density-compact .history-kpi small{font-size:9px}
body.density-compact .history-section-head{margin-bottom:7px}
body.density-compact .history-weight-summary{gap:6px}
body.density-compact .history-weight-summary>div{padding:7px}
body.density-compact .history-day-row{padding:8px 1px}

@media(min-width:760px){
  body.density-compact .content{padding:15px 17px 68px}
  body.density-compact .dashboard{gap:10px}
  body.density-compact .panel{border-radius:20px;max-height:92vh}
}
@media(min-width:1120px){
  body.density-compact .content{padding:18px 24px 38px}
  body.density-compact .side{padding:20px 16px}
  body.density-compact .side .brand-logo{width:46px;height:46px}
  body.density-compact .side nav{margin-top:24px;gap:4px}
  body.density-compact .side nav button{padding:9px 11px}
}
@media(max-width:390px){
  .compact-meal-buttons button span{font-size:8px}
  body.density-compact .reflection-question{grid-template-columns:1fr}
}


/* PEA v0.9.9.3 – unmittelbare Rückmeldung beim Speichern */
.entry-save-button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
}
.entry-save-button.is-saving{
  cursor:wait;
  opacity:.84;
}
.entry-save-button.is-saved{
  background:var(--profile-primary);
}
.entry-save-button:disabled{
  pointer-events:none;
}
.button-spinner{
  width:17px;
  height:17px;
  border:2px solid currentColor;
  border-right-color:transparent;
  border-radius:50%;
  animation:pea-button-spin .7s linear infinite;
}
@keyframes pea-button-spin{
  to{transform:rotate(360deg)}
}
@media (prefers-reduced-motion:reduce){
  .button-spinner{animation-duration:1.4s}
}


/* PEA v0.9.9.3 – klarere, lernende Kalorienbedarfsauswertung */
.lab-hero-card{display:grid;gap:6px;margin:12px 0;padding:18px;border:1px solid color-mix(in srgb,var(--profile-primary) 35%,var(--line));border-radius:20px;background:linear-gradient(145deg,var(--profile-soft),#fff)}
.lab-hero-card>span,.lab-section-head span{color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.lab-hero-card>b{font-size:30px;line-height:1;color:var(--profile-primary)}
.lab-hero-card>strong{font-size:11px;color:var(--text)}
.lab-hero-card>div{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:10px;line-height:1.4}
.lab-confidence-dot{width:9px;height:9px;border-radius:50%;background:#9aa6a4;box-shadow:0 0 0 4px color-mix(in srgb,#9aa6a4 15%,transparent)}
.lab-confidence-dot.high{background:#2f7d4a;box-shadow:0 0 0 4px color-mix(in srgb,#2f7d4a 15%,transparent)}
.lab-confidence-dot.medium{background:#a86418;box-shadow:0 0 0 4px color-mix(in srgb,#a86418 15%,transparent)}
.lab-section-head{display:flex;justify-content:space-between;gap:12px;align-items:end;margin:18px 0 8px}
.lab-section-head>div{display:grid;gap:2px}.lab-section-head b{font-size:14px}.lab-section-head small{max-width:190px;color:var(--muted);font-size:9px;text-align:right;line-height:1.35}
.lab-details{margin:12px 0;border:1px solid var(--line);border-radius:15px;background:#fff}.lab-details>summary{padding:12px;color:var(--profile-primary);cursor:pointer;font-size:11px;font-weight:800}.lab-details .lab-food-analysis{margin:0;border:0;border-top:1px solid var(--line);border-radius:0}
@media(max-width:720px){.lab-section-head{align-items:flex-start;flex-direction:column}.lab-section-head small{text-align:left}.lab-hero-card>b{font-size:27px}}


/* PEA v0.9.9.3 – Zielstatus, kompaktere Bedarfsauswertung und Gesamtzeitraum */
.lab-goal-picker button.active{background:var(--profile-primary);color:#fff;box-shadow:0 4px 12px color-mix(in srgb,var(--profile-primary) 24%,transparent)}
.lab-model-card{gap:7px}
.lab-model-card b{font-size:18px}
.lab-model-card em{font-style:normal;color:var(--muted);font-size:10px;font-weight:750}
.lab-model-description{min-height:42px!important}
.lab-model-range{min-height:auto!important;font-weight:750}
.lab-select-link{margin-top:auto;border:0;background:transparent;color:var(--profile-primary);font:inherit;font-size:10px;font-weight:800;text-decoration:underline;cursor:pointer}
.lab-goal-hint{display:block;margin-top:3px;color:var(--text);font-size:10px;line-height:1.35}
.lab-details-prominent{border-color:color-mix(in srgb,var(--profile-primary) 35%,var(--line));background:var(--profile-soft)}
.lab-details-prominent>summary{font-size:12px}
.history-range-buttons{grid-template-columns:repeat(5,minmax(0,1fr))}
.pea-period-status{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:#fff}
.pea-period-status>div{display:grid;gap:2px}.pea-period-status b{font-size:12px}.pea-period-status small{color:var(--muted);font-size:10px}
.pea-status-dot{display:inline-block;flex:0 0 auto;width:11px;height:11px;border-radius:50%;margin-right:5px;vertical-align:-1px}
.pea-status-dot.darkgreen,.pea-period-status.darkgreen{--status:#247343;--status-soft:#e9f5ed}.pea-status-dot.lightgreen,.pea-period-status.lightgreen{--status:#68a84f;--status-soft:#f0f8eb}.pea-status-dot.yellow,.pea-period-status.yellow{--status:#c49a14;--status-soft:#fff9df}.pea-status-dot.orange,.pea-period-status.orange{--status:#c56b22;--status-soft:#fff0e4}.pea-status-dot.red,.pea-period-status.red{--status:#b33a35;--status-soft:#fdeceb}
.pea-status-dot{background:var(--status)}.pea-period-status{border-color:color-mix(in srgb,var(--status) 35%,var(--line));background:var(--status-soft)}
.pea-status-border{border-left:4px solid var(--status)!important}.pea-status-border.darkgreen{--status:#247343}.pea-status-border.lightgreen{--status:#68a84f}.pea-status-border.yellow{--status:#c49a14}.pea-status-border.orange{--status:#c56b22}.pea-status-border.red{--status:#b33a35}
@media(max-width:720px){.history-range-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}.lab-model-card .btn{min-height:38px}.lab-model-description{min-height:auto!important}}

/* PEA v0.9.9.3 – fokussierter Eingabeweg und verlässliche Profilnavigation */
.primary-food-search{
  margin:14px 0 12px;
  padding:14px;
  border:2px solid var(--profile-primary,var(--primary));
  border-radius:18px;
  background:linear-gradient(180deg,var(--profile-soft,#eef8f6),#fff);
  box-shadow:0 8px 22px rgba(23,73,68,.10);
}
.primary-food-search label{display:flex;align-items:center;gap:11px;margin-bottom:10px;color:var(--text)}
.primary-food-search label span:last-child{display:grid;gap:2px}
.primary-food-search label b{font-size:1.05rem}
.primary-food-search label small{color:var(--muted);font-weight:500}
.primary-food-search-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:var(--profile-primary,var(--primary));color:#fff;font-size:1.45rem;font-weight:800}
.primary-search-input{min-height:54px!important;font-size:1.05rem!important;border-width:2px!important;background:#fff!important}
.primary-search-input:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--profile-primary,var(--primary)) 18%,transparent)!important}
.capture-grid .capture-primary{border-width:2px;border-color:var(--profile-primary,var(--primary));background:var(--profile-soft,#eef8f6)}
.optional-input-tools{margin-top:14px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft,#f7f8f8)}
.optional-input-tools summary{cursor:pointer;font-weight:750}
.optional-input-tools p{color:var(--muted);font-size:.92rem;line-height:1.45}
.profile-editor-heading{display:flex;align-items:center;gap:12px;margin-bottom:4px}
.profile-editor-heading h2{margin:0}
.inline-back-button{border:0;border-radius:999px;background:var(--profile-soft,#eef8f6);color:var(--profile-primary,var(--primary));font-weight:800;padding:9px 12px;cursor:pointer;white-space:nowrap}
@media(max-width:520px){
  .profile-editor-heading{align-items:flex-start;flex-direction:column;gap:8px}
  .inline-back-button{padding:8px 11px}
}

/* PEA v0.9.9.6 – zentrale Eingabe, Garmin und persönliche Gewohnheiten */
.day-dashboard{display:flex;flex-direction:column}
.day-dashboard .quick-entry-card{order:-20;border:2px solid var(--profile-primary,var(--primary));box-shadow:0 14px 32px rgba(8,127,120,.14);background:linear-gradient(145deg,#fff,var(--profile-soft,#e9f5f2))}
.day-dashboard .points-hero{order:-10}
.quick-entry-kicker{display:block;margin-bottom:4px;color:var(--profile-primary,var(--primary));font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase}
.quick-entry-card .quick-entry-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch}
.quick-entry-card #quickInput{min-height:58px;border:2px solid var(--profile-primary,var(--primary));background:#fff;font-size:17px;font-weight:700;padding:0 16px;box-shadow:0 4px 12px rgba(0,0,0,.05)}
.quick-entry-card .quick-submit{min-height:58px;padding-inline:20px;font-size:14px;white-space:nowrap}
.day-pea-status{display:flex;gap:9px;align-items:center;margin-top:10px;padding:9px 11px;border-radius:12px;background:#fff;border:1px solid var(--line)}
.day-pea-status b,.day-pea-status small{display:block}.day-pea-status small{margin-top:2px;color:var(--muted);font-size:10px}
.garmin-upload-zone{display:grid;place-items:center;gap:5px;padding:24px 16px;border:2px dashed var(--profile-primary,var(--primary));border-radius:17px;background:var(--profile-soft,#eef8f6);text-align:center;cursor:pointer}
.garmin-upload-zone>span{font-size:32px}.garmin-upload-zone small{color:var(--muted)}
.garmin-file-list,.garmin-activity-list{display:grid;gap:8px;margin-top:12px}.garmin-file-list>div,.garmin-activity-list>article{padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}.garmin-file-list b,.garmin-file-list span,.garmin-activity-list b,.garmin-activity-list span,.garmin-activity-list small{display:block}.garmin-file-list span,.garmin-activity-list span,.garmin-activity-list small{color:var(--muted);font-size:10px}.garmin-activity-list article{display:grid;grid-template-columns:1fr auto;gap:4px 10px}.garmin-activity-list small{grid-column:1/-1}.garmin-import-result{display:grid;gap:5px;margin-top:12px;padding:12px;border-radius:12px;background:var(--profile-soft,#eef8f6)}
.habits-card{border-top:4px solid var(--profile-primary,var(--primary))}.habit-insight-list{display:grid;gap:9px;margin:12px 0}.habit-insight{display:flex;gap:10px;padding:11px;border:1px solid var(--line);border-radius:13px;background:#fff}.habit-insight>span{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:50%;background:var(--profile-soft,#eef8f6);color:var(--profile-primary,var(--primary));font-weight:900}.habit-insight p{margin:3px 0 0;color:var(--muted);font-size:11px;line-height:1.45}.habit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.habit-subcard{padding:13px;border:1px solid var(--line);border-radius:14px;background:#fff}.alcohol-habit{background:linear-gradient(145deg,#fff,#fbf5ee)}.habit-subhead{display:flex;justify-content:space-between;gap:10px}.habit-subhead span{font-weight:900}.habit-subhead b{color:var(--profile-primary,var(--primary));font-size:11px}.habit-kpis{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:11px 0}.habit-kpis>div{padding:9px;border-radius:10px;background:rgba(255,255,255,.75)}.habit-kpis span,.habit-kpis b{display:block}.habit-kpis span{color:var(--muted);font-size:9px}.habit-kpis b{margin-top:3px}.habit-subcard p{color:var(--muted);font-size:10px;line-height:1.5}.habit-share-row{display:grid;grid-template-columns:90px 1fr 48px;gap:8px;align-items:center;margin-top:9px;font-size:10px}.habit-share-row>div{height:7px;border-radius:999px;background:#edf1f0;overflow:hidden}.habit-share-row i{display:block;height:100%;border-radius:999px;background:var(--profile-primary,var(--primary))}.habit-share-row b{text-align:right}
@media(max-width:700px){.quick-entry-card .quick-entry-row{grid-template-columns:1fr}.quick-entry-card .quick-submit{width:100%}.habit-grid{grid-template-columns:1fr}.habit-share-row{grid-template-columns:82px 1fr 44px}}


/* PEA v0.9.9.6 – stabiler mobiler Eingabebereich ohne Layoutsprung */
.quick-entry-card{overflow:visible}
.quick-entry-search-wrap{position:relative;margin-top:12px}
.quick-entry-search-wrap .quick-entry-row{margin-top:0}
.quick-entry-card #quickInput{box-sizing:border-box;width:100%;min-width:0;height:58px;min-height:58px;max-height:58px;line-height:1.25}
.quick-entry-search-wrap>.quick-suggestions{position:absolute;z-index:45;left:0;right:0;top:calc(100% + 7px);margin-top:0;max-height:min(42vh,320px);overflow-y:auto;border-radius:14px;background:#fff;box-shadow:0 14px 32px rgba(20,48,45,.18)}
.quick-entry-search-wrap>.quick-suggestions:empty{display:none}
.quick-entry-search-wrap>.quick-suggestions:not(.is-open){display:none}
.quick-entry-search-wrap>.quick-suggestions.is-open{display:block}
.quick-entry-card .quick-submit{height:58px;min-height:58px;max-height:58px}
@media(max-width:700px){
  .quick-entry-card #quickInput{font-size:16px;font-weight:700}
  .quick-entry-card .quick-submit{height:54px;min-height:54px;max-height:54px}
  .quick-entry-search-wrap>.quick-suggestions{max-height:min(36vh,280px)}
}


/* PEA v0.9.9.6 – einheitliche Speicherrückmeldung */
.btn.is-saving, .mini-btn.is-saving{
  display:flex;align-items:center;justify-content:center;gap:8px;cursor:wait;opacity:.84;pointer-events:none;
}
.btn.is-saved, .mini-btn.is-saved{background:var(--profile-primary);color:#fff;}
.btn:disabled, .mini-btn:disabled{pointer-events:none;}
.garmin-import-tabs,.garmin-overview-tabs{display:flex;gap:7px;overflow-x:auto;margin:10px 0 14px;padding-bottom:2px}.garmin-import-tabs button,.garmin-overview-tabs button{white-space:nowrap;border:1px solid var(--line);border-radius:999px;background:#fff;padding:9px 13px;font:inherit;font-weight:700;color:var(--muted)}.garmin-import-tabs button.active,.garmin-overview-tabs button.active{background:var(--profile-primary,var(--primary));border-color:var(--profile-primary,var(--primary));color:#fff}.garmin-export-preview{display:grid;gap:14px;margin-top:14px;padding:15px;border:1px solid var(--line);border-radius:16px;background:var(--profile-soft,#eef8f6)}.garmin-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.garmin-preview-grid>div{padding:11px;border-radius:12px;background:#fff}.garmin-preview-grid b,.garmin-preview-grid span,.garmin-preview-grid small{display:block}.garmin-preview-grid b{font-size:22px;color:var(--profile-primary,var(--primary))}.garmin-preview-grid span{font-weight:700}.garmin-preview-grid small{color:var(--muted);font-size:10px;margin-top:3px}.garmin-option-list{display:grid;gap:8px}.garmin-option-list label{display:flex;align-items:flex-start;gap:9px;padding:9px 10px;background:#fff;border-radius:10px}.garmin-option-list label.disabled{opacity:.65}.garmin-filterbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0 14px}.garmin-filterbar select{min-width:135px;padding:10px;border:1px solid var(--line);border-radius:11px;background:#fff;font:inherit}.garmin-filterbar span{margin-left:auto;color:var(--muted);font-size:11px}.garmin-import-result .btn{margin-top:9px}
@media(max-width:600px){.garmin-filterbar select{flex:1;min-width:0}.garmin-filterbar span{width:100%;margin-left:0}.garmin-preview-grid{grid-template-columns:1fr 1fr}}
.alcohol-comparison{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}.alcohol-comparison>div{padding:9px;border-radius:10px;background:#fff}.alcohol-comparison span,.alcohol-comparison b,.alcohol-comparison small{display:block}.alcohol-comparison span,.alcohol-comparison small{font-size:9px;color:var(--muted)}.alcohol-comparison b{margin:3px 0;font-size:16px}@media(max-width:520px){.alcohol-comparison{grid-template-columns:1fr}}

/* PEA v0.9.10.3 – stale typeahead and first-tap save hotfix */
.sheet .btn[data-entry-save-label]{position:relative;z-index:2;touch-action:manipulation}
.typeahead-row{touch-action:manipulation}

/* v0.9.12.0: Dialoge blockieren den Hintergrund vollständig. */
body.sheet-scroll-locked{position:fixed;left:0;right:0;width:100%;overflow:hidden;overscroll-behavior:none}
.sheet{overscroll-behavior:contain;touch-action:none}
.sheet .panel{overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.btn,.sheet button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.btn:active,.sheet button:active{transform:scale(.985)}
.btn.is-saving{opacity:.86;cursor:wait}
.garmin-chart-card{margin:12px 0;padding:14px;border:1px solid var(--line);border-radius:15px;background:#fff}
.garmin-chart-card>div{display:flex;justify-content:space-between;gap:10px;align-items:baseline}.garmin-chart-card strong{color:var(--profile-primary,var(--primary))}
.garmin-chart-card svg{display:block;width:100%;height:118px;margin:10px 0}.garmin-chart-card polyline{stroke:var(--profile-primary,var(--primary));stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.garmin-chart-card small,.garmin-source-note span{color:var(--muted);font-size:11px}
.garmin-source-note{display:grid;gap:3px;margin:10px 0 14px;padding:11px 12px;border-radius:12px;background:var(--profile-soft,#eef8f6)}


/* PEA v0.9.12.0 – vollständige mobile Trefferflächen */
.pea-reliable-tap{
  position:relative;
  z-index:24;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  user-select:none;
  -webkit-user-select:none;
}
.sheet #detailedFoodSaveButton,
.sheet [data-entry-save-label].pea-reliable-tap{
  display:flex;
  width:100%;
  min-width:100%;
  min-height:54px;
  align-items:center;
  justify-content:center;
  isolation:isolate;
  z-index:30;
}
.reflection-question,
.reflection-question>div{position:relative;z-index:1}
.reflection-option.pea-reliable-tap{
  width:100%;
  min-width:0;
  min-height:44px;
}
.reflection-option:disabled{opacity:.72}


/* PEA v0.9.12.0 – Online-Nachsuche und schnelle Übernahme */
.online-food-callout{margin:14px 0 4px;padding:14px;border:1px solid rgba(112,75,174,.25);border-radius:18px;background:linear-gradient(135deg,rgba(244,239,252,.95),rgba(238,249,246,.95));display:flex;gap:12px;align-items:center;justify-content:space-between}.online-food-callout div{display:flex;flex-direction:column;gap:3px}.online-food-callout span{font-size:.85rem;color:var(--muted)}.online-food-callout button,.online-food-searchbar button{border:0;border-radius:14px;background:var(--purple);color:#fff;font-weight:800;padding:11px 14px;white-space:nowrap}.online-food-intro{display:flex;flex-direction:column;gap:5px;margin:8px 0 14px;padding:13px;border-radius:16px;background:rgba(236,248,245,.9)}.online-food-intro span,.online-food-footnote{color:var(--muted);font-size:.86rem;line-height:1.45}.online-food-searchbar{display:grid;grid-template-columns:1fr auto;gap:8px;margin-bottom:10px}.online-food-filters{display:flex;gap:7px;overflow:auto;padding:3px 0 12px}.online-food-filters button{border:1px solid rgba(112,75,174,.25);border-radius:999px;background:#fff;padding:8px 12px;font-weight:700;white-space:nowrap}.online-food-filters button.active{background:var(--purple);color:#fff;border-color:var(--purple)}.online-food-result{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;padding:14px 4px;border:0;border-bottom:1px solid rgba(20,55,51,.12);background:transparent;color:inherit}.online-food-result>div{display:flex;flex-direction:column;gap:4px;min-width:0}.online-food-result b{font-size:1.02rem}.online-food-result small{color:var(--muted);line-height:1.35}.online-source-badge{display:inline-flex;width:max-content;border-radius:999px;padding:4px 8px;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.online-source-badge.reference{background:#e4f3ed;color:#176c52}.online-source-badge.brand{background:#f0e9fa;color:#6740a3}.online-food-preview-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted);margin:8px 0 16px}.online-nutrition-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:14px}.online-nutrition-grid div{padding:12px 6px;border-radius:16px;background:rgba(244,240,250,.9);text-align:center}.online-nutrition-grid b{display:block;font-size:1.2rem}.online-nutrition-grid span{font-size:.75rem;color:var(--muted)}.online-food-details{padding:13px;border:1px solid rgba(112,75,174,.18);border-radius:16px;margin-bottom:14px}.online-food-details p{margin:5px 0;line-height:1.4}.online-food-footnote{margin-top:16px;padding-top:12px;border-top:1px solid rgba(20,55,51,.12)}
@media(max-width:520px){.online-food-callout{align-items:stretch;flex-direction:column}.online-food-callout button{width:100%}.online-nutrition-grid{grid-template-columns:repeat(2,1fr)}}

/* PEA v0.9.12.3 – kompakt, aber über die volle mobile Breite */
@media(max-width:759px){
  .content,body.density-compact .content{width:100%;max-width:none;padding-left:6px;padding-right:6px}
  .dashboard{width:100%;gap:8px}
  .card,body.density-compact .card{width:100%;margin-left:0;margin-right:0;border-radius:17px;padding-left:12px;padding-right:12px}
  .quick-entry-card{width:100%}
  .sheet .panel{width:calc(100% - 4px);max-width:none;padding-left:10px;padding-right:10px}
  .online-food-result,.online-food-searchbar,.online-food-filters,.online-food-header,.online-food-footnote{width:100%}
}
.online-search-inline{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;margin:8px 0 2px;padding:10px 12px;border:1px solid rgba(112,75,174,.22);border-radius:13px;background:#fff;color:var(--text);text-align:left;box-shadow:none}
.online-search-inline b,.online-search-inline small{display:block}.online-search-inline small{margin-top:2px;color:var(--muted);font-size:.78rem;line-height:1.3}.online-search-inline-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--profile-soft,#eee8f8);color:var(--purple);font-weight:900}
.online-food-header{margin:0 0 12px}.online-food-header h2{margin:0 0 5px}.online-food-header p{margin:0;color:var(--muted);line-height:1.4}
.online-food-searchbar button{min-width:92px;background:var(--purple)!important;color:#fff!important;opacity:1!important}
.online-food-filters button{color:var(--text)!important;opacity:1!important}.online-food-filters button.active{color:#fff!important;background:var(--purple)!important}
.online-food-result{padding:13px 10px;margin:7px 0;border:1px solid var(--line);border-radius:14px;background:#fff}.online-food-result.recommended{border-color:rgba(20,130,104,.3);background:linear-gradient(135deg,#fff,#f0faf6)}
.online-source-badge.estimate{background:#fff0c9;color:#765b08}.online-empty{display:flex;flex-direction:column;gap:5px;padding:18px 10px}.online-empty span,.online-warning{color:var(--muted);font-size:.85rem}.online-warning{margin-top:10px;padding:10px;border-radius:10px;background:#fff7e8}
.reference-energy-card{padding:16px;border-radius:16px;background:#fff4d7;border:1px solid #e8cf7a;margin:10px 0}.reference-energy-card b,.reference-energy-card span{display:block}.reference-energy-card b{font-size:1.35rem}.reference-energy-card span{margin-top:4px;color:var(--muted)}
.reference-portion-editor{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:10px;padding:13px;border:1px solid var(--line);border-radius:15px;margin-bottom:12px}.reference-portion-editor>div{display:flex;align-items:center;gap:6px}.reference-portion-editor input{width:90px;padding:10px;border:1px solid var(--line);border-radius:10px}.reference-portion-editor p{grid-column:1/-1;margin:0;color:var(--profile-primary,var(--primary));font-weight:850}
@media(max-width:520px){.online-food-searchbar{grid-template-columns:minmax(0,1fr) 92px}.online-food-searchbar input{min-width:0}.online-food-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}.online-food-filters button{padding:8px 5px;font-size:.78rem}.reference-portion-editor{grid-template-columns:1fr auto}}


/* PEA v0.9.12.3 – relevante Treffer und eindeutige Online-Bedienung */
.online-food-searchbar{align-items:stretch}
.online-food-searchbar input{border:1.5px solid rgba(112,75,174,.34)!important;background:#fff!important;color:var(--text)!important}
.online-food-searchbar button{background:#704bae!important;color:#fff!important;border:1px solid #704bae!important;box-shadow:0 5px 14px rgba(112,75,174,.18);font-weight:850!important}
.online-food-searchbar button:active{transform:translateY(1px);filter:brightness(.94)}
.online-food-filters{position:static!important;z-index:auto!important}
.online-food-filters button{background:#fff!important;color:#173a36!important;border:1.5px solid rgba(112,75,174,.32)!important;box-shadow:none!important}
.online-food-filters button.active{background:#704bae!important;color:#fff!important;border-color:#704bae!important;box-shadow:0 4px 12px rgba(112,75,174,.18)!important}
.online-search-inline{position:static!important;inset:auto!important;z-index:auto!important;float:none!important;clear:both;margin:9px 0 3px!important;background:#fff!important}
.online-food-result{position:relative;overflow:hidden}
.online-food-result b{overflow-wrap:anywhere}
.online-food-result small{overflow-wrap:anywhere}
.online-food-result.recommended{border-width:1.5px}
.online-source-badge.brand{background:#efe7fb;color:#5f3699}
.online-empty{border:1px dashed rgba(112,75,174,.3);border-radius:14px;background:rgba(250,248,253,.8);margin:6px 0}
@media(max-width:520px){
 .online-food-searchbar{grid-template-columns:minmax(0,1fr) 98px!important}
 .online-food-filters button{min-height:44px;font-size:.79rem!important}
 .online-food-result{padding:12px 10px;margin:6px 0}
}
.online-spelling-suggestion{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:3px;margin:4px 0 10px;padding:12px 14px;border:1.5px solid rgba(112,75,174,.38);border-radius:14px;background:#f5f0fb;color:var(--text);text-align:left}.online-spelling-suggestion b{color:var(--purple);font-size:.98rem}.online-spelling-suggestion small{color:var(--muted)}.online-empty .mini-btn{margin-top:10px;width:max-content;max-width:100%}


/* PEA 0.9.14.0 – konsolidiertes Qualitäts- und Breitenraster */
:root{--pea-space-1:6px;--pea-space-2:10px;--pea-space-3:14px;--pea-radius-card:18px;--pea-radius-control:13px;--pea-control-height:48px}
.btn,.input,.search,.pill,.history-range-button,.garmin-overview-tabs button{min-height:var(--pea-control-height);border-radius:var(--pea-radius-control)}
button.pea-pressed,.btn.pea-pressed{transform:scale(.975)!important;filter:brightness(.96);transition:none!important}
.btn.is-saving,.btn[aria-busy="true"]{cursor:progress;opacity:.88}
.sheet .panel{scrollbar-gutter:stable;contain:layout paint}
.sheet.open{background:rgba(20,39,38,.42);backdrop-filter:blur(2px)}
.sheet-toolbar{position:sticky;top:0;z-index:20;background:linear-gradient(#fff 78%,rgba(255,255,255,.92));padding-bottom:5px}
.day-dashboard{gap:12px}.day-dashboard>.quick-entry-card{order:1}.day-dashboard>.points-hero{order:2}.day-dashboard>.meals{order:3}.day-dashboard>.day-context-card{order:4}.day-dashboard>.suggestions-card{order:5}.day-dashboard>.reflection-card{order:6}
.quick-entry-card{border-width:2px;box-shadow:0 10px 28px rgba(91,65,145,.10)}
.quick-entry-card .quick-entry-kicker{letter-spacing:.08em;text-transform:uppercase}.quick-entry-row{align-items:stretch}.quick-entry-row .search{font-size:17px;font-weight:650}.quick-entry-row .quick-submit{font-weight:800}
.points-hero .energy{line-height:1.02}.points-hero .energy small{display:inline-block;font-size:.32em;font-weight:700;color:var(--muted)}
.history-section-nav{position:sticky;top:4px;z-index:12;display:flex;gap:7px;overflow-x:auto;padding:7px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);box-shadow:0 5px 18px rgba(20,39,38,.07)}
.history-section-nav button{flex:0 0 auto;min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--profile-primary,var(--primary));font:inherit;font-size:11px;font-weight:800}
.history-section-nav button:last-child{background:var(--profile-soft,#eef8f6)}
.history-anchor{scroll-margin-top:74px}
.history-section-card,.garmin-chart-card,.habit-subcard{box-shadow:0 5px 18px rgba(20,39,38,.045)}
.history-chart-scroll{border-radius:12px;background:linear-gradient(180deg,#fff,var(--profile-soft,#f5faf9));padding-top:3px}
.habit-insight{border-left:4px solid var(--profile-primary,var(--primary))}.habit-insight.observe{border-left-color:#d58a22}
.garmin-chart-card svg{height:145px}.garmin-chart-card{overflow:hidden}.garmin-source-note{border-left:4px solid var(--profile-primary,var(--primary))}
@media(max-width:700px){
  .content,body.density-compact .content{padding-left:4px!important;padding-right:4px!important}
  .dashboard{width:100%;gap:8px}
  .card,body.density-compact .card{width:100%;border-radius:16px;padding-left:10px;padding-right:10px}
  .quick-entry-card{padding:10px!important}.quick-entry-row{display:grid;grid-template-columns:1fr}.quick-entry-row .quick-submit{width:100%}
  .points-hero .macros{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.points-hero .macro{padding:8px 6px}.points-hero .macro span{font-size:9px}.points-hero .macro b{font-size:11px}
  .history-section-nav{margin-left:0;margin-right:0}.history-section-card{padding:10px!important}
  .history-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .habit-grid{grid-template-columns:1fr}.alcohol-comparison{grid-template-columns:1fr 1fr}
  .sheet .panel{width:calc(100% - 2px)!important;padding-left:8px!important;padding-right:8px!important}
}
@media(min-width:701px){.dashboard{max-width:1180px;margin-inline:auto}.quick-entry-row{grid-template-columns:minmax(0,1fr) 230px}}


/* PEA 0.99.1 – persönliche Tagesaktivität mit Punkteanpassung */
.daily-activity-card{display:grid;gap:.85rem}
.daily-activity-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.45rem}
.daily-activity-option{min-width:0;border:1px solid var(--line,#dfe6e5);background:var(--surface,#fff);border-radius:14px;padding:.68rem .35rem;display:grid;gap:.2rem;text-align:center;color:inherit}
.daily-activity-option b{font-size:.82rem;line-height:1.15}.daily-activity-option small{font-size:.72rem;color:var(--muted,#687776)}
.daily-activity-option.selected{background:color-mix(in srgb,var(--primary,#087f78) 13%,white);border-color:var(--primary,#087f78);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary,#087f78) 15%,transparent)}
.daily-activity-breakdown{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem}
.daily-activity-breakdown>div{border-radius:13px;background:var(--soft,#f5f8f7);padding:.7rem;display:grid;gap:.18rem}.daily-activity-breakdown span{font-size:.73rem;color:var(--muted,#687776)}.daily-activity-breakdown b{font-size:1rem}.daily-activity-breakdown .result{background:color-mix(in srgb,var(--primary,#087f78) 10%,white)}
.daily-activity-garmin{display:flex;justify-content:space-between;gap:.8rem;align-items:flex-start;border-top:1px solid var(--line,#dfe6e5);padding-top:.75rem}.daily-activity-garmin>div{display:grid;gap:.2rem}.daily-activity-garmin small{line-height:1.45;color:var(--muted,#687776)}.daily-activity-garmin strong{white-space:nowrap;font-size:.82rem}
.daily-activity-note{margin:0;font-size:.76rem;line-height:1.45;color:var(--muted,#687776)}
@media(max-width:720px){.daily-activity-options{grid-template-columns:repeat(5,minmax(72px,1fr));overflow-x:auto;padding-bottom:.2rem;scrollbar-width:thin}.daily-activity-breakdown{grid-template-columns:1fr 1fr}.daily-activity-breakdown .result{grid-column:1/-1}.daily-activity-garmin{align-items:center}}

/* PEA 0.99.1 – gemeinsamer Tageskontext */
.day-context-card{display:grid;gap:.8rem}
.day-context-intro{margin:0;color:var(--muted,#687776);font-size:.82rem;line-height:1.45}
.day-context-section{display:grid;gap:.65rem;padding:.8rem;border:1px solid var(--line,#dfe6e5);border-radius:15px;background:var(--surface,#fff)}
.day-context-section+.day-context-section{margin-top:.05rem}
.day-context-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:.7rem}
.day-context-heading>div{display:grid;gap:.15rem}.day-context-heading b{font-size:.95rem}.day-context-heading small{color:var(--muted,#687776);font-size:.75rem;line-height:1.35}
.activity-adjustment-badge{flex:0 0 auto;border-radius:999px;padding:.35rem .55rem;background:color-mix(in srgb,var(--primary,#087f78) 11%,white);color:var(--primary,#087f78);font-size:.74rem;font-weight:800}
.day-context-card .reflection-question{margin:0}
.day-context-card .daily-activity-breakdown{margin-top:.05rem}
@media(max-width:720px){.day-context-section{padding:.65rem}.day-context-card .daily-activity-options{margin-left:-.1rem;margin-right:-.1rem}}

/* PEA 0.99.1 – kompakte persönliche Hinweise */
.personal-suggestion-card{padding-top:14px;padding-bottom:12px}
.personal-suggestion-card .title{align-items:flex-start;margin-bottom:4px}
.personal-suggestion-card .title h2{font-size:1.05rem;margin-top:2px}
.personal-suggestion-card .title button{min-height:38px;padding:7px 12px}
.personal-suggestion-intro{margin:2px 0 4px;color:var(--muted);font-size:.92rem}
.personal-suggestion-card .suggestion-row{padding:10px 0}
body.density-compact .personal-suggestion-card{padding-top:11px;padding-bottom:9px}
body.density-compact .personal-suggestion-intro{font-size:.84rem}


/* PEA 0.99.1 – optionale Erbsenanzeige im Reagenzglas */
.pea-budget-visual{display:grid;grid-template-columns:92px minmax(0,1fr);gap:18px;align-items:center;margin:14px 0 8px;padding:15px 16px;border:1px solid color-mix(in srgb,var(--profile-primary) 16%,var(--line));border-radius:20px;background:linear-gradient(145deg,#fff,color-mix(in srgb,var(--profile-soft) 38%,#fff));overflow:hidden}
.pea-tube-wrap{position:relative;width:82px;height:190px;display:flex;align-items:flex-end;justify-content:center}
.pea-tube{position:relative;width:48px;height:174px;border:3px solid rgba(70,86,82,.32);border-top-width:2px;border-radius:10px 10px 24px 24px;background:linear-gradient(90deg,rgba(255,255,255,.9),rgba(230,244,239,.32) 48%,rgba(255,255,255,.72));box-shadow:inset 7px 0 10px rgba(255,255,255,.78),inset -5px 0 8px rgba(70,86,82,.08),0 7px 15px rgba(26,54,45,.09);overflow:hidden}
.pea-tube:before{content:'';position:absolute;z-index:4;left:-7px;right:-7px;top:-5px;height:10px;border:3px solid rgba(70,86,82,.32);border-radius:50%;background:rgba(255,255,255,.86)}
.pea-tube-fill{position:absolute;left:4px;right:4px;bottom:4px;min-height:0;border-radius:5px 5px 17px 17px;background-color:#76b82a;background-image:radial-gradient(circle at 32% 30%,#b9e36b 0 15%,#78b92c 17% 48%,#4f8e1d 51% 64%,transparent 66%),radial-gradient(circle at 70% 70%,#a6d653 0 15%,#69aa23 17% 50%,#407a17 52% 65%,transparent 67%);background-size:19px 19px,21px 21px;background-position:0 0,9px 8px;transition:height .35s ease;box-shadow:inset 0 5px 9px rgba(255,255,255,.28)}
.pea-tube-gloss{position:absolute;z-index:3;left:8px;top:10px;bottom:15px;width:8px;border-radius:8px;background:linear-gradient(rgba(255,255,255,.72),rgba(255,255,255,.08))}
.pea-target-band{position:absolute;right:-4px;top:19px;height:28px;width:30px;color:var(--muted);font-size:9px;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end}
.pea-target-band i{position:absolute;right:16px;top:4px;bottom:4px;border-right:1px dashed var(--profile-primary)}
.pea-target-band i:before,.pea-target-band i:after{content:'';position:absolute;right:-7px;width:8px;border-top:1px dashed var(--profile-primary)}.pea-target-band i:before{top:0}.pea-target-band i:after{bottom:0}
.pea-budget-copy{min-width:0;display:grid;gap:7px}
.pea-budget-main{display:flex;align-items:baseline;flex-wrap:wrap;gap:7px;color:var(--ink)}
.pea-budget-main strong{font-size:38px;line-height:.95;color:var(--profile-primary);letter-spacing:-1px}.pea-budget-main span{font-size:18px;font-weight:850}
.pea-budget-kcal{font-size:16px;color:var(--muted);font-weight:700}.pea-budget-remaining{font-size:16px;color:var(--profile-primary);font-weight:850}
.pea-budget-rule,.pea-budget-range{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--ink)}
.pea-dot{width:13px;height:13px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#bce66c,#67a923 65%,#3e7915);box-shadow:0 1px 4px rgba(39,84,22,.28);flex:0 0 auto}.pea-budget-range>span{width:20px;border-top:1px dashed var(--profile-primary)}
.pea-budget-activity{margin-top:3px;padding:7px 10px;border-radius:999px;background:color-mix(in srgb,var(--profile-primary) 10%,#fff);color:var(--profile-primary);font-size:11px;font-weight:850;text-align:center}
.pea-energy-secondary{font-size:18px!important;margin-top:7px!important;color:var(--muted)!important}.pea-progress-secondary{height:5px!important;opacity:.58}
@media(max-width:560px){.pea-budget-visual{grid-template-columns:74px minmax(0,1fr);gap:11px;padding:12px 11px}.pea-tube-wrap{width:66px;height:157px}.pea-tube{width:42px;height:144px}.pea-budget-main strong{font-size:31px}.pea-budget-main span{font-size:15px}.pea-budget-kcal,.pea-budget-remaining{font-size:13px}.pea-budget-rule,.pea-budget-range{font-size:9px}.pea-target-band{right:-7px;top:15px}}
@media(max-width:370px){.pea-budget-visual{grid-template-columns:58px minmax(0,1fr)}.pea-tube-wrap{transform:scale(.86);transform-origin:left center;width:56px}.pea-budget-main strong{font-size:27px}.pea-budget-main span{font-size:13px}}

/* PEA 0.99.3 – echtes Desktop-Dashboard und erneuertes Branding */
.brand-logo{display:block;object-fit:contain;filter:drop-shadow(0 4px 8px rgba(21,51,50,.08))}
.brand b{font-weight:900;letter-spacing:-.045em}.brand small{letter-spacing:.01em}

@media(min-width:1120px){
  :root{--desktop-gap:20px}
  body{background:linear-gradient(135deg,#f7f4fb 0%,#f4f8f7 50%,#f7fbf9 100%)}
  .app-shell{grid-template-columns:272px minmax(0,1fr)}
  .side{padding:24px 18px 20px;background:linear-gradient(180deg,#effaf6 0%,#f6fbf9 62%,#f3f0f9 100%);box-shadow:10px 0 38px rgba(28,50,48,.045)}
  .side .brand{gap:12px;padding:0 2px}.side .brand-logo{width:58px;height:58px;border-radius:18px}.side .brand b{font-size:31px;color:#6848aa}.side .brand small{font-size:10px;max-width:165px}
  .profile-card{margin-top:24px;padding:12px;border-radius:17px;box-shadow:0 10px 26px rgba(35,58,54,.055)}
  .side-capture{min-height:48px;border-radius:14px;box-shadow:0 10px 24px color-mix(in srgb,var(--profile-primary) 20%,transparent)}
  .side nav{margin-top:20px}.side nav button{min-height:43px;border-radius:13px}.side-summary{border-radius:17px;box-shadow:0 9px 24px rgba(35,58,54,.045)}

  .content{padding:22px clamp(24px,2.5vw,52px) 44px;max-width:none}
  .content>header{max-width:1640px;margin:0 auto 8px}.datebar{max-width:1640px;margin-left:auto;margin-right:auto}
  #main{max-width:1640px;margin-inline:auto}
  .card{border-radius:20px;box-shadow:0 10px 32px rgba(38,48,64,.055)}

  /* Startseite: zwei vollwertige Desktop-Spalten statt schmaler Mobilspur */
  .day-dashboard{display:grid!important;grid-template-columns:minmax(480px,1fr) minmax(520px,1.08fr)!important;grid-template-areas:
    "entry budget"
    "meals context"
    "meals suggestions"!important;gap:var(--desktop-gap)!important;max-width:1500px!important;align-items:start}
  .day-dashboard .quick-entry-card{grid-area:entry!important;order:initial!important;min-height:245px;padding:20px!important}
  .day-dashboard .points-hero{grid-area:budget!important;order:initial!important;min-height:245px}
  .day-dashboard .meals{grid-area:meals!important;grid-column:auto!important;grid-row:auto!important;min-height:470px}
  .day-dashboard .day-context-card{grid-area:context!important}
  .day-dashboard .personal-suggestion-card{grid-area:suggestions!important}
  .quick-entry-card .quick-entry-row{grid-template-columns:minmax(0,1fr) 210px!important}
  .quick-entry-card #quickInput,.quick-entry-card .quick-submit{min-height:58px}
  .quick-entry-card .entry-context{margin-top:10px}
  .points-hero .pea-budget-visual{grid-template-columns:118px minmax(0,1fr);min-height:214px;margin:10px 0 12px;padding:16px 20px}
  .points-hero .pea-tube-wrap{width:104px;height:208px}.points-hero .pea-tube{width:54px;height:188px}
  .points-hero .pea-budget-main strong{font-size:46px}.points-hero .pea-budget-main span{font-size:20px}
  .points-hero .energy{font-size:30px}.points-hero .macros{margin-top:10px}
  .meals .meal{padding:18px 4px}.meals .meal b{font-size:16px}.meals .meal strong{font-size:15px}
  .day-context-card{padding:20px}.day-context-card .day-context-section{padding:14px}
  .daily-activity-options{grid-template-columns:repeat(5,minmax(86px,1fr))}
  .personal-suggestion-card{align-self:start}

  /* Auswertung: großes, ruhiges 12-Spalten-Dashboard */
  .history-dashboard{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:var(--desktop-gap)!important;max-width:1640px!important;align-items:start}
  .history-range-card{grid-column:1 / 4;min-height:142px}
  .history-section-nav{grid-column:4 / 10;position:static;min-height:142px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;padding:10px}
  .history-section-nav button{height:100%;min-height:96px;border-radius:18px;white-space:normal;font-size:12px}
  .history-section-nav button:last-child{background:color-mix(in srgb,var(--profile-primary) 10%,#fff)}
  .pea-period-status{grid-column:10 / 13;min-height:142px;padding:18px}
  .history-kpi-grid{grid-column:1 / 4;display:grid;grid-template-columns:1fr 1fr;gap:12px;align-self:stretch}
  .history-kpi{min-height:118px;padding:16px;border-radius:17px}.history-kpi strong{font-size:21px;line-height:1.15}
  #history-weight{grid-column:4 / 9;grid-row:2 / span 2;min-height:590px}
  #history-energy{grid-column:9 / 13;grid-row:2 / span 2;min-height:590px}
  #history-macros{grid-column:1 / 5}
  #history-macros+article{grid-column:5 / 9}
  .reflection-history-card{grid-column:9 / 13}
  .history-dashboard>.habit-analysis-card,.history-dashboard>.habits-card{grid-column:1 / 9}
  .history-future-card{grid-column:9 / 13}
  .history-section-card{padding:20px!important;overflow:hidden}
  .history-section-head h2{font-size:22px}
  .history-weight-summary{gap:10px}.history-weight-summary>div{padding:12px}
  .history-chart-scroll{min-height:285px;padding:8px}.history-chart-scroll svg{height:265px!important;min-width:640px}
  .history-weight-list{max-height:265px;overflow:auto;padding-right:4px}
  .history-day-list,.history-day-rows{max-height:390px;overflow:auto;padding-right:4px}
  .history-macro-list{padding-top:8px}
  .garmin-chart-card svg{height:220px}

  /* Dialoge und Seiten nutzen auf Desktop sinnvolle Breite */
  .panel{width:min(900px,calc(100vw - 120px));max-height:88vh;padding:20px 22px 30px}
  .panel:has(.history-dashboard),.panel:has(.garmin-dashboard){width:min(1180px,calc(100vw - 90px))}
}

@media(min-width:1500px){
  .day-dashboard{grid-template-columns:minmax(540px,.95fr) minmax(620px,1.15fr)!important}
  .history-dashboard{gap:22px!important}
  .content{padding-left:42px;padding-right:42px}
}

@media(min-width:1900px){
  .content{padding-left:64px;padding-right:64px}
  .day-dashboard{max-width:1580px!important}
  .history-dashboard{max-width:1740px!important}
}


/* PEA 0.99.3 – Desktop-Feinschliff, Alkohol-Fokus und robuste Beschriftungen */
@media(min-width:1120px){
  .history-range-card{grid-column:1 / 5;min-height:auto}
  .history-section-nav{grid-column:5 / 10;grid-template-columns:repeat(4,minmax(0,1fr));min-height:auto}
  .pea-period-status{grid-column:10 / 13;min-height:auto}
  .history-kpi-grid{grid-column:1 / 13;grid-template-columns:repeat(4,minmax(0,1fr));display:grid;gap:14px}
  .history-kpi{min-height:94px}
  #history-weight{grid-column:1 / 8;grid-row:auto;min-height:570px}
  #history-energy{grid-column:8 / 13;grid-row:auto;min-height:570px}
  #history-macros{grid-column:1 / 5}
  #history-macros+article{grid-column:5 / 9}
  .reflection-history-card{grid-column:9 / 13}
  .history-dashboard>.habit-analysis-card,.history-dashboard>.habits-card{grid-column:1 / 13}
  .habit-grid{grid-template-columns:minmax(0,1.3fr) minmax(340px,.7fr)}
  .history-range-button,.history-today-button,.history-section-nav button,.daily-activity-option,.entry-meal-button,.online-food-filters button{white-space:normal!important;overflow-wrap:anywhere;word-break:normal;line-height:1.15;padding-inline:10px}
  .history-range-button,.history-today-button{min-width:62px;min-height:48px}
  .history-section-nav button{font-size:13px;min-width:0}
  .daily-activity-option{min-width:0;font-size:12px}
}
.alcohol-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.alcohol-plain-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.alcohol-plain-summary>div,.alcohol-top-list>div{padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:#fff}
.alcohol-plain-summary span,.alcohol-top-list>span{display:block;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.alcohol-plain-summary b{display:block;margin-top:4px}
.alcohol-top-list{display:grid;gap:8px;margin-top:12px}.alcohol-top-list>div{display:flex;justify-content:space-between;gap:12px;align-items:center}.alcohol-top-list small{color:var(--muted);text-align:right}
.alcohol-health-details{margin-top:12px;border:1px solid var(--line);border-radius:13px;background:var(--profile-soft)}.alcohol-health-details summary{padding:12px;cursor:pointer;font-weight:800}.alcohol-health-details .alcohol-comparison{padding:0 12px 12px}
.reference-fraction-buttons{display:grid!important;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}.reference-fraction-buttons button{min-height:40px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--profile-primary);font-weight:900}
@media(max-width:760px){.alcohol-kpis{grid-template-columns:1fr 1fr!important}.alcohol-plain-summary{grid-template-columns:1fr}.alcohol-top-list>div{align-items:flex-start;flex-direction:column}.alcohol-top-list small{text-align:left}}

/* PEA 0.99.5 – ruhige Desktop-Tagesansicht; mobile Darstellung bleibt unverändert */
@media(min-width:1120px){
  /* Datum näher an den Tagesinhalt rücken und als kompakte Kopfzeile lesen */
  .datebar{
    max-width:1500px;
    margin:0 auto 14px;
    grid-template-columns:48px minmax(320px,520px) 48px;
    justify-content:start;
  }
  .datebar .date{min-height:52px;display:flex;flex-direction:column;justify-content:center}

  /* Klare Hierarchie: oben Eingabe + kompakte Bilanz, darunter Mahlzeiten + Tagesgefühl */
  .day-dashboard{
    grid-template-columns:minmax(620px,1.45fr) minmax(430px,.85fr)!important;
    grid-template-areas:
      "entry budget"
      "meals context"
      "suggestions suggestions"!important;
    column-gap:22px!important;
    row-gap:18px!important;
    max-width:1500px!important;
    align-items:start!important;
  }

  .day-dashboard .quick-entry-card{
    min-height:0!important;
    padding:18px 20px!important;
  }
  .quick-entry-card .title{margin-bottom:8px}
  .quick-entry-card .quick-entry-row{grid-template-columns:minmax(0,1fr) 220px!important}
  .quick-entry-card #quickInput,.quick-entry-card .quick-submit{min-height:54px}
  .quick-entry-card .entry-context{margin-top:6px}

  /* Bilanz bewusst kompakter: Reagenzglas bleibt sichtbar, dominiert aber nicht */
  .day-dashboard .points-hero{
    min-height:0!important;
    padding:16px 18px!important;
  }
  .points-hero .hero-topline{margin-bottom:4px}
  .points-hero .pea-budget-visual{
    grid-template-columns:82px minmax(0,1fr)!important;
    min-height:160px!important;
    margin:6px 0 8px!important;
    padding:10px 14px!important;
    gap:14px!important;
  }
  .points-hero .pea-tube-wrap{width:72px!important;height:154px!important}
  .points-hero .pea-tube{width:42px!important;height:140px!important}
  .points-hero .pea-budget-main strong{font-size:36px!important}
  .points-hero .pea-budget-main span{font-size:17px!important}
  .points-hero .pea-budget-kcal,.points-hero .pea-budget-remaining{font-size:13px!important}
  .points-hero .energy{font-size:22px!important;margin-top:4px!important}
  .points-hero .progress{margin:7px 0!important}
  .points-hero .day-pea-status{padding:10px 12px!important;margin-top:6px!important}
  .points-hero .macros{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important;margin-top:8px!important}
  .points-hero .macro{padding:9px 10px!important;min-height:58px}
  .points-hero .macro span{font-size:10px!important}.points-hero .macro b{font-size:12px!important;line-height:1.25}

  /* Mahlzeiten erhalten die größere Arbeitsfläche, aber keine künstliche Mindesthöhe */
  .day-dashboard .meals{
    min-height:0!important;
    padding:18px 20px!important;
  }
  .meals .meal{padding:15px 4px!important}
  .meals .meal b{font-size:15px!important}
  .meals .meal strong{font-size:14px!important}

  /* Tagesgefühl als kompakte Ergänzung statt zweites Hauptdashboard */
  .day-dashboard .day-context-card{
    padding:16px!important;
    align-self:start;
  }
  .day-context-card .title{margin-bottom:4px}
  .day-context-card .title h2{font-size:19px}
  .day-context-intro{display:none}
  .day-context-card .day-context-section{padding:10px!important;margin-top:9px!important}
  .day-context-heading{margin-bottom:6px!important}
  .reflection-question{padding:8px 0!important;gap:10px!important}
  .reflection-question>b{font-size:12px!important;min-width:92px}
  .reflection-option{min-height:36px!important;padding:7px 8px!important;font-size:12px!important}
  .daily-activity-options{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important}
  .daily-activity-option{padding:8px 5px!important;min-height:58px!important}
  .daily-activity-option b{font-size:12px!important}.daily-activity-option small{font-size:10px!important}
  .daily-activity-breakdown{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;margin-top:8px!important}
  .daily-activity-breakdown>div{padding:9px 10px!important;min-height:58px}
  .daily-activity-breakdown span{font-size:10px!important}.daily-activity-breakdown b{font-size:13px!important;line-height:1.25}

  /* Persönliche Hinweise nur bei Inhalt und dann als ruhige Abschlusszeile über volle Breite */
  .day-dashboard .personal-suggestion-card{
    grid-area:suggestions!important;
    width:100%;
    padding:16px 20px!important;
  }
  .personal-suggestion-card .suggestion-row{min-height:58px}
}

@media(min-width:1500px){
  .day-dashboard{grid-template-columns:minmax(720px,1.55fr) minmax(470px,.85fr)!important}
}

/* PEA 0.99.5 – vollbreiter Desktop-Tageskopf und lückenfreie Spalten */
@media(min-width:1120px){
  /* Der Arbeitsbereich beginnt direkt nach der Sidebar und nutzt die verfügbare Breite. */
  .content{padding-left:24px!important;padding-right:30px!important}
  .content>header,#main,.datebar{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}

  /* Datum als echte, vollbreite Kopfzeile statt verlorener Insel. */
  .datebar{
    display:grid!important;
    grid-template-columns:52px minmax(0,1fr) 52px!important;
    gap:10px!important;
    align-items:stretch!important;
    margin:0 0 14px!important;
    padding:8px!important;
    border:1px solid var(--line);
    border-radius:18px;
    background:rgba(255,255,255,.78);
    box-shadow:0 8px 26px rgba(38,48,64,.045);
  }
  .datebar>button{min-height:50px;border-radius:13px}
  .datebar .date{align-items:flex-start!important;padding:7px 16px!important;text-align:left!important}
  .datebar .date span{font-size:11px;color:var(--muted)}
  .datebar .date b{font-size:18px;line-height:1.15}

  /* Zwei unabhängige vertikale Spalten verhindern große Leerflächen zwischen den Karten. */
  .day-dashboard.is-desktop-columns{
    display:grid!important;
    grid-template-columns:minmax(650px,1.38fr) minmax(430px,.82fr)!important;
    grid-template-areas:"primary secondary" "suggestions suggestions"!important;
    column-gap:20px!important;
    row-gap:16px!important;
    width:100%!important;
    max-width:none!important;
    align-items:start!important;
  }
  .day-desktop-column{display:grid;gap:16px;align-content:start;min-width:0}
  .day-desktop-primary{grid-area:primary}
  .day-desktop-secondary{grid-area:secondary}
  .day-dashboard.is-desktop-columns>.personal-suggestion-card{grid-area:suggestions!important}
  .day-desktop-column>.card{width:100%;min-width:0;margin:0!important}

  /* Die vorherigen Grid-Areas der Einzelkarten dürfen innerhalb der Spalten nicht mehr wirken. */
  .day-desktop-column>.quick-entry-card,
  .day-desktop-column>.points-hero,
  .day-desktop-column>.meals,
  .day-desktop-column>.day-context-card{grid-area:auto!important;grid-column:auto!important;grid-row:auto!important}

  .day-desktop-primary .quick-entry-card{padding:16px 18px!important}
  .day-desktop-primary .meals{padding:16px 18px!important}
  .day-desktop-secondary .points-hero{padding:14px 16px!important}
  .day-desktop-secondary .day-context-card{padding:14px!important}
}

@media(min-width:1600px){
  .content{padding-left:30px!important;padding-right:38px!important}
  .day-dashboard.is-desktop-columns{grid-template-columns:minmax(760px,1.45fr) minmax(470px,.78fr)!important;gap:22px!important}
}

/* PEA 0.99.6 – geordneter Kopf der Desktop-Auswertung */
.history-page-header{display:none}
@media(min-width:1120px){
  body[data-page="history"] .content>header{display:none!important}
  .history-page-header{
    grid-column:1 / 13;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    padding:16px 18px;
    border:1px solid var(--line);
    border-radius:20px;
    background:linear-gradient(145deg,#fff,color-mix(in srgb,var(--profile-soft) 58%,#fff));
    box-shadow:0 10px 30px rgba(38,48,64,.05);
  }
  .history-page-title span{display:block;color:var(--profile-primary);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
  .history-page-title h1{margin:3px 0 0;font-size:26px;line-height:1;color:var(--deep)}
  .history-profile-summary{display:flex;align-items:center;justify-content:flex-end;gap:18px;min-width:0}
  .history-profile-button{display:flex;align-items:center;gap:10px;min-width:230px;padding:7px 12px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--deep);text-align:left}
  .history-profile-button .history-profile-avatar{width:42px;height:42px;flex:0 0 42px}
  .history-profile-button span span{display:block;min-width:0}
  .history-profile-button b,.history-profile-button small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .history-profile-button b{font-size:14px}.history-profile-button small{margin-top:2px;color:var(--muted);font-size:10px}
  .history-header-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
  .history-header-controls .energy-mode-switch,.history-header-controls .density-mode-switch{background:#fff}
  .history-header-controls .energy-mode-switch button,.history-header-controls .density-mode-switch button{min-height:34px;padding:7px 10px}
  .history-range-card{grid-column:1 / 5}
  .history-section-nav{grid-column:5 / 10}
  .pea-period-status{grid-column:10 / 13}
}
@media(min-width:1120px) and (max-width:1320px){
  .history-page-header{align-items:flex-start}
  .history-profile-summary{flex-direction:column;align-items:flex-end;gap:8px}
  .history-profile-button{min-width:210px}
}

/* PEA 0.99.8 – Auswertung im einheitlichen Seitenkopf */
.history-page-header{
  display:block;
  width:100%;
}
.history-page-header .history-page-title{
  margin:0;
  align-items:center;
}
.history-page-header .history-page-title h2{
  margin:0 0 4px;
}
.history-page-header .history-page-title .tag{
  display:block;
  margin:0;
}
.history-page-header .history-header-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
@media(min-width:1120px){
  body[data-page="history"] .content>header{display:flex!important}
  .history-page-header{
    grid-column:1 / 13;
    padding:18px 20px;
    border-radius:20px;
    background:#fff;
    box-shadow:var(--shadow);
  }
  .history-page-header .history-page-title{
    display:flex;
    justify-content:space-between;
    gap:20px;
  }
  .history-page-header .history-page-title h2{
    font-size:26px;
    line-height:1.1;
  }
  .history-page-header .history-header-controls .energy-mode-switch,
  .history-page-header .history-header-controls .density-mode-switch{
    background:var(--soft);
  }
  .history-range-card{grid-column:1 / 5}
  .history-section-nav{grid-column:5 / 10}
  .pea-period-status{grid-column:10 / 13}
}
@media(max-width:1119px){
  .history-page-header{
    margin-bottom:12px;
  }
  .history-page-header .history-page-title{
    display:block;
  }
  .history-page-header .history-header-controls{
    margin-top:12px;
    justify-content:flex-start;
  }
}
@media(min-width:1120px){
  .history-page-header .history-page-title .tag{
    color:var(--muted);
    font-size:12px;
    font-weight:600;
    text-transform:none;
    letter-spacing:0;
  }
}

/* PEA 0.99.8 – konsistente Desktop-Kopfzeilen
   Auf großen Bildschirmen übernimmt die feste Seitenleiste Profil, Navigation und Verwaltung.
   Die mobile globale Kopfzeile wird deshalb auf allen Desktop-Seiten ausgeblendet. */
@media(min-width:1120px){
  .content>header{
    display:none!important;
  }

  /* Keine durch den entfernten Kopf verursachte Leerstelle. */
  .content{
    padding-top:18px!important;
  }

  /* Profilzugriff am Desktop ausschließlich über die feste Profilkarte der Seitenleiste. */
  #mobileProfileAvatar,
  .content>header .avatar,
  .content>header .header-actions,
  .content>header .brand.mobile{
    display:none!important;
  }

  /* Seitenköpfe und erste Inhaltskarten beginnen auf allen Menüseiten an derselben Oberkante. */
  #main>.card:first-child,
  #main>.history-page-header,
  #main>.foods-page-header,
  #main>.recipes-page-header,
  #main>.info-page-header{
    margin-top:0!important;
  }
}

/* PEA 0.99.9 – Makronährstoffe direkt in der Tagesbilanz */
.daily-macro-card{margin-top:12px;padding:13px 14px;border:1px solid var(--line);border-radius:17px;background:rgba(255,255,255,.86)}
.daily-macro-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.daily-macro-title>div span{display:block;color:var(--muted);font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}
.daily-macro-title>div b{display:block;margin-top:2px;font-size:15px;color:var(--ink)}
.daily-macro-title .link{font-size:11px;padding:7px 9px;border-radius:10px;background:var(--profile-soft)}
.daily-macro-list{display:grid;gap:10px}
.daily-macro-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;align-items:center}
.daily-macro-head{display:contents}.daily-macro-head span{font-size:12px;font-weight:850}.daily-macro-head b{font-size:12px;text-align:right}
.daily-macro-track{grid-column:1 / -1;position:relative;height:8px;border-radius:99px;background:#e7efed;overflow:hidden}
.daily-macro-track i{display:block;height:100%;max-width:100%;border-radius:inherit;background:var(--profile-primary);transition:width .25s ease}
.daily-macro-target{position:absolute;right:0;top:0;bottom:0;border-right:2px solid rgba(31,54,51,.25)}
.daily-macro-row small{grid-column:1 / -1;color:var(--muted);font-size:10px}
.daily-macro-row.low .daily-macro-track i,.daily-macro-row.open .daily-macro-track i{opacity:.62}
.daily-macro-row.watch .daily-macro-track i{background:#d89b28}.daily-macro-row.high .daily-macro-track i{background:#bf665f}
.daily-macro-row.good small{color:var(--profile-primary)}.daily-macro-row.watch small{color:#986414}.daily-macro-row.high small{color:#9d4642}
.daily-macro-advice{display:flex;gap:9px;align-items:flex-start;margin-top:12px;padding:10px 11px;border-radius:13px;background:var(--profile-soft);color:var(--ink)}
.daily-macro-advice>span{color:var(--profile-primary);font-weight:900}.daily-macro-advice p{margin:0;font-size:11px;line-height:1.45}
@media(max-width:560px){.daily-macro-card{padding:12px;margin-top:10px}.daily-macro-list{gap:9px}.daily-macro-title>div b{font-size:14px}}
@media(min-width:1120px){.points-hero .daily-macro-card{margin-top:10px;padding:12px 13px}.points-hero .daily-macro-list{grid-template-columns:1fr;gap:8px}.points-hero .daily-macro-advice{margin-top:10px;padding:9px 10px}.points-hero .daily-macro-advice p{font-size:10px}}


/* PEA 0.99.10 – globale Darstellungsdichte, Auswertung als echte Tabs */
.history-tabs button.active{
  background:var(--profile-primary,var(--primary))!important;
  border-color:var(--profile-primary,var(--primary))!important;
  color:#fff!important;
  box-shadow:0 5px 14px color-mix(in srgb,var(--profile-primary,var(--primary)) 20%,transparent);
}
[data-history-tab-panel][hidden]{display:none!important}
@media(max-width:1119px){
  .history-page-header .history-header-controls{margin-top:10px}
  .history-page-header .history-header-controls .energy-mode-switch{width:100%;max-width:620px}
  .history-tabs{scrollbar-width:none}
  .history-tabs::-webkit-scrollbar{display:none}
  .history-tabs button{flex:1 0 auto;min-width:105px}
}

/* PEA 1.0.0-alpha.1 – Benutzerkonten, Profile und Zugriffe */
.account-summary-card{display:flex;align-items:center;gap:12px;margin:10px 0 14px;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--soft)}
.account-summary-card.large{padding:15px}
.account-summary-avatar,.account-list-avatar{display:grid;place-items:center;flex:0 0 auto;width:44px;height:44px;border-radius:50%;background:var(--profile-primary,var(--deep));color:#fff;font-weight:900;font-size:17px}
.account-summary-card.large .account-summary-avatar{width:54px;height:54px;font-size:20px}
.account-summary-card>div:last-child{min-width:0}
.account-summary-card b,.account-summary-card span,.account-summary-card small{display:block}
.account-summary-card b{font-size:15px}.account-summary-card span{margin-top:2px;color:var(--muted);font-size:12px}.account-summary-card small{margin-top:4px;color:var(--profile-primary);font-weight:800;font-size:10px;text-transform:uppercase;letter-spacing:.05em}
.profile-picker-note{line-height:1.5}.sheet-section-heading{margin:18px 0 8px;font-size:13px;color:var(--ink)}
.profile-account-actions{display:grid;gap:9px;margin-top:16px}.profile-account-actions .btn{margin:0}

.people-page{display:grid;gap:14px;width:100%}
.people-title-card{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 20px}
.people-title-card h2{margin:2px 0 5px;font-size:25px}.people-title-card p{max-width:760px;margin:0;color:var(--muted);line-height:1.45}.people-title-card .eyebrow,.account-page-title .eyebrow{color:var(--profile-primary);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.people-tabs{display:flex;gap:7px;padding:6px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.78);overflow:auto}
.people-tabs button{flex:1;min-width:130px;min-height:42px;padding:9px 14px;border-radius:11px;background:transparent;color:var(--muted);font-weight:850}
.people-tabs button.active{background:var(--profile-primary);color:#fff;box-shadow:0 5px 14px color-mix(in srgb,var(--profile-primary) 22%,transparent)}
.people-list{display:grid;gap:10px}
.person-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--line);border-radius:17px;background:#fff;box-shadow:0 7px 22px rgba(38,48,64,.035)}
.person-row.muted{opacity:.62}.people-avatar{width:48px;height:48px}.account-list-avatar{width:48px;height:48px}
.person-copy{min-width:0}.person-copy b,.person-copy span,.person-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.person-copy b{font-size:15px}.person-copy span{margin-top:3px;color:var(--ink);font-size:12px}.person-copy small{margin-top:4px;color:var(--muted);font-size:10px}
.person-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.btn.compact{min-height:36px;padding:8px 11px;font-size:11px}
.access-cards{display:grid;gap:12px}.access-user-card{border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden;box-shadow:0 7px 22px rgba(38,48,64,.035)}
.access-user-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;background:var(--soft)}.access-user-head b,.access-user-head span{display:block}.access-user-head span{margin-top:2px;color:var(--muted);font-size:11px}
.access-profile-list{display:grid}.access-profile-row{display:grid;grid-template-columns:minmax(170px,1fr) minmax(150px,220px) 116px;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--line)}.access-profile-row:first-child{border-top:0}.access-profile-row>div b,.access-profile-row>div small{display:block}.access-profile-row>div small{margin-top:2px;color:var(--muted);font-size:10px}.access-select{margin:0;min-height:38px;padding:7px 10px}
.default-profile-button{min-height:36px;padding:8px 10px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--muted);font-size:10px;font-weight:850}.default-profile-button.active{border-color:var(--profile-primary);background:var(--profile-soft);color:var(--profile-primary)}.default-profile-button:disabled{opacity:.38;cursor:not-allowed}
.access-legend{display:grid;gap:5px;padding:13px 15px;border-radius:15px;background:var(--soft);color:var(--muted);font-size:11px}.access-legend b{color:var(--ink)}
.account-password-section{margin-top:20px;padding-top:17px;border-top:1px solid var(--line)}.account-password-section h3{margin:0 0 10px}.check-row{display:flex!important;align-items:center;gap:8px;margin:12px 0}.check-row input{width:18px;height:18px}

.account-settings-dashboard{align-items:start}.account-page-title{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.account-page-title h2{margin:2px 0 5px}.account-page-title p{margin:0;color:var(--muted);line-height:1.45}.account-profile-summary{display:flex;align-items:center;gap:12px;margin:12px 0 15px;padding:12px;border-radius:15px;background:var(--soft)}.account-profile-summary>div b,.account-profile-summary>div span{display:block}.account-profile-summary>div span{margin-top:3px;color:var(--muted);font-size:11px}.settings-subsection{display:grid;gap:9px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}

.readonly-profile-card{display:flex;align-items:center;justify-content:space-between;gap:18px}.readonly-profile-card h2{margin:3px 0 5px}.readonly-profile-card p{margin:0;color:var(--muted)}.readonly-context-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.readonly-context-grid>div{padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}.readonly-context-grid span,.readonly-context-grid b{display:block}.readonly-context-grid span{color:var(--muted);font-size:10px}.readonly-context-grid b{margin-top:3px;font-size:12px}
.profile-readonly .side-capture:disabled,.profile-readonly .bottom .fab:disabled{opacity:.42;filter:grayscale(.25);cursor:not-allowed}

@media(min-width:1120px){
  .people-page{max-width:none}.people-list,.access-cards{grid-column:1/-1}
  .account-settings-dashboard{grid-template-columns:repeat(12,minmax(0,1fr))}.account-settings-dashboard>.account-page-title{grid-column:1/-1}.account-settings-dashboard>.card:not(.account-page-title){grid-column:span 4}
}
@media(max-width:760px){
  .people-title-card,.account-page-title{display:block}.people-title-card>.btn{margin-top:12px}.people-tabs button{min-width:112px}
  .person-row{grid-template-columns:auto minmax(0,1fr)}.person-actions{grid-column:1/-1;justify-content:flex-start}.person-actions .btn{flex:1}
  .access-profile-row{grid-template-columns:minmax(0,1fr) 132px}.default-profile-button{grid-column:1/-1;width:100%}
  .readonly-context-grid{grid-template-columns:1fr}.readonly-profile-card{align-items:flex-start}
}

/* PEA 1.0.0-alpha.2 – globale App-Tabs, Profilmenü und Einstellungen */
.app-header{
  position:relative;
  z-index:24;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.app-brand{min-width:0}
.app-brand .brand-logo{width:44px;height:44px;border-radius:14px}
.app-brand b{font-size:27px}
.app-brand small{max-width:190px;line-height:1.2}
.top-tabs{display:none}
.settings-button{
  position:relative;
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  color:var(--profile-primary);
  box-shadow:0 6px 18px rgba(38,48,64,.04);
}
.settings-button svg{width:22px;height:22px;fill:currentColor}
.settings-button i{
  position:absolute;
  left:50%;top:50%;
  width:6px;height:6px;
  border-radius:50%;
  transform:translate(-50%,-50%);
  background:#a8d93f;
  box-shadow:inset 0 0 0 1px rgba(32,86,23,.18);
}
.settings-button.active{
  border-color:var(--profile-primary);
  background:var(--profile-primary);
  color:#fff;
}
.settings-button.active i{background:#d5f279}
.mobile-profile-button{display:grid;place-items:center;padding:0;overflow:hidden}
.mobile-profile-button.active{outline:3px solid color-mix(in srgb,var(--profile-primary) 22%,transparent);border-color:var(--profile-primary)}
.desktop-profile-button{display:none}
.app-footer{display:none}

@media(max-width:1119px){
  .content>header.app-header{display:flex!important}
  .app-header .header-actions{display:flex!important}
  .app-brand small{font-size:9px}
  .settings-button,.mobile-profile-button{width:40px;height:40px;flex-basis:40px}
  .bottom{padding-bottom:max(16px,env(safe-area-inset-bottom))}
}

@media(min-width:1120px){
  body{overflow-x:hidden}
  .app-shell{display:block!important;min-height:100vh}
  .side{display:none!important}
  .content{
    width:100%!important;
    max-width:1780px!important;
    margin:0 auto!important;
    padding:0 clamp(24px,3vw,58px) 46px!important;
  }
  .content>header.app-header{
    position:sticky;
    top:0;
    z-index:32;
    display:grid!important;
    grid-template-columns:minmax(205px,auto) minmax(560px,1fr) minmax(260px,auto);
    align-items:center;
    gap:24px;
    width:100%!important;
    max-width:none!important;
    min-height:78px;
    margin:0 0 16px!important;
    padding:10px 0;
    background:linear-gradient(180deg,color-mix(in srgb,var(--bg) 94%,#fff) 0%,color-mix(in srgb,var(--bg) 86%,transparent) 82%,transparent 100%);
    backdrop-filter:blur(13px);
  }
  .content>header.app-header .header-actions{display:flex!important;justify-content:flex-end}
  .app-brand{display:flex!important;gap:11px;align-items:center}
  .app-brand .brand-logo{width:50px;height:50px;border-radius:16px}
  .app-brand b{font-size:30px}
  .app-brand small{font-size:9.5px;max-width:158px}
  .top-tabs{
    display:grid;
    grid-template-columns:repeat(5,minmax(96px,auto));
    justify-content:center;
    align-items:center;
    gap:6px;
    min-width:0;
    padding:6px;
    border:1px solid var(--line);
    border-radius:18px;
    background:rgba(255,255,255,.82);
    box-shadow:0 9px 28px rgba(38,48,64,.045);
  }
  .top-tabs button{
    min-width:0;
    min-height:46px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:8px 13px;
    border:0;
    border-radius:13px;
    background:transparent;
    color:var(--muted);
    white-space:nowrap;
    font-size:12px;
    font-weight:850;
    transition:background .16s ease,color .16s ease,transform .16s ease;
  }
  .top-tabs button>span{font-size:16px;line-height:1;color:var(--profile-primary)}
  .top-tabs button>b{font:inherit}
  .top-tabs button:hover{background:var(--profile-soft);color:var(--profile-primary)}
  .top-tabs button.active{
    background:#fff;
    color:var(--profile-primary);
    box-shadow:0 5px 16px rgba(38,48,64,.08);
  }
  .top-tabs .top-capture{
    min-width:112px;
    color:#fff;
    background:linear-gradient(145deg,var(--mint),var(--profile-primary));
    box-shadow:0 8px 20px color-mix(in srgb,var(--profile-primary) 22%,transparent);
  }
  .top-tabs .top-capture>span{color:#fff;font-size:20px}
  .top-tabs .top-capture:hover{color:#fff;background:linear-gradient(145deg,var(--profile-primary),var(--mint));transform:translateY(-1px)}
  .top-tabs .top-capture:disabled{opacity:.42;filter:grayscale(.3);cursor:not-allowed;transform:none}
  .settings-button{width:46px;height:46px;flex-basis:46px;border-radius:14px}
  .mobile-profile-button{display:none!important}
  .desktop-profile-button{
    min-width:196px;
    max-width:260px;
    height:52px;
    display:grid;
    grid-template-columns:38px minmax(0,1fr) 18px;
    align-items:center;
    gap:9px;
    padding:6px 10px 6px 7px;
    border:1px solid var(--line);
    border-radius:16px;
    background:rgba(255,255,255,.9);
    color:var(--text);
    text-align:left;
    box-shadow:0 7px 22px rgba(38,48,64,.045);
  }
  .desktop-profile-button:hover{border-color:color-mix(in srgb,var(--profile-primary) 42%,var(--line));background:#fff}
  .desktop-profile-button.active{border-color:var(--profile-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--profile-primary) 14%,transparent)}
  .desktop-profile-avatar{width:38px;height:38px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:var(--profile-soft);color:var(--profile-primary);font-weight:900}
  .desktop-profile-avatar .profile-avatar-shell{width:38px;height:38px}
  .desktop-profile-copy{min-width:0}
  .desktop-profile-copy b,.desktop-profile-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .desktop-profile-copy b{font-size:13px}
  .desktop-profile-copy small{margin-top:2px;color:var(--muted);font-size:9.5px}
  .desktop-profile-chevron{color:var(--profile-primary);font-size:18px;text-align:center}
  .bottom{display:none!important}
  .datebar{margin-top:0!important}
  #main{width:100%!important;max-width:none!important;margin-inline:0!important}
  .app-footer{display:block;margin-top:24px;padding:12px 2px;color:var(--muted);font-size:10px;text-align:right}

  .settings-dashboard{grid-template-columns:repeat(12,minmax(0,1fr))!important;align-items:start}
  .settings-dashboard>.settings-page-title{grid-column:1/-1}
  .settings-dashboard>.settings-display-card{grid-column:span 4}
  .settings-dashboard>.people-admin-entry{grid-column:span 4}
  .settings-dashboard>.card:not(.settings-page-title):not(.settings-display-card):not(.people-admin-entry){grid-column:span 4}
  .settings-page-title{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
  .settings-page-title h2{margin:3px 0 5px;font-size:25px}
  .settings-page-title p{max-width:780px;margin:0;color:var(--muted);line-height:1.45}
}

@media(min-width:1500px){
  .top-tabs{grid-template-columns:repeat(5,minmax(112px,auto));gap:7px}
  .top-tabs button{padding-inline:17px;font-size:13px}
}

@media(min-width:1120px) and (max-width:1320px){
  .content>header.app-header{grid-template-columns:175px minmax(500px,1fr) 224px;gap:14px}
  .app-brand small{display:none}
  .top-tabs{grid-template-columns:repeat(5,minmax(82px,auto));gap:4px}
  .top-tabs button{padding-inline:9px;font-size:11px}
  .desktop-profile-button{min-width:168px}
  .desktop-profile-copy small{display:none}
}

.top-tabs button:focus-visible,
.settings-button:focus-visible,
.desktop-profile-button:focus-visible,
.mobile-profile-button:focus-visible{
  outline:3px solid color-mix(in srgb,var(--profile-primary) 28%,transparent);
  outline-offset:2px;
}
.profile-readonly .top-capture:disabled{opacity:.42;filter:grayscale(.25);cursor:not-allowed}


/* PEA 1.0.0-alpha.3 – responsiver Gewichtsverlauf */
.history-weight-chart-wrap{
  width:100%;
  min-width:0;
  min-height:0!important;
  overflow:hidden;
}
.history-chart-scroll .history-weight-chart{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0!important;
  height:auto!important;
}
@media(max-width:700px){
  .history-weight-chart-wrap{padding:5px!important}
  .history-chart-scroll .history-weight-chart{min-width:0!important;height:auto!important}
}
