/* Sunbowl personal beta: implementation of Figma Personal beta design.
   Reference: https://www.figma.com/design/wbynMcaHeHom1ccl7jovdA
   This is a presentation layer; signed recipes and planning state are unchanged. */
:root {
  --ink:#505F21;
  --forest:#505F21;
  --forest-soft:#F2F3E9;
  --leaf:#505F21;
  --cream:#f7f8f3;
  --paper:#ffffff;
  --text:#2D2C22;
  --muted:#706F5C;
  --edge:#ECEDDF;
  --shadow:none;
  --radius:13px;
}
html,body {background:var(--cream);color:var(--text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
h1,h2,h3,.page-title,.breakfast-card h2,.vr-meal-copy h2 {font-family:inherit;letter-spacing:-.025em;}
h1,.page-title {font-size:34px;line-height:1.15;font-weight:750;color:var(--text);}
h2 {font-size:22px;font-weight:700;}
h3 {font-size:17px;font-weight:700;}
button,input,select {font-family:inherit;}
#app {max-width:920px;min-height:100dvh;padding-bottom:calc(85px + env(safe-area-inset-bottom));}
#main-content::before {
 content:"Sunbowl";display:block;font-size:16px;line-height:22px;font-weight:750;
 color:var(--forest);padding:21px 24px 17px;letter-spacing:-.02em;
}
body.fm-intake-mode #main-content::before,body.fm-setup-mode #main-content::before {display:none;}
.page {padding:2px 24px 36px;}
.page-title {margin:6px 0 12px;}
.card {background:white;border:0;border-radius:13px;box-shadow:none;}
.btn {border-radius:12px;min-height:49px;font-size:14px;font-weight:700;border-color:transparent;}
.btn.primary {background:var(--forest);color:white;border-color:var(--forest);}
.btn.soft {background:#F2F2E9;color:var(--forest);}
.btn:focus-visible,.link-btn:focus-visible,.nav:focus-visible {outline:3px solid #A4B277;outline-offset:2px;}
.link-btn {font-size:14px;font-weight:700;color:var(--forest);text-decoration:none;}
.subtle-note {color:var(--muted);}
#bottom-nav {
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));height:calc(63px + env(safe-area-inset-bottom));
 padding:0 8px env(safe-area-inset-bottom);border:0;box-shadow:none;
 background:#fff;max-width:920px;position:fixed;z-index:9;
}
#bottom-nav .nav {width:100%;justify-content:center;align-items:center;min-height:63px;
 font-size:12px;font-weight:650;color:#706E5B;padding:0;letter-spacing:-.01em;}
#bottom-nav .nav.active {color:var(--forest);font-weight:750;}
#bottom-nav .nav-icon {display:none;}
/* My Recipes: Figma header, paired actions, scrollable flat filter and recipe cards */
.recipe-library .recipes-heading {align-items:start;margin-top:0;gap:5px;}
.recipe-library .recipes-heading .page-title {margin:6px 0 2px;}
.recipe-library .recipes-heading .fm-onboard-restart {font-size:12px;min-height:32px;color:var(--forest);}
.recipe-library .hbm-recipe-subtitle {font-size:14px;color:var(--muted);margin:0 0 15px;line-height:1.4;}
.recipe-library .recipes-toolbar {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0 15px;}
.recipe-library .recipes-toolbar .btn {width:100%;min-height:49px;padding:9px 11px;font-size:13px;white-space:normal;line-height:1.3;}
.recipe-library .recipe-library-tabs {background:transparent;display:flex;gap:8px;padding:0;margin:0 0 10px;overflow:auto;}
.recipe-library .recipe-library-tabs button {border-radius:8px;padding:7px 11px;white-space:nowrap;min-height:35px;font-size:12px;color:var(--muted);background:transparent;}
.recipe-library .recipe-library-tabs button[aria-selected=true] {background:white;color:var(--forest);box-shadow:none;}
.recipe-library .recipe-meal-filters {
 background:var(--forest-soft);border-radius:12px;padding:6px;margin:0 0 16px;
 display:flex;gap:1px;overflow-x:auto;
}
.recipe-library .recipe-meal-filters .filter {background:transparent;border:0;border-radius:8px;padding:8px 10px;min-height:35px;font-size:12px;color:var(--forest);font-weight:700;}
.recipe-library .recipe-meal-filters .filter.active {background:white;color:var(--forest);box-shadow:0 1px 2px #15372814;}
.recipe-library .breakfast-controls {margin:8px 0 10px;}
.recipe-library .breakfast-controls input[type=search] {min-height:44px;border-radius:11px;border:1px solid var(--edge);background:white;font-size:14px;}
.recipe-library #breakfast-result-count {font-size:12px;margin:4px 0 12px;}
.recipe-library .breakfast-grid {border:0;display:grid;grid-template-columns:1fr;gap:12px;}
.recipe-library .breakfast-card {
 position:relative;display:grid;grid-template-columns:102px minmax(0,1fr) 26px;
 gap:14px;align-items:center;background:white;border:0;border-radius:13px;
 padding:15px;margin:0;min-height:143px;box-shadow:none;
}
.recipe-library .breakfast-card .recipe-card-image,
.recipe-library .breakfast-card .breakfast-photo-wrap {width:102px;height:113px;overflow:hidden;border-radius:9px;background:#f4e8d6;}
.recipe-library .breakfast-card .breakfast-photo-wrap img,
.recipe-library .breakfast-card .recipe-card-image img {height:100%;width:100%;object-fit:cover;}
.recipe-library .breakfast-card h2 {font-family:inherit;font-size:16px;line-height:1.23;font-weight:730;color:var(--text);margin:0 0 10px;}
.recipe-library .breakfast-facts {font-size:12px;color:var(--muted);}
.recipe-library .breakfast-nutrition {font-size:11px;color:var(--muted);gap:3px 8px;}
.recipe-library .breakfast-card-actions {margin-top:7px;gap:8px;}
.recipe-library .breakfast-card-actions .link-btn {text-decoration:none;font-size:12px;min-height:31px;white-space:normal;}
.recipe-library .breakfast-select {width:30px;height:44px;margin:0;align-self:center;}
.recipe-library .breakfast-select input {height:40px;width:30px;}
.recipe-library .breakfast-select span {width:29px;height:29px;}
.recipe-library .reviewed-photo-note {font-size:9px;line-height:1.25;}
.recipe-library .harvest-legacy-choices {margin:20px 0;}
/* Generated Plan: Figma single-day meal stack with dynamic date rail */
.vr-page:has(.vr-week-days)>.page-title,.vr-page:has(.vr-shopping)>.page-title{margin:6px 0 5px;}
.vr-page .vr-topline {margin:0 0 17px;gap:8px;}
.vr-page .vr-topline strong {font-size:14px;font-weight:500;color:var(--muted);}
.vr-page:has(.vr-week-days)>.vr-topline [data-verified-action="show-shop"] {display:block;background:var(--forest);border-radius:12px;color:white;padding:15px;text-align:center;font-size:14px;font-weight:700;min-height:49px;}
.vr-page:has(.vr-week-days)>.vr-topline {display:grid;grid-template-columns:1fr;gap:16px;}
.vr-plan-actions {margin:10px 0 15px;}
.vr-plan-actions .btn {min-height:45px;}
.vr-date-strip {
 background:var(--forest-soft);border-radius:11px;padding:5px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
 gap:0;margin:12px 0 19px;overflow:visible;
}
.vr-date-strip button {background:transparent;border:0;border-radius:8px;min-height:44px;min-width:0;padding:5px 0;color:var(--forest);font-size:12px;font-weight:700;}
.vr-date-strip button[aria-pressed="true"] {background:white;box-shadow:0 1px 3px #163b241c;}
.vr-week-days {gap:14px;}
.vr-day[hidden] {display:none!important;}
.vr-day {background:transparent;box-shadow:none;border:0;border-radius:0;padding:0;display:grid;gap:10px;}
.vr-day-head {border:0;margin:0;padding:0 0 4px;}
.vr-day-head h2 {font-size:15px;color:var(--muted);font-weight:600;}
.vr-day-head .link-btn {font-size:12px;}
.vr-day-row {position:relative;display:grid;grid-template-columns:minmax(0,1fr) 25px;
 gap:0 12px;background:white;border:0;border-radius:13px;padding:14px 16px;min-height:76px;align-items:center;}
.vr-day-row .vr-slot {grid-column:1;display:block;color:var(--forest);font-size:10px;line-height:15px;font-weight:750;letter-spacing:.025em;margin-bottom:1px;}
.vr-day-row>div {grid-column:1;grid-row:2;padding-right:0;}
.vr-day-row strong {font-size:15px;color:var(--text);font-weight:700;}
.vr-day-row small {font-size:12px;color:var(--muted);margin-top:4px;}
.vr-day-row>.link-btn {grid-column:2;grid-row:1/span 2;font-size:0!important;width:25px;min-width:25px;padding:0;min-height:44px;}
.vr-day-row>.link-btn::after {content:"›";font-size:26px;font-weight:700;color:var(--forest);}
.vr-plan-meal {border:1px solid var(--edge);border-radius:14px;background:white;padding:12px 12px 1px;}
.vr-plan-meal-main,.vr-plan-recipe-intro {display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:12px;}
.vr-plan-meal-main > div {min-width:0;}
.vr-plan-meal .vr-slot {color:var(--forest);font-size:11px;line-height:1.3;font-weight:750;margin:0 0 4px;}
.vr-plan-meal h3 {color:var(--text);font-size:16px;line-height:1.25;margin:0;overflow-wrap:anywhere;}
.vr-plan-portion,.vr-plan-nutrition {font-size:12px;line-height:1.4;color:var(--muted);margin:4px 0 0;}
.vr-plan-meal-actions {display:flex;flex-wrap:wrap;column-gap:14px;margin-top:5px;}
.vr-plan-meal-actions > .link-btn {min-height:44px;padding:0 2px;font-size:13px;}
.vr-plan-meal-actions > [data-verified-action="meal-options"] {margin-left:auto;color:var(--muted);}
.vr-dish-photo {position:relative;display:grid;place-items:center;width:88px;aspect-ratio:1;overflow:hidden;border-radius:10px;background:var(--forest-soft);color:var(--forest);}
.vr-dish-photo > img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.vr-dish-photo:has(> img) .vr-photo-placeholder {visibility:hidden;}
.vr-photo-placeholder {font-size:11px;font-weight:650;text-align:center;}
.vr-ai-disclosure {position:absolute;inset:auto 3px 3px;background:#2F351B;color:white;border-radius:4px;padding:2px;font-size:9px;text-align:center;}
.vr-swap-choice .vr-dish-photo {width:61px;flex:none;}
.vr-plan-recipe-intro {margin-bottom:16px;}
.vr-plan-recipe-intro p {margin:3px 0;}
.vr-day-totals {font-size:12px;line-height:1.5;padding:0 0 6px;color:var(--muted);}
.vr-macro-gaps {font-size:12px;}
.vr-bottom-note {font-size:12px;}
/* Shopping: lightly grouped list, tappable 48px rows */
.vr-shopping-group {border:0;background:transparent;border-radius:0;padding:0;margin:20px 0 22px;}
.vr-shopping-group h2 {font-size:17px;font-weight:750;color:var(--forest);margin:0 0 9px;}
.vr-shopping-group .vr-shopping-row {
 display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:8px;background:#fff;
 padding:9px 13px;margin:6px 0;border:0;border-radius:9px;min-height:48px;
}
.vr-shopping-group .vr-shopping-row strong {font-size:13px;font-weight:700;color:var(--text);}
.vr-shopping-group .vr-shopping-row p {font-size:12px;color:var(--muted);margin:0;}
.vr-shopping-row .vr-check {height:32px;width:32px;min-width:32px;border:0;background:transparent;border-radius:5px;font-size:20px;}
.vr-shopping-row .vr-check::before {content:"□";font-size:24px;font-weight:400;line-height:1;}
.vr-shopping-row .vr-check[aria-pressed="true"]::before {content:"☑";}
.vr-shopping-row .vr-check[aria-pressed="true"] {color:var(--forest);background:transparent;}
.vr-shopping-row .vr-shopping-actions .link-btn {font-size:12px;}
.vr-shopping-row.is-done {opacity:.7;}
.vr-page:has(.vr-shopping)>.vr-topline:has([data-verified-action="manual-shopping"]) {display:grid;gap:10px;}
.vr-page:has(.vr-shopping) [data-verified-action="manual-shopping"].btn {width:100%;background:var(--forest);color:white;min-height:49px;}
/* Today: focused log action, small planned meal rows and intake summary */
.vr-page:has(.vr-meals) .vr-header {display:block;margin-bottom:15px;}
.vr-page:has(.vr-meals) .vr-header h1 {font-size:34px;}
.vr-page:has(.vr-meals) .vr-header .eyebrow {display:none;}
.vr-page:has(.vr-meals) .vr-header .subtle-note {display:none;}
.vr-page:has(.vr-meals) .vr-header .btn {display:none;}
.vr-page:has(.vr-meals) .vr-topline {margin-bottom:18px;}
.vr-page:has(.vr-meals) .vr-manual .vr-manual-title {display:flex;gap:12px;flex-direction:row;}
.vr-page:has(.vr-meals) .vr-manual [data-verified-action="manual-food"].btn {background:var(--forest);color:white;}
.vr-page .vr-nutrition {background:transparent;border:0;padding:14px 0;box-shadow:none;}
.vr-page .vr-nutrition strong {color:var(--text);font-size:22px;}
.vr-page .vr-meal {border-radius:12px;padding:13px;box-shadow:none;}
.vr-page .vr-meal-copy h2 {font-family:inherit;font-size:17px;font-weight:700;}
.vr-page .vr-actions .btn {font-size:12px;}
/* Profile: overview modeled on Figma while retaining all editable settings and safeguards */
.page:has(#settings-form)>.page-title,.page:has(#settings-form)>h1 {font-size:34px;}
.page:has(#settings-form) .hbm-profile-subtitle{font-size:14px;color:var(--muted);margin:0 0 23px;}
.page:has(#settings-form) .form-card {background:transparent;padding:0;border:0;box-shadow:none;}
.page:has(#settings-form) #settings-form>h3 {font-size:17px;color:var(--forest);margin:0 0 10px;}
.page:has(#settings-form) #settings-form>.setting-row {border:0;border-radius:10px;background:white;margin:6px 0;padding:12px 14px;min-height:48px;}
.page:has(#settings-form) #settings-form>.setting-row strong {font-size:14px;}
.page:has(#settings-form) #settings-form>fieldset {border:0;border-radius:10px;background:white;margin:8px 0 18px;padding:14px;}
.page:has(#settings-form) #settings-form>details {background:white;border-radius:10px;padding:15px;margin:8px 0;border:0;}
.page:has(#settings-form) #settings-form>details summary {color:var(--forest);font-size:14px;font-weight:700;min-height:25px;cursor:pointer;}
.page:has(#settings-form) #settings-form>details[open] {box-shadow:0 0 0 1px var(--edge);}
.page:has(#settings-form) #settings-form>.btn[type="submit"] {margin-top:18px;}
.page:has(#settings-form) .settings-advanced.form-card {background:white;padding:12px 15px;}
.page:has(#settings-form) .card.form-card:last-child {background:white;padding:16px;margin-top:20px;}
/* Figma-inspired full height recipe entry surface inside existing modal/route */
dialog:has(.recipe-add-menu) {position:fixed;inset:0;margin:0;width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0;}
dialog:has(.recipe-add-menu)::backdrop {background:var(--cream);}
dialog:has(.recipe-add-menu) .modal-content {background:var(--cream);height:100dvh;max-height:100dvh;overflow:auto;border-radius:0;padding:22px 24px;}
dialog:has(.recipe-add-menu) .modal-head {margin:0 0 25px;display:flex;align-items:start;}
dialog:has(.recipe-add-menu) .modal-head h2 {font-size:31px;font-weight:750;font-family:inherit;margin:6px 0;}
dialog:has(.recipe-add-menu) .recipe-add-menu {display:grid;gap:13px;}
dialog:has(.recipe-add-menu) .recipe-add-menu button {display:flex;justify-content:space-between;text-align:left;min-height:72px;background:white;border-radius:12px;color:var(--text);padding:16px;font-size:15px;position:relative;padding-right:48px;}
dialog:has(.recipe-add-menu) .recipe-add-menu button::after {content:"›";position:absolute;right:16px;top:17px;font-size:25px;color:var(--forest);}
@media(max-width:620px){
 #app {width:100%;max-width:100%;}
 .page {padding:2px 24px 32px;}
 .recipe-library .recipes-heading .fm-onboard-restart{padding:5px;max-width:92px;}
 .recipe-library .recipe-meal-filters .filter {padding-inline:8px;}
 .recipe-library .breakfast-card {grid-template-columns:94px minmax(0,1fr) 25px;gap:12px;padding:13px;}
 .recipe-library .breakfast-card .recipe-card-image,.recipe-library .breakfast-card .breakfast-photo-wrap {width:94px;height:109px;}
 .recipe-library .breakfast-card h2 {font-size:15px;}
 .vr-day-head>div {justify-content:flex-end;}
 .vr-page:has(.vr-week-days)>.vr-topline {gap:14px;}
 .vr-plan-actions>.btn {width:100%;}
}
@media(max-width:355px) {
 .page{padding-inline:16px;}
 #main-content::before{padding-inline:16px;}
 .recipe-library .breakfast-card {grid-template-columns:78px minmax(0,1fr) 24px;gap:8px;}
 .recipe-library .breakfast-card .recipe-card-image,.recipe-library .breakfast-card .breakfast-photo-wrap {width:78px;height:95px;}
}
@media(min-width:780px) {
 #bottom-nav {position:fixed;}
 #main-content::before {padding:24px 35px 15px;}
 .page {padding:2px 35px 50px;}
 .recipe-library .breakfast-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media print {#bottom-nav{display:none!important}#main-content::before{display:none}}

/* Figma interaction details after accessibility wiring. */
.hbm-profile-page .hbm-planning-heading {font-size:17px;color:var(--forest);font-weight:750;margin:19px 0 8px;}
.hbm-log-primary {width:100%;margin:0 0 20px;min-height:49px;}
dialog:has(.recipe-add-menu) .recipe-add-menu button>span {display:grid;gap:5px;}
dialog:has(.recipe-add-menu) .recipe-add-menu button strong {font-size:15px;font-weight:750;color:var(--text);}
dialog:has(.recipe-add-menu) .recipe-add-menu button small {font-size:13px;font-weight:400;color:var(--muted);white-space:normal;line-height:1.4;}
/* Chromium/Android [hidden] must take precedence over all layout overrides. */
[hidden] {display:none!important;}

.profile-save-status{min-height:1.2em;color:var(--muted);font-size:.85rem;margin:0 0 12px}
.profile-taste-group{margin:12px 0}
.profile-taste-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,1fr);align-items:center;gap:10px;padding:6px 0}
.dish-preference-group{margin:8px 0;padding:10px 0;border-top:1px solid var(--edge)}
.dish-preference-name{display:flex;align-items:center;gap:12px}
.dish-preference-name img{width:52px;height:52px;border-radius:8px;object-fit:cover}
.dish-preference-card{padding:12px 0;border-top:1px solid var(--edge)}
.dish-preference-card [role="group"]{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.dish-preference-card button{min-height:44px}
.dish-preference-card button[aria-pressed="true"]{background:var(--forest);color:white}

.recipe-library-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
.recipe-library .breakfast-card{grid-template-columns:88px minmax(0,1fr)}
.recipe-library .breakfast-card-actions{flex-wrap:wrap;gap:6px 12px}
.recipe-library .breakfast-card-actions .btn{min-height:44px;white-space:normal}
.recipe-choice-status{font-size:.8rem;color:var(--forest);font-weight:650}
#recipe-feedback:not(:empty){margin:10px 0;padding:8px 12px;border-radius:10px;background:var(--forest-soft)}

.cooking-recipe .modal-head h2{font-size:clamp(1.65rem,5vw,2.4rem);letter-spacing:-.035em}
.cooking-recipe .breakfast-photo-wrap{aspect-ratio:16/9;height:auto;max-height:320px}
.cooking-estimate{margin:8px 0 4px;font-size:.8rem;color:var(--muted)}
.cooking-recipe .breakfast-detail-nutrition{padding:10px 0 12px;border-bottom:1px solid var(--edge)}
.cooking-recipe .steps li{padding-left:7px;margin-bottom:12px;line-height:1.5}
.cooking-recipe .breakfast-ingredient-facts{line-height:1.45}

.vr-plan-options{margin:12px 0;padding:8px 0;border-top:1px solid var(--edge)}
.vr-plan-options summary{cursor:pointer;color:var(--forest);font-weight:650}
.vr-plan-options .link-btn{min-height:44px}
.vr-plan-options p{margin:8px 0}

.food-brand-toggle{display:flex;align-items:center;gap:8px;font-size:.8rem;color:var(--muted)}
.food-variants{border-top:1px solid var(--edge);padding:12px 0}
.food-variants summary{color:var(--forest);cursor:pointer;font-weight:650}
.vr-period-length{display:flex;align-items:center;gap:8px;font-size:.88rem}

.recipe-portion-facts{display:flex;gap:8px 18px;flex-wrap:wrap;margin:8px 0}
.recipe-batch-control{display:flex;gap:8px;align-items:center;margin:8px 0;color:var(--muted)}
.recipe-batch-control input{width:76px}
