/* Gusto – globale Stile (Logo-Animation aus dem Design) + responsives Layout */
html{-webkit-text-size-adjust:100%}
body{margin:0;background:#F5EFE3;font-family:'Figtree',system-ui,sans-serif;color:#1E2A22;overflow-x:hidden}
a{color:#855010}a:hover{color:#6A400C}
button,select,input{font-family:inherit}
button:disabled{cursor:not-allowed}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #2F5D3A;outline-offset:2px}
.gusto-title{font-family:'Outfit','Plus Jakarta Sans',system-ui,-apple-system,sans-serif;font-size:34px;font-weight:700;fill:#2D5A27;letter-spacing:0.12em}
.gusto-tagline{font-family:'Plus Jakarta Sans',system-ui,-apple-system,sans-serif;font-size:25px;fill:#70A95A}

/* Logo-Animation: G öffnet den unteren rechten Bogen wie einen Mund, frisst „usto“ und kehrt zurück (7 s je Durchlauf) */
@keyframes gustoGMove{0%,14%{transform:translateX(0)}24%{transform:translateX(14px)}70%{transform:translateX(114px)}76%{transform:translateX(114px)}90%,100%{transform:translateX(0)}}
@keyframes gustoGJaw{0%,12%{transform:rotate(0deg)}20%{transform:rotate(34deg)}30%{transform:rotate(10deg)}36%{transform:rotate(34deg)}42%{transform:rotate(10deg)}48%{transform:rotate(34deg)}54%{transform:rotate(10deg)}60%{transform:rotate(34deg)}66%{transform:rotate(12deg)}70%{transform:rotate(30deg)}78%,100%{transform:rotate(0deg)}}
@keyframes gustoUstoEat{0%,24%{clip-path:inset(0 0 0 0);opacity:1}70%{clip-path:inset(0 0 0 100%);opacity:1}86%{clip-path:inset(0 0 0 100%);opacity:0}87%{clip-path:inset(0 0 0 0);opacity:0}100%{clip-path:inset(0 0 0 0);opacity:1}}
.gusto-g-move{animation:gustoGMove 7s linear infinite}
.gusto-g-jaw{transform-box:fill-box;transform-origin:0% 75%;animation:gustoGJaw 7s ease-in-out infinite}
.gusto-usto{animation:gustoUstoEat 7s linear infinite}

/* Ladeanzeige und Hinweis-Toast */
@keyframes gustoSpin{to{transform:rotate(360deg)}}
.gusto-spinner{width:36px;height:36px;border-radius:50%;border:4px solid #E2D7C3;border-top-color:#9A5E12;animation:gustoSpin 0.9s linear infinite}
.gusto-toast{position:fixed;left:0;right:0;margin:0 auto;width:fit-content;bottom:calc(24px + env(safe-area-inset-bottom));z-index:50;max-width:min(560px,calc(100vw - 32px));box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:12px 8px 12px 18px;border-radius:14px;background:#1E2A22;color:#FFFDF8;font-size:14px;line-height:1.45;box-shadow:0 12px 40px rgba(30,42,34,0.3)}

@media (prefers-reduced-motion: reduce){.gusto-g-move,.gusto-g-jaw,.gusto-usto,.gusto-spinner{animation:none}}

/* Grundlayout: Inhalt zentriert, Hauptspalte flexibel */
.gusto-root{width:100%;max-width:1440px;margin:0 auto;padding-bottom:env(safe-area-inset-bottom)}
.g-header{position:sticky;top:0;z-index:15;padding-top:env(safe-area-inset-top)!important;height:auto!important;min-height:80px}
/* Kochmodus: „Zurück“/„Weiter“ und laufende Timer bleiben am unteren Bildschirmrand stehen */
.g-page.g-cookpage{padding-bottom:0!important}
.g-cookbar{padding-bottom:calc(16px + env(safe-area-inset-bottom));box-shadow:0 -10px 14px 2px #1E2A22}
.g-main{width:auto!important;flex:1 1 956px!important;min-width:0}
.g-aside{flex:0 1 380px!important;min-width:300px}
.g-overlay{position:fixed!important}
.g-dialog{max-width:100%;max-height:calc(100vh - 80px);overflow-y:auto}
.g-diff{flex-wrap:wrap}

/* Tablet / kleines Notebook: Seitenleiste unter den Inhalt */
@media (max-width:1100px){
  .g-planrow{flex-direction:column!important;align-items:stretch!important}
  .g-aside{flex:1 1 auto!important;min-width:0;width:100%}
  .g-main{flex:1 1 auto!important;width:100%!important}
  .g-recipes{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .g-scroll{max-height:none!important;overflow:visible!important;margin:0!important;padding:0!important}
  .g-favrow{flex-direction:column!important;align-items:stretch!important}
  .g-favlist{width:100%!important}
  .g-header{flex-wrap:wrap;row-gap:10px;padding-top:10px!important;padding-bottom:10px!important}
  .g-nav{order:3;flex-basis:100%}
}

/* Smartphone */
@media (max-width:720px){
  .g-header{padding-left:16px!important;padding-right:16px!important;gap:10px!important}
  .g-hsub,.g-hleft>span:not(.g-hsub),.g-acct,.g-private,.g-hright>span[title]{display:none!important}
  .g-hleft svg{height:46px;width:122px}
  .g-hright{margin-left:auto}
  .g-nav{gap:6px!important}
  .g-nav>div{padding:0 10px 0 6px!important;font-size:13px!important;gap:6px!important}
  .g-page{padding:20px 16px 32px!important;gap:20px!important}
  .g-center{padding:24px 16px!important}
  .g-card{width:100%!important;padding:24px!important}
  .gusto-root h1{font-size:30px!important}
  .gusto-root section{padding:20px!important}
  .g-row{flex-direction:column!important}
  .g-portions{width:auto!important}
  .g-cuisines{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .g-recipes{grid-template-columns:minmax(0,1fr)!important}
  .g-days{gap:4px!important}
  .g-days button{min-height:48px!important;padding:0!important}
  .g-slotrow{flex-wrap:wrap;gap:10px!important}
  .g-slotlabel{width:auto!important;flex-basis:100%}
  .g-slotrow .g-days{flex-basis:100%}
  .g-shop,.g-2col{grid-template-columns:minmax(0,1fr)!important}
  .g-wrap{flex-wrap:wrap}
  .g-favdetail{padding:20px!important}
  .g-overlay{padding:16px!important;align-items:center!important}
  .g-dialog{width:100%!important;padding:22px!important}
  /* Rezept-Details als Blatt von unten */
  .g-sheet-wrap{padding:0!important;align-items:flex-end!important}
  .g-sheet{padding:0!important;border-radius:24px 24px 0 0!important;max-height:92vh!important;padding-bottom:env(safe-area-inset-bottom)!important}
  /* Header: nur Symbole */
  .g-blabel{display:none!important}
}

/* =====================================================================
   Dunkelmodus: html[data-theme="dark"]
   Die App setzt Farben inline; hier werden die festen Designfarben auf
   warme, dunkle Töne umgelegt (Akzent-Rot und -Grün bleiben).
   ===================================================================== */
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="dark"] body{background:#121814;color:#ECE6D8}

/* Flächen */
html[data-theme="dark"] [style*="background: rgb(245, 239, 227)"]{background:#121814!important}
html[data-theme="dark"] [style*="background: rgb(255, 253, 248)"]{background:#1C241F!important}
html[data-theme="dark"] [style*="background: rgb(255, 255, 255)"]{background:#232C26!important}
html[data-theme="dark"] [style*="background: rgb(248, 243, 234)"]{background:#212A24!important}
html[data-theme="dark"] [style*="background: rgb(242, 236, 224)"]{background:#262F29!important}
html[data-theme="dark"] [style*="background: rgb(237, 229, 213)"]{background:#2A342D!important}
html[data-theme="dark"] [style*="background: rgb(237, 243, 234)"]{background:#1D3024!important}
html[data-theme="dark"] [style*="background: rgb(225, 236, 220)"]{background:#233D2B!important}
html[data-theme="dark"] [style*="background: rgb(244, 216, 208)"]{background:#3D2520!important}
html[data-theme="dark"] [style*="background: rgb(245, 228, 191)"]{background:#3B3120!important}
html[data-theme="dark"] [style*="background: rgb(255, 246, 220)"]{background:#3A321E!important}
html[data-theme="dark"] [style*="background: rgb(226, 215, 195)"]{background:#3A443D!important}
html[data-theme="dark"] [style*="background: rgb(203, 191, 166)"]{background:#4C564E!important}
/* Dunkle Flächen (Banner, Kochmodus) bleiben dunkel, heben sich aber vom Hintergrund ab */
html[data-theme="dark"] [style*="background: rgb(30, 42, 34)"]{background:#243028!important}
/* Dunkle Knöpfe/gewählte Chips werden hell mit dunkler Schrift – so bleibt „ausgewählt“ klar erkennbar */
html[data-theme="dark"] button[style*="background: rgb(30, 42, 34)"],
html[data-theme="dark"] a[style*="background: rgb(30, 42, 34)"]{background:#E7E0CF!important;color:#16201A!important}

/* Schrift */
html[data-theme="dark"] [style*="color: rgb(30, 42, 34)"]{color:#ECE6D8!important}
html[data-theme="dark"] [style*="color: rgb(90, 97, 87)"]{color:#AEB5A8!important}
html[data-theme="dark"] [style*="color: rgb(63, 70, 61)"]{color:#CBD0C4!important}
html[data-theme="dark"] [style*="color: rgb(150, 44, 25)"]{color:#F2917A!important}
html[data-theme="dark"] [style*="color: rgb(43, 85, 53)"]{color:#93D3A1!important}
html[data-theme="dark"] [style*="color: rgb(31, 63, 39)"]{color:#A9DDB4!important}
html[data-theme="dark"] [style*="color: rgb(92, 62, 10)"]{color:#EBC67F!important}
html[data-theme="dark"] [style*="color: rgb(110, 31, 17)"]{color:#F4A48F!important}
html[data-theme="dark"] [style*="color: rgb(116, 80, 15)"]{color:#E8C06F!important}
/* …aber nicht auf Flächen, die bewusst hell bleiben (Knöpfe oben, Gold-Badges) */
html[data-theme="dark"] button[style*="background: rgb(30, 42, 34)"] *{color:inherit}
html[data-theme="dark"] [style*="background: rgb(233, 178, 46)"][style*="color: rgb(30, 42, 34)"]{color:#1E2A22!important}

/* Linien */
html[data-theme="dark"] [style*="solid rgb(226, 215, 195)"]{border-color:#3A443D!important}
html[data-theme="dark"] [style*="solid rgb(203, 191, 166)"]{border-color:#4C564E!important}
html[data-theme="dark"] [style*="solid rgb(239, 231, 216)"]{border-color:#2E3830!important}
html[data-theme="dark"] [style*="solid rgb(30, 42, 34)"]{border-color:#ECE6D8!important}

/* Schalter: heller Knopf auf der Schiene */
html[data-theme="dark"] [role="switch"] > span{background:#ECE6D8!important}

/* Pastellflächen der Rezepte (Zeichnungen) bleiben hell – Text darauf dunkel */
html[data-theme="dark"] .g-tilehead,html[data-theme="dark"] .g-tilehead *{color:#1E2A22!important}
html[data-theme="dark"] .g-tilehead span[style*="color: rgb(133, 80, 16)"]{color:#855010!important}

/* Kochmodus: bleibt dunkel und ruhig */
html[data-theme="dark"] .g-cook{background:#0F1511!important}
html[data-theme="dark"] .g-cookbar{background:#0F1511!important;box-shadow:0 -10px 14px 2px #0F1511}

/* Logo: helleres Grün auf dunklem Grund */
html[data-theme="dark"] .gusto-title{fill:#9AD6A5}
html[data-theme="dark"] .gusto-tagline{fill:#8CC47A}
html[data-theme="dark"] header svg [stroke="#2D5A27"]{stroke:#9AD6A5}
/* Symbol im Knopf „Mein Plan“: folgt der Schriftfarbe (sonst dunkel auf dunkel bzw. Ocker auf hellem Knopf) */
html[data-theme="dark"] button[aria-label="Mein Plan"] svg{stroke:currentColor}

/* Hinweis-Toast und Dialog-Schatten */
html[data-theme="dark"] .gusto-toast{background:#2E3B32;border:1px solid #3A443D}
html[data-theme="dark"] .g-dialog{box-shadow:0 20px 60px rgba(0,0,0,0.6)!important}
html[data-theme="dark"] input::placeholder{color:#7F877C}

/* Dunkelmodus: Küchen-Kacheln – Name auf dunklem, halbtransparentem Schild über der Flagge */
html[data-theme="dark"] .g-clabel{background:rgba(18,24,20,0.82)!important;color:#ECE6D8!important}
html[data-theme="dark"] [style*="background: rgba(255, 255, 255, 0.9)"]{background:rgba(18,24,20,0.85)!important}

/* Einmaliger Hinweis-Pfeil auf „Mein Plan“ */
@keyframes gustoBounce{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,8px)}}
.g-weekhint{position:absolute;top:calc(100% + 4px);left:50%;transform:translate(-50%,0);z-index:20;display:flex;flex-direction:column;align-items:center;gap:0;padding:0;border:none;background:transparent;cursor:pointer;animation:gustoBounce 1.1s ease-in-out infinite}
.g-weekhint-label{padding:7px 12px;border-radius:12px;background:#9A5E12;color:#FFFFFF;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 6px 18px rgba(30,42,34,0.25)}
@media (prefers-reduced-motion: reduce){.g-weekhint{animation:none}}

/* Dunkelmodus: Akzentfarbe Honig-Ocker */
html[data-theme="dark"] [style*="color: rgb(133, 80, 16)"]{color:#E6B566!important}
html[data-theme="dark"] [style*="background: rgb(154, 94, 18)"]{background:#A8691A!important}
html[data-theme="dark"] [style*="background: rgb(242, 226, 196)"]{background:#3A2F1C!important}
html[data-theme="dark"] a{color:#E6B566}

/* Favorit gesetzt: großer Stern springt kurz in der Bildschirmmitte auf */
.g-favburst{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;pointer-events:none}
.g-favburst svg{animation:g-favpop 1.1s cubic-bezier(.2,.8,.3,1.2) forwards;filter:drop-shadow(0 8px 24px rgba(30,42,34,.25))}
.g-favburst .g-ray{animation:g-favray 1.1s ease-out forwards;transform-origin:80px 80px}
@keyframes g-favpop{0%{transform:scale(.2) rotate(-25deg);opacity:0}35%{transform:scale(1.15) rotate(6deg);opacity:1}55%{transform:scale(1) rotate(0)}80%{opacity:1}100%{transform:scale(1.05);opacity:0}}
@keyframes g-favray{0%{transform:scale(.4);opacity:0}40%{opacity:.9}100%{transform:scale(1.35);opacity:0}}
@media (prefers-reduced-motion: reduce){.g-favburst svg,.g-favburst .g-ray{animation:g-favfade 1.1s linear forwards}@keyframes g-favfade{0%,70%{opacity:1}100%{opacity:0}}}
/* Dunkelmodus: Nebenaktionen (Stufe 2) */
html[data-theme="dark"] [style*="background: rgb(243, 230, 207)"]{background:#3A2F1C!important}
html[data-theme="dark"] [style*="color: rgb(107, 68, 16)"]{color:#E6B566!important}
/* Dunkelmodus: aktueller Schritt so hervorgehoben wie der aktive Reiter „Mein Plan“ */
html[data-theme="dark"] .g-nav [aria-current="step"]{background:#E7E0CF!important;color:#16201A!important;border-color:#E7E0CF!important}
/* Küchen-Kacheln: Wahrzeichen bzw. Tier unten rechts angeschnitten */
.g-ctile .g-ctart{position:absolute;right:-4px;bottom:-6px;pointer-events:none}
.g-ctile:focus-visible{outline:3px solid #9A5E12!important}
@media (max-width: 420px){.g-ctile .g-ctart{width:84px;height:84px}}
/* Dunkelmodus: Rahmen gewählter Küchen hell, damit er auf dunklem Grund sichtbar bleibt */
html[data-theme="dark"] .g-ctile[aria-pressed="true"]{outline-color:#ECE6D8!important}
