/* MealAlchemy v2.0: clean, functional alchemy-inspired UI.
   This stylesheet intentionally leaves the existing app's forms/modals/data views intact. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600;1,700&display=swap');
:root{--paper:#F8F4EC;--white:#FFFCF6;--ink:#13363A;--muted:#5B6B6C;--line:#E5DAC8;--green:#153E3E;--green2:#E6EDE5;--orange:#B84A2B;--shadow:0 12px 32px rgba(45,64,54,.09)}
html{scroll-behavior:smooth}body{background:#F8F4EC;color:var(--ink);font-family:'DM Sans',sans-serif}
.app-shell{max-width:1440px;padding:0 23px}.topbar{height:auto;min-height:92px;display:flex;gap:27px;align-items:center;border-bottom:0;padding:10px 12px 14px;background:transparent}
.brand{display:flex;align-items:center;flex-shrink:0;line-height:1;text-decoration:none;min-width:0}
.brand-logo{display:block;width:clamp(220px,22vw,275px);height:auto;max-width:100%;object-fit:contain;object-position:left center}
.topbar .tabs{display:flex;align-items:center;gap:3px;flex:1;min-width:0;margin:0;padding:0;border:0;overflow:visible;justify-content:center}.topbar .tab{color:#314B4A;display:flex;align-items:center;gap:7px;padding:14px 11px 15px;font-weight:600;font-size:12px;border-bottom:3px solid transparent;transition:color .2s,border-color .2s}
.topbar .tab.active{color:#A84328;border-bottom-color:#BA4A2B}.topbar .tab:hover{color:#A84328}.topbar .tab span{font-size:19px;line-height:1}.topbar .tab b{background:#F0E9D9;color:#8F6D54;font-size:9px}.topbar .nav-icon{width:18px;height:18px;vertical-align:-3px}
.top-actions{gap:8px;flex-shrink:0}.status-pill{background:#E8ECE6;color:#4F6860;font-size:10px;border-radius:18px}.top-actions .button{border-radius:999px;padding:10px 15px;background:#EFE5D3;color:#264644;font-size:12px;white-space:nowrap}.top-actions .button:hover{background:#E7D6BB}
main{padding-top:1px}.view{padding-bottom:30px}#home-view{padding-bottom:32px}
.hero{position:relative;isolation:isolate;display:flex;align-items:center;min-height:354px;padding:38px 6.5%;overflow:hidden;background:#FAF6EC;border:1px solid #EDE1CE;border-radius:25px 25px 66px 27px;box-shadow:0 8px 25px rgba(54,63,50,.05)}
.hero-illustration{position:absolute;inset:0 0 0 28%;z-index:-2;background-color:#FAF6EC;background-image:url('../assets/Magical Southwest Burrito Bowl.png');background-position:68% 45%;background-size:cover;background-repeat:no-repeat}
.hero-illustration:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#FAF6EC 0%,rgba(250,246,236,.95) 9%,rgba(250,246,236,.76) 27%,rgba(250,246,236,.24) 58%,rgba(250,246,236,0) 85%)}
.hero-content{position:relative;z-index:1;max-width:620px;width:61%;padding:12px 0}

.hero h1{font-family:'Playfair Display',Georgia,serif;font-weight:700;color:#143638;line-height:1.06;letter-spacing:-1.6px;font-size:clamp(37px,4.1vw,59px);margin:0;max-width:660px;text-shadow:none}
.hero h1 em{font-style:italic;color:#AF4427;font-weight:600;white-space:nowrap}
.hero-copy{color:#40575A;opacity:1;font-size:15px;line-height:1.68;margin:20px 0 0;max-width:450px}
.hero .hero-cta{background:#B44627;color:#FFFAEE;border:0;border-radius:999px;box-shadow:0 6px 14px rgba(135,53,28,.17);padding:14px 26px;font-size:15px;font-family:'DM Sans',sans-serif;font-weight:700;letter-spacing:0;display:inline-flex;align-items:center;gap:30px;margin-top:23px}
.hero .hero-cta:hover{background:#8E331C;color:#FFF9EC;transform:translateY(-2px)}.hero .hero-cta:focus-visible{outline:3px solid #315D58;outline-offset:4px}.hero .hero-cta span{font-size:22px}
.hero-flourish{font-size:15px;letter-spacing:18px;color:#C18B54;margin:21px 0 -15px 4px}
.home-dashboard{display:grid;grid-template-columns:minmax(0,2fr) minmax(310px,1fr);gap:17px;margin:20px 2px 0}
.home-panel{min-width:0;min-height:380px;display:flex;flex-direction:column;border-radius:23px;background:#FEFCF6;overflow:hidden;border:1px solid #EBE2D5;box-shadow:0 8px 18px rgba(28,45,38,.035)}
.home-panel-head{height:70px;min-height:70px;display:flex;align-items:center;justify-content:space-between;gap:9px;padding:13px 20px 15px;background:#153E3F;color:#F8F4E8;border-radius:0 0 32px 0}
.home-panel-heading{display:flex;align-items:center;gap:12px;min-width:0}.home-panel-heading h2{font-family:'Playfair Display',Georgia,serif;font-size:clamp(17px,1.55vw,23px);line-height:1.15;font-weight:600;letter-spacing:-.3px;margin:0;color:#FFF8ED}
.home-panel-symbol{display:grid;place-items:center;width:30px;height:30px;flex-shrink:0;border-radius:50%;color:#E4B775;border:1px solid rgba(233,191,133,.45);font-size:20px}
.home-text-action{border:0;color:#F8E7C2;background:transparent;font-size:11px;padding:8px 0;white-space:nowrap}.home-text-action:hover{text-decoration:underline}
.featured-body{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:23px;align-items:stretch;padding:19px;flex:1;min-height:295px}
.featured-media{position:relative;min-height:272px;border-radius:15px;overflow:hidden;display:grid;place-items:center;cursor:pointer;background:#D8DFC8 url('../assets/mealalchemy-v2-recipe.svg') center / cover no-repeat}
.featured-media #featured-emoji{font-size:0}.featured-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.featured-details{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:8px 5px 10px 0}
.featured-category{margin:0 0 10px;color:#986743;font-size:10px;letter-spacing:1.35px;font-weight:800;text-transform:uppercase}
.featured-details h3{font-family:'Playfair Display',Georgia,serif;font-size:clamp(22px,2.15vw,31px);line-height:1.19;letter-spacing:-.45px;color:#12353A;font-weight:600;margin:0 0 12px}
.featured-description{color:#5B6A6C;font-size:13px;line-height:1.65;margin:0;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.featured-meta{display:flex;flex-wrap:wrap;align-items:center;gap:13px;color:#466364;font-size:12px;margin-top:22px}.featured-meta span{white-space:nowrap}
.featured-actions{display:flex;align-items:center;gap:12px;margin-top:24px}
.featured-open{background:#B54729;color:#FFF9F0;padding:12px 20px;border-radius:14px;font-size:13px}.featured-open:hover{background:#96391F}.featured-open span{font-size:20px;margin-left:13px}
.featured-favorite{border:1px solid #E1D4BE;background:#FFFBF3;color:#A84B33;border-radius:50%;width:42px;height:42px;font-size:26px;line-height:1}.featured-favorite:hover{background:#F5E8DC}.featured-favorite[aria-pressed="true"]{color:#B44627}
.home-plan .home-panel-head{padding:13px 16px}.home-plan .home-panel-heading{gap:8px}.home-plan .home-panel-heading h2{font-size:clamp(17px,1.45vw,21px)}.home-plan .home-panel-symbol{width:27px;height:27px;font-size:17px}
.home-plan-body{flex:1;padding:14px 15px 0}.home-plan-list{display:flex;flex-direction:column;gap:4px}
.home-plan-row{width:100%;display:grid;align-items:center;grid-template-columns:25px 54px minmax(0,1fr) 12px;gap:9px;text-align:left;padding:9px 7px;background:#F7F5ED;color:var(--ink);border:1px solid transparent;border-radius:10px;transition:background .2s,border-color .2s}
.home-plan-row:hover{background:#EEEFE5;border-color:#D8DAC7}.home-plan-number{font-size:11px;font-family:Georgia,serif;letter-spacing:.5px;color:#8A8D79}
.home-plan-thumb{height:44px;width:54px;display:grid;place-items:center;font-size:24px;background:#E1E9DA;border-radius:8px;overflow:hidden;position:relative}.home-plan-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.home-plan-detail{display:flex;flex-direction:column;min-width:0;gap:5px}.home-plan-detail strong{font-family:'Playfair Display',Georgia,serif;font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-plan-detail small{font-size:10px;color:#6A7975;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-plan-arrow{font-size:21px;color:#A67E56}
.home-plan-empty{padding:33px 18px 27px;text-align:center;color:#56706E}.home-plan-empty>span{font-size:34px;color:#B97C48}.home-plan-empty p{font-family:'Playfair Display',Georgia,serif;font-size:18px;margin:8px auto}.home-plan-empty small{display:block;font-size:12px}.home-plan-empty button{background:transparent;border:0;color:#A84429;padding:18px 5px 5px;font-weight:700;font-size:12px;text-decoration:underline}
.home-plan-bottom{padding:10px 17px 13px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#66807C;font-size:11px;border-top:1px solid #EAE7DE;margin-top:14px}.home-plan-bottom button,.home-plan-more{border:0;background:transparent;color:#A34327;font-size:11px;font-weight:700;padding:4px}.home-plan-more{text-align:center;padding:9px}
.section-heading h2,.empty-state h3,.saved-plans h3{font-family:'Playfair Display',Georgia,serif}.section-heading{margin-top:22px}.eyebrow{color:#A14B2F}
.button-dark{background:#174948;border-radius:9px}.button-dark:hover{background:#103736}.button-light{background:#EAE6D9;color:#254B49}.button-light:hover{background:#D9DCCF}.tab.active{color:#A64428;border-color:#A64428}
.recipe-card{background:#FFFDF8;border-color:#E3D9C8;border-radius:7px 17px 7px 17px}.recipe-card h3{font-family:'Playfair Display',Georgia,serif}.card-heart.saved{color:#B44627}.category-chip{color:#526853;background:#E9EEE2}.searchbox{background:#FFFDF8}
.site-footer{display:block!important;margin-top:52px}
.site-footer .footer-links{display:flex;align-items:center;gap:12px 22px;flex-wrap:wrap}
.site-footer .footer-links button{text-decoration:none;color:inherit;opacity:.9;font-size:13px}
.site-footer .footer-links button:hover{text-decoration:underline;opacity:1}
.site-footer .footer-links button:focus-visible{outline:2px solid currentColor;outline-offset:4px;border-radius:2px}
@media(max-width:650px){.site-footer{margin-top:32px}.site-footer .footer-links{gap:10px 16px}}
@media(max-width:1220px){.topbar{gap:12px}.brand strong{font-size:26px}.topbar .tab{padding-left:8px;padding-right:8px}.topbar .tab b{display:none}.hero{min-height:332px}.home-dashboard{grid-template-columns:minmax(0,1.8fr) minmax(295px,1fr)}.featured-body{gap:15px}.featured-media{min-height:240px}}
@media(max-width:1000px){.app-shell{padding:0 18px}.topbar{flex-wrap:wrap;justify-content:space-between;padding-bottom:0}.topbar .tabs{order:3;flex-basis:100%;justify-content:center;border-top:1px solid #E8D9C8;overflow-x:auto;gap:8px}.topbar .tab{padding-top:12px;padding-bottom:12px}.hero-content{width:66%}.hero h1{font-size:clamp(36px,5.1vw,55px)}.hero-illustration{left:33%}.home-dashboard{grid-template-columns:minmax(0,1fr)}.featured-media{min-height:265px}.home-plan-row{grid-template-columns:30px 65px minmax(0,1fr) 20px}.home-plan-thumb{width:65px;height:52px}}
@media(max-width:650px){.app-shell{padding:0 11px}.topbar{gap:8px;padding:7px 3px 0}.brand-logo{width:clamp(190px,52vw,245px)}.top-actions .button{padding:9px 11px;font-size:11px}.status-pill{display:none}.topbar .tabs{justify-content:flex-start;gap:2px;margin-top:8px}.topbar .tab{padding:12px 10px;gap:4px;font-size:11px}.topbar .tab span{font-size:16px}.hero{min-height:410px;padding:26px 24px 35px;border-radius:20px 20px 38px 21px;align-items:flex-start}.hero-illustration{inset:39% 0 0 0;background-position:76% 52%}.hero-illustration:after{background:linear-gradient(180deg,#FAF6EC 0%,rgba(250,246,236,.85) 4%,rgba(250,246,236,.04) 35%)}.hero-content{width:100%;max-width:100%;padding:0}.hero h1{font-size:clamp(31px,8.5vw,43px);line-height:1.1}.hero h1 em{white-space:normal}.hero-copy{font-size:12px;line-height:1.55;max-width:340px;margin-top:10px}.hero .hero-cta{margin-top:15px;padding:10px 16px;font-size:13px;gap:14px}.hero-flourish{display:none}.home-dashboard{margin:13px 0 0;gap:13px}.home-panel-head{min-height:60px;height:60px;padding:12px 14px}.home-panel-heading h2{font-size:19px}.featured-body{grid-template-columns:1fr;padding:13px;gap:12px}.featured-media{min-height:215px}.featured-details{padding:1px 7px 12px}.featured-details h3{font-size:26px}.featured-meta{margin-top:13px}.featured-actions{margin-top:16px}.home-plan-body{padding:10px 10px 0}.home-plan .home-panel-heading h2{font-size:18px}.search-row{flex-wrap:wrap}.search-row select{min-height:42px;flex:1}.section-heading{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.hero .hero-cta,.home-plan-row,.topbar .tab{transition:none}}

/* Preserve the full flask mark and Meal Alchemist wordmark on narrow screens. */
@media (max-width:400px){.brand-logo{width:clamp(175px,51vw,195px)}.topbar .tabs{width:100%}}

/* v2.0 recipe-card quick add/remove: + when unplanned, checkmark when in the current plan. */
.card-bottom-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:10px}
.card-bottom-row .card-meta{display:flex;flex-wrap:wrap;gap:7px;margin-top:0;padding-top:0;min-width:0}
.card-plan-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;min-width:40px;padding:7px 10px;border:1px solid #b7c9bd;border-radius:10px;background:#e9efe8;color:#20554d;font-size:11px;font-family:inherit;font-weight:700;white-space:nowrap;cursor:pointer;flex-shrink:0}
.card-plan-toggle:hover{background:#d9e8da;border-color:#7ba58e}
.card-plan-toggle:focus-visible{outline:3px solid #b54b2c;outline-offset:2px}
.card-plan-toggle.is-planned{background:#23584e;color:#fff;border-color:#23584e}
.card-plan-toggle.is-planned:hover{background:#174439}
.card-plan-icon{font-family:system-ui,sans-serif;font-size:22px;font-weight:600;line-height:1}
.card-plan-toggle.is-planned .card-plan-icon{font-size:20px}
@media(max-width:800px){
  .card-plan-toggle{width:40px;height:40px;padding:0}
  .card-plan-label{display:none}
}


/* v2.2 — compact hero with Allen and speech-bubble CTA */
.hero{height:500px;min-height:0;max-height:500px;padding:0;display:block;position:relative}
.hero-illustration{inset:0 0 0 26%;background-position:72% 50%}
.hero-illustration:after{background:linear-gradient(90deg,#FAF6EC 0%,rgba(250,246,236,.38) 18%,rgba(250,246,236,.19) 49%,rgba(250,246,236,.02) 100%)}
.hero-allen{position:absolute;z-index:2;left:3%;bottom:8%;height:70%;max-height:70%;width:auto;max-width:43%;object-fit:contain;object-position:left bottom;pointer-events:none;filter:drop-shadow(0 12px 10px rgba(43,37,30,.22)) drop-shadow(2px 3px 2px rgba(43,37,30,.08))}
.hero-speech{position:absolute;z-index:3;left:32%;top:30%;transform:translateY(-50%);width:min(420px,62%);padding:23px 27px;border:2px solid #D7B98A;border-radius:27px;background:rgba(255,252,244,.97);box-shadow:0 10px 28px rgba(53,56,37,.12);color:#244649}
 .hero-speech p{font-family:'DM Sans',sans-serif;font-size:clamp(19px,2vw,23px);line-height:1.55;font-weight:600;margin:0}
.hero-speech:after{content:"";position:absolute;left:-16px;bottom:25%;width:28px;height:28px;transform:rotate(45deg);background:#FFFCF4;border-left:2px solid #D7B98A;border-bottom:2px solid #D7B98A}
.hero-speech .hero-cta{position:relative;z-index:1;margin-top:20px;padding:12px 20px;font-size:14px;gap:15px}
@media(max-width:850px){
 .hero{height:440px;max-height:500px}
 .hero-allen{left:3%;bottom:8%;height:70%;max-height:70%;max-width:43%}
 .hero-speech{left:35%;width:60%;padding:18px 20px}
 .hero-speech p{font-size:19px}
}
@media(max-width:650px){
 .hero{height:440px;min-height:0;max-height:500px;padding:0;display:block}
 .hero-illustration{inset:0;background-position:68% 50%}
 .hero-illustration:after{background:linear-gradient(90deg,rgba(250,246,236,.45),rgba(250,246,236,.20) 55%,rgba(250,246,236,.03))}
 .hero-allen{left:3%;bottom:8%;height:70%;max-height:70%;width:auto;max-width:45%}
 .hero-speech{top:21%;left:38%;width:58%;padding:14px 15px;border-radius:19px}
 .hero-speech p{font-size:16px;line-height:1.4}
 .hero-speech:after{left:-10px;bottom:25%;width:18px;height:18px}
 .hero-speech .hero-cta{margin-top:12px;padding:9px 12px;font-size:12px;gap:9px}
}
@media(max-width:390px){
 .hero{height:420px}
 .hero-speech{left:37%;width:60%;padding:12px}
 .hero-speech p{font-size:15px}
}

/* A soft veil keeps the food photography atmospheric without competing with Allen. */
.hero-illustration:before{content:"";position:absolute;inset:0;z-index:1;background:rgba(250,246,236,.05);pointer-events:none}
.hero-illustration:after{z-index:2}
@media(max-width:650px){.hero-illustration:before{background:rgba(250,246,236,.07)}}

/* v3.0 — magic-link-only email confirmation */
.magic-link-sent{position:relative;text-align:center;padding-top:8px}
.magic-link-sent h3{font-family:'Playfair Display',Georgia,serif;font-size:clamp(22px,3vw,30px);color:#244649;line-height:1.2;margin:12px 0}
.magic-link-sent .muted{font-size:15px;line-height:1.55;margin:10px 0}
.magic-link-sent .allen-magic-email{display:block;width:min(230px,65%);max-height:195px;object-fit:contain;margin:0 auto 8px;filter:drop-shadow(0 8px 8px rgba(43,37,30,.12))}
.magic-link-sent .text-button{display:block;margin:12px auto 0}
