/* Existing visual values centralized without changing component dimensions. */
:root{
  --font-size-xs:13px;
  --font-size-sm:14px;
  --font-size-md:15px;
  --font-size-body:16px;
  --font-size-title:22px;
  --space-1:4px;
  --space-2:6px;
  --space-3:8px;
  --space-4:12px;
  --space-5:16px;
  --space-6:20px;
  --radius-image:9px;
  --radius-card:21px;
  --radius-card-compact:15px;
  --radius-button:18px;
  --radius-pill:999px;
  --shadow-card:0 4px 12px #a3804520;
  --shadow-soft:0 1px 4px #49302512;
  --touch-target:44px;
  --action-size-compact:30px;
  --filter-size-compact:34px;
  --mascot-footer:48px;
  --mascot-intro:112px;
  --mascot-empty:90px;
}
:root{--cream:#fff9e9;--paper:#fffdf7;--yellow:#ffda70;--brown:#493025;--muted:#928277;--line:#efe6d4;--green:#e2f1da}*{box-sizing:border-box}body{margin:0;background:#f6efdc;color:var(--brown);font-family:var(--font-mixed);font-size:var(--font-size-body)}button,a,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;border:0}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #c98740;outline-offset:3px}a{color:inherit;text-decoration:none}.desktop-note{position:fixed;left:calc(50% - 430px);top:90px;color:#af8055}.desktop-note span{font-family:var(--font-en);font-size:30px}.desktop-note p{font-size:var(--font-size-sm);letter-spacing:2px}.phone{position:relative;max-width:410px;min-height:100vh;margin:auto;background:radial-gradient(ellipse at top right,#fff0be80,transparent 50%),var(--cream);box-shadow:0 12px 80px #80674516}.topbar{height:56px;padding:16px 23px;display:flex;align-items:center;justify-content:space-between}.topbar a{font-weight:700;color:#ae773c;letter-spacing:.5px}.topbar a:first-letter{color:#f2bd4c}.topbar button{border:1px solid #eadfc7;background:#ffffff80;border-radius:20px;padding:5px 10px;font-size:var(--font-size-xs);font-weight:700}main{padding:8px 20px 100px}.intro{height:149px;position:relative;padding-top:14px}.intro h1{font-size:29px;letter-spacing:1px;margin:0 0 10px;font-weight:850}.intro p{line-height:1.7;margin:0;color:#806b59;font-size:var(--font-size-md)}.intro img{position:absolute;width:149px;right:-11px;bottom:0}.intro .date{font-size:var(--font-size-xs);font-weight:600;margin-top:13px}.intro h1,.intro p,.intro .date{position:relative;z-index:1}.intro.en h1{font-size:25px}.intro.en img{width:125px;opacity:.85}.card{background:var(--paper);border:1px solid #f4e9d1;border-radius:var(--radius-card);box-shadow:var(--shadow-card)}.settings{padding:13px 14px;margin-bottom:22px}.setting{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}.setting+.setting{margin-top:14px;padding-top:13px;border-top:1px solid var(--line)}.setting strong{font-size:var(--font-size-body)}.setting small{display:block;color:var(--muted);font-size:10px;margin-top:4px}.people{display:flex;gap:var(--space-1)}.people button,.servings button{border-radius:11px;background:#f8f2e5;width:29px;height:31px}.people .active,.servings .active{background:var(--yellow);font-weight:700}.switch{width:43px;height:25px;border-radius:20px;background:#ded8cc;padding:3px;flex-shrink:0}.switch:after{content:"";display:block;border-radius:50%;background:#fff;width:19px;height:19px;box-shadow:0 1px 3px #0002}.switch.on{background:#ffcc50}.switch.on:after{transform:translateX(18px)}h2{font-size:19px;margin:20px 0 12px}.meal{padding:13px;margin:12px 0}.meal-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px;font-size:17px;font-weight:700}.sun{color:#e5a43b;margin-right:7px}.heart{background:transparent;font-size:23px;color:#ad9383;padding:0 3px;line-height:1.3}.heart.saved{color:#f47b65}.recipe-link{display:flex;gap:13px;align-items:center;min-width:0;flex:1}.food{background-image:url('assets/reference.png');background-repeat:no-repeat;flex-shrink:0;width:112px;height:106px;border-radius:14px;background-size:1167.62% 1221.9%;background-position:56.38% var(--pos)}.food.egg{--pos:24.62%}.food.potato{--pos:34.63%}.food.greens{--pos:44.65%}.food.teriyaki{--pos:54.67%}.recipe-copy{min-width:0}.recipe-copy h3{font-size:17px;margin:0 0 4px}.english{color:var(--muted);font-size:10px;line-height:1.4;margin:3px 0 7px}.description{font-size:var(--font-size-xs);color:var(--muted);margin:5px 0 8px}.available{display:inline-block;background:var(--green);color:#53844a;border-radius:7px;padding:4px 6px;font-size:10px}.meta{font-size:10px;color:#8b7761;margin-top:8px}.meta span{background:#fff0cc;border-radius:5px;padding:3px 5px;margin-right:5px}.primary{background:var(--yellow);border:1px solid #ffd363;border-radius:var(--radius-button);padding:13px;width:100%;font-weight:700;font-size:15px}.cozy{display:flex;align-items:center;justify-content:center;color:#b28760;gap:var(--space-1);margin-top:18px;font-size:var(--font-size-xs)}.cozy img{width:61px}.search{display:flex;align-items:center;background:#fff;border:1px solid var(--line);border-radius:25px;padding:11px 15px;gap:9px;margin:4px 0 14px;color:#ad9f91}.search input{border:0;outline:0;background:transparent;width:100%;min-width:0;font-size:var(--font-size-sm);color:var(--brown)}.chips{display:flex;gap:7px;flex-wrap:wrap;margin:15px 0}.chips button{border-radius:20px;background:#f3f0e8;padding:9px 12px;font-size:var(--font-size-sm)}.chips button.active{background:var(--yellow);font-weight:700}.ingredients{padding:0 14px;overflow:hidden}.ingredient{display:flex;align-items:center;padding:12px 0;gap:var(--space-4)}.ingredient+.ingredient{border-top:1px solid var(--line)}.ingredient .emoji{font-size:30px;width:34px;text-align:center}.ingredient .name{flex:1}.ingredient small{display:block;color:var(--muted);margin-top:3px;font-size:var(--font-size-xs)}.badge{font-size:10px;background:#e3edf7;border-radius:7px;padding:5px 7px}.badge.freeze{background:#ede4f8}.badge.dry{background:#fff0cb}.section-heading{display:flex;justify-content:space-between;align-items:center}.section-heading small{color:var(--muted);font-size:var(--font-size-xs)}.recipe-row{display:flex;align-items:center;padding:10px;margin:10px 0;gap:3px}.recipe-row .food{width:106px;height:105px}.recipe-row .heart{align-self:flex-start;margin-top:6px}.recipe-row h3{font-size:15px}.recipe-row .recipe-link{gap:10px}.empty{padding:45px 20px;text-align:center;color:var(--muted);line-height:1.8}.prototype-note{color:#a79987;font-size:10px;text-align:center;margin:15px 0}nav{position:fixed;bottom:0;width:100%;max-width:410px;display:flex;justify-content:space-around;padding:10px 5px max(11px,env(safe-area-inset-bottom));background:#fffdf8f5;border-top:1px solid var(--line);backdrop-filter:blur(14px);z-index:5}nav a{display:flex;flex-direction:column;align-items:center;gap:3px;color:#a29890;font-size:10px;min-width:62px}nav .icon{width:34px;height:30px;display:grid;place-items:center;border-radius:12px}svg{width:23px;height:23px}nav a.active{color:var(--brown);font-weight:700}nav a.active .icon{background:var(--yellow)}.hero{margin:-8px -20px 0;position:relative}.hero .food{width:100%;height:310px;border-radius:0;background-size:1167.62% 1221.9%}.back{position:absolute;top:15px;left:17px;background:#fffdf8;border-radius:50%;width:37px;height:37px;font-size:26px;box-shadow:0 3px 8px #0001}.hero .heart{position:absolute;right:17px;top:15px;background:#fffdf8;border-radius:50%;width:37px;height:37px}.detail-sheet{background:var(--paper);position:relative;margin:-25px -20px -30px;padding:23px 20px 38px;border-radius:29px 29px 0 0;min-height:500px}.detail-sheet h1{margin:0;font-size:28px}.detail-sheet .english{font-size:var(--font-size-md)}.availability{background:#edf5e4;border-radius:17px;padding:15px;margin:18px 0;display:flex;gap:var(--space-4);align-items:center}.check{background:#75a967;color:white;border-radius:50%;padding:5px 9px;font-size:18px}.availability small{display:block;color:#78906c;font-size:var(--font-size-xs);margin-top:3px}.servings{display:flex;justify-content:space-between;align-items:center;margin:20px 0}.servings button{height:38px;width:41px;margin-left:5px}.detail-tabs{display:flex;background:#f8f4eb;border-radius:20px;padding:4px;gap:2px}.detail-tabs button{background:transparent;border-radius:16px;flex:1;font-size:var(--font-size-sm);padding:10px 3px;color:#9c8c7d}.detail-tabs .active{background:white;box-shadow:0 2px 6px #6244220a;color:var(--brown);font-weight:700}.detail-content{min-height:240px}.detail-content h2{font-size:16px}.detail-content .ingredient{padding:10px 0}.quantity{color:var(--muted);font-size:var(--font-size-sm)}.steps{padding-left:24px;line-height:1.9;color:#806b59}.steps li{padding:7px 0}.tip{padding:14px;margin-top:16px;background:#fff5d7;border-radius:16px;line-height:1.8;color:#897048}.tip p{margin:5px 0}@media(min-width:600px){.phone{margin-top:24px;margin-bottom:24px;border:1px solid #e8d8b9;border-radius:30px;overflow:hidden;min-height:850px}nav{border-radius:0 0 28px 28px;bottom:0}body{padding-bottom:10px}}@media(max-width:900px){.desktop-note{display:none}}@media(prefers-reduced-motion:no-preference){button,a{transition:background .16s,transform .16s}button:active{transform:scale(.96)}main{animation:appear .25s ease}@keyframes appear{from{opacity:.5;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}}

/* Decorative mascot slots: keep native proportions and leave text its own space. */
.mascot{object-fit:contain;pointer-events:none;user-select:none}
.intro img.mascot,.intro.en img.mascot{width:var(--mascot-intro);height:var(--mascot-intro);right:0;bottom:4px;opacity:1}
.intro h1,.intro p,.intro .date{max-width:calc(100% - 116px)}
.intro.en h1{font-size:24px}
.cozy img.mascot{width:var(--mascot-footer);height:var(--mascot-footer);flex-shrink:0}
@media(max-width:360px){.intro h1{font-size:25px}.intro.en h1{font-size:21px}.intro img.mascot,.intro.en img.mascot{width:94px;height:94px}.intro h1,.intro p,.intro .date{max-width:calc(100% - 98px)}}

/* Kitchen-only form and ingredient actions. */
.pantry-add{margin:12px 0;overflow:hidden}
.pantry-add summary{cursor:pointer;background:var(--yellow);padding:13px;text-align:center;font-weight:700;list-style:none}
.pantry-add summary::-webkit-details-marker{display:none}
.pantry-add summary:focus-visible{outline:3px solid #c98740;outline-offset:-3px}
.pantry-add form{padding:10px 12px 12px;display:grid;gap:var(--space-2)}
.pantry-add label{display:grid;gap:var(--space-1);font-size:var(--font-size-sm);font-weight:600;min-width:0}
.pantry-add input,.pantry-add textarea,.pantry-add select{width:100%;min-width:0;border:1px solid var(--line);background:#fffdf7;color:var(--brown);border-radius:12px;padding:11px 9px;font:inherit;font-weight:400}
.pantry-add select:focus-visible{outline:3px solid #c98740;outline-offset:2px}
.pantry-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pantry-error{color:#a24c37;font-size:var(--font-size-sm);margin:0;line-height:1.6}
.pantry-error:empty{display:none}
.pantry-list .name{min-width:0;overflow-wrap:anywhere}
.pantry-list .badge{flex-shrink:0}
.pantry-list .ingredient{gap:9px}
.pantry-delete{background:#faf0e5;border-radius:50%;width:32px;height:32px;flex-shrink:0;font-size:21px;color:#a68068}
.pantry-delete:hover{background:#f8dfd0}
.pantry-list .emoji{flex:0 0 34px;height:36px;display:flex;align-items:center;justify-content:center;line-height:1}
.pantry-list .emoji img{width:34px;height:34px;object-fit:contain}

/* Six serving choices fit the existing phone-width controls. */
.servings{flex-wrap:wrap;gap:10px}
.servings>div{display:flex;gap:5px}
.servings button{width:32px;margin-left:0}
.settings .setting:first-child{flex-wrap:wrap}

/* Recipe Detail only: readable, cooking-focused content. */
.recipe-detail{font-family:inherit}
.recipe-detail .rd-hero>img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.recipe-detail .rd-photo-label{position:absolute;inset:auto 12px 39px;text-align:center;color:#92764d;font-size:var(--font-size-md)}
.recipe-detail .rd-photo-label small{display:block;margin-top:5px;font-size:10px}
.recipe-detail .detail-sheet{padding-top:24px}
.recipe-detail .detail-sheet h1{font-size:27px;line-height:1.3}
.recipe-detail .english{font-size:var(--font-size-md);margin:6px 0 15px}
.recipe-detail .rd-description{font-size:var(--font-size-body);line-height:1.8;color:#806b59}
.recipe-detail .rd-summary{font-size:var(--font-size-sm);color:#806b59;line-height:1.8}
.recipe-detail .rd-summary>div{display:flex;flex-wrap:wrap;gap:var(--space-3);margin-top:8px}
.recipe-detail .rd-summary>div>span{background:#fff2d5;border-radius:var(--radius-image);padding:7px 9px}
.recipe-detail .availability{align-items:flex-start;line-height:1.7;font-size:var(--font-size-md)}
.recipe-detail .availability small{font-size:var(--font-size-xs);line-height:1.65}
.recipe-detail .rd-incomplete{background:#fff2da}
.recipe-detail .rd-incomplete .check{background:#c9a36a}
.recipe-detail .rd-incomplete small{color:#8f7754}
.recipe-detail .servings{margin-bottom:6px}
.recipe-detail .rd-base{font-size:var(--font-size-xs);color:#978371;margin:0 0 20px}
.recipe-detail .detail-tabs{position:sticky;top:0;z-index:3;background:#f6efdf;border:1px solid #eee2cb}
.recipe-detail .detail-tabs button{min-height:var(--touch-target)}
.recipe-detail .rd-group{margin-top:23px}
.recipe-detail h2{font-size:18px;margin:24px 0 12px}
.recipe-detail .rd-ingredient{display:grid;grid-template-columns:20px minmax(0,1fr) minmax(80px,42%);gap:var(--space-3);padding:14px 0;border-bottom:1px solid var(--line);align-items:start}
.recipe-detail .rd-mark{font-size:17px;font-weight:700}.recipe-detail .ready{color:#679458}.recipe-detail .missing{color:#b39265}
.recipe-detail .rd-ingredient strong{font-size:var(--font-size-body);font-weight:600}
.recipe-detail .rd-ingredient small{display:block;font-size:10px;color:#978371;margin-top:5px;line-height:1.6}
.recipe-detail .rd-amount{font-size:var(--font-size-md);text-align:right;line-height:1.65;overflow-wrap:anywhere}
.recipe-detail .rd-note,.recipe-detail .rd-muted{font-size:var(--font-size-sm);color:#957e63;line-height:1.8}
.recipe-detail .rd-preparation{padding-left:23px;font-size:var(--font-size-body);line-height:1.85}
.recipe-detail .rd-preparation li{padding:6px 0 8px 2px}
.recipe-detail .rd-step{padding:17px 15px;margin:13px 0;border:1px solid #efe3cb;border-radius:19px;background:#fffdf7;scroll-margin-top:70px}
.recipe-detail .rd-step-heading{display:flex;align-items:start;justify-content:space-between;gap:var(--space-3)}
.recipe-detail .rd-step-heading h3{font-size:16px;margin:0;line-height:1.6}
.recipe-detail .rd-step-heading h3 span{display:inline-grid;place-items:center;background:#ffe099;border-radius:50%;width:25px;height:25px;margin-right:7px;font-size:var(--font-size-md)}
.recipe-detail .rd-step-heading small{font-size:var(--font-size-xs);white-space:nowrap;color:#95806b;margin-top:5px}
.recipe-detail .rd-heat{display:inline-block;border-radius:8px;background:#fff0ce;font-size:var(--font-size-xs);padding:4px 9px;margin:10px 0 0}
.recipe-detail .rd-step p,.recipe-detail .rd-kids p{font-size:var(--font-size-body);line-height:1.9;margin:12px 0 0}
.recipe-detail .rd-step .rd-done{background:#f1f5e8;border-radius:12px;padding:10px;font-size:var(--font-size-sm);color:#607450}
.recipe-detail .rd-step .rd-note{font-size:var(--font-size-sm)}
.recipe-detail .rd-step .rd-kid{font-size:var(--font-size-sm);background:#fff1d0;border-radius:10px;padding:9px;color:#957146}
.recipe-detail .rd-tips ul,.recipe-detail .rd-kids ul{padding-left:20px;font-size:var(--font-size-body);line-height:1.9}
.recipe-detail .rd-tips li,.recipe-detail .rd-kids li{margin-bottom:10px}
.recipe-detail .rd-mode{color:#aa814c}
@media(max-width:360px){.recipe-detail .rd-step{padding:14px 12px}.recipe-detail .rd-step-heading{flex-wrap:wrap}.recipe-detail .rd-ingredient{grid-template-columns:18px minmax(0,1fr) minmax(70px,40%);gap:var(--space-2)}}

.staples-section{margin-top:26px}.staples-section .section-heading{gap:var(--space-3);flex-wrap:wrap}
#manage-staples{background:var(--yellow);border-radius:14px;padding:9px 11px;font-size:var(--font-size-xs)}
.staples-group{margin:18px 0}.staples-group h3{font-size:var(--font-size-body);margin:0 0 9px}
.staples-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}
.staple-chip{display:flex;align-items:center;gap:var(--space-2);padding:11px 8px;border:1px solid var(--line);border-radius:14px;background:var(--paper);font-size:var(--font-size-sm);min-width:0}
.staple-chip>span:first-of-type{flex:1;min-width:0;overflow-wrap:anywhere}
.staple-chip small{display:block;color:var(--muted);font-size:9px;line-height:1.5;margin-top:3px}
.staple-chip input{accent-color:#b99547;margin:0;flex-shrink:0;width:15px;height:15px}
.staple-chip.disabled{background:#f4efe5;color:#958779}.staple-state{font-size:9px;color:#8a795b;white-space:nowrap}

/* Compact overview; full controls remain exclusive to management. */
.staples-summary .section-heading{flex-wrap:nowrap;gap:var(--space-3)}
.staples-summary .section-heading h2{margin:0;font-size:18px}
.staples-summary #manage-staples{background:transparent;padding:8px 0 8px 10px;color:#a07b49;white-space:nowrap}
.staples-caption{font-size:var(--font-size-xs);color:#a18e77;margin:3px 0 10px}
.staple-summary-group+.staple-summary-group{border-top:1px solid #eee5d580}
.staple-summary-row{width:100%;min-height:var(--touch-target);display:flex;align-items:center;gap:7px;padding:10px 0;background:transparent;text-align:left}
.staple-group-name{flex-shrink:0;font-size:var(--font-size-sm);font-weight:600;white-space:nowrap}
.staple-count{font-size:10px;color:#ac987c;margin-left:3px;font-weight:400}
.staple-preview{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--font-size-xs);color:#98826a}
.staple-more{flex-shrink:0;font-size:10px;background:#fff0c6;color:#9c7a3d;border-radius:8px;padding:3px 5px}
.staple-chevron{font-size:var(--font-size-md);color:#ae9779;flex-shrink:0}
.staple-compact-chips:not([hidden]){display:flex;flex-wrap:wrap;gap:var(--space-2);padding:0 0 12px;font-size:var(--font-size-xs);color:#968069}
.staple-compact-chips>span{background:#fff4d8;border-radius:10px;padding:5px 9px}

/* Kitchen equipment: a compact summary and native modal editor. */
.equipment-summary{margin-top:22px;padding:13px 14px}
.equipment-summary .section-heading{gap:var(--space-3);align-items:center}
.equipment-summary h2{font-size:16px;margin:0;line-height:1.5}
.equipment-summary button,.equipment-dialog header button{background:transparent;color:#9c7a3d;min-height:var(--touch-target);min-width:44px;padding:8px;white-space:nowrap}
.equipment-summary p{margin:3px 0 0;font-size:var(--font-size-xs);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.equipment-dialog{width:calc(100% - 28px);max-width:380px;max-height:85vh;max-height:85dvh;padding:0 18px 12px;border:1px solid var(--line);border-radius:24px;background:var(--cream);color:var(--brown);box-shadow:0 15px 60px #49302530;overflow-y:auto;overscroll-behavior:contain}
.equipment-dialog::backdrop{background:#49302555}
.equipment-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;background:var(--cream);padding:12px 0;z-index:1}
.equipment-dialog h2{margin:0;font-size:19px}
.equipment-option{display:flex;align-items:center;gap:var(--space-4);min-height:55px;border-bottom:1px solid var(--line);position:relative;cursor:pointer}
.equipment-option>span:first-child{flex:1;font-size:var(--font-size-body);line-height:1.6}
.equipment-option input{position:absolute;right:0;width:44px;height:44px;opacity:0;margin:0;cursor:pointer}
.equipment-toggle{width:43px;height:25px;border-radius:20px;background:#ded8cc;padding:3px;flex-shrink:0;pointer-events:none}
.equipment-toggle:after{content:"";display:block;border-radius:50%;background:#fff;width:19px;height:19px;box-shadow:0 1px 3px #0002}
.equipment-option input:checked+.equipment-toggle{background:#ffcc50}
.equipment-option input:checked+.equipment-toggle:after{transform:translateX(18px)}
.equipment-option input:focus-visible+.equipment-toggle{outline:3px solid #c98740;outline-offset:3px}
.equipment-status{font-size:var(--font-size-xs);color:var(--muted);line-height:1.6;margin:12px 0 0}

/* Lightweight Dish decision content; existing page and card layout retained. */
.dish-tags{display:flex;flex-wrap:wrap;gap:var(--space-1);margin-top:7px}
.dish-tags span{font-size:10px;background:#fff2d6;color:#957547;border-radius:7px;padding:3px 6px}
.dish-image{position:relative;width:106px;height:105px;flex-shrink:0;overflow:hidden;border-radius:14px}
.dish-image img{display:block;width:100%;height:100%;object-fit:cover}
.dish-image>span{position:absolute;bottom:7px;left:0;right:0;text-align:center;font-size:9px;color:#92764d}
.dish-image-hero{width:100%;height:auto;aspect-ratio:4/3;border-radius:0}
.dish-image-hero>span{bottom:40px;font-size:var(--font-size-sm)}
.dish-ingredient-chips{display:flex;flex-wrap:wrap;gap:7px}
.dish-ingredient-chips span{font-size:var(--font-size-sm);background:#f4f1e6;border-radius:12px;padding:8px 10px;line-height:1.5}
.dish-find-recipe{display:block;text-align:center;margin-top:23px}
.dish-detail .availability small{margin-top:8px}


/* Compact batch-entry preview; all other Kitchen sections are unchanged. */
.pantry-add textarea{resize:vertical;height:54px;min-height:54px;max-height:180px;padding:8px 9px}
.pantry-add textarea:focus-visible{outline:3px solid #c98740;outline-offset:2px}
.pantry-add [hidden]{display:none}
#pantry-preview:empty{display:none}
#pantry-preview p{margin:0 0 8px}
.pantry-preview-chips{display:flex;flex-wrap:wrap;gap:var(--space-2)}
.pantry-preview-chips button{font:inherit;background:var(--cream);border:1px solid var(--line);border-radius:14px;min-height:var(--touch-target);padding:7px 10px;max-width:100%;overflow-wrap:anywhere}
.pantry-add button:disabled{opacity:.55;cursor:default}

/* Quick Add is a lightweight input tool, separate from Pantry rows. */
.quick-add{margin:16px 0}
.quick-add-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}
.quick-add-heading h2{font-size:15px;margin:0 0 8px}
.quick-add-heading button{font:inherit;background:transparent;color:var(--muted);min-height:var(--touch-target);padding:8px}
.quick-add-chips{display:flex;flex-wrap:wrap;gap:var(--space-2)}
.quick-add-chips button{font:inherit;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-button);min-height:var(--touch-target);padding:7px 11px;max-width:100%;overflow-wrap:anywhere}

/* Compact Pantry display and priority summary. */
.pantry-grid,.priority-chips{display:flex;flex-wrap:wrap;gap:7px}
.pantry-chip{display:inline-flex;align-items:center;gap:5px;max-width:100%;min-width:0;min-height:var(--touch-target);padding:7px 10px;border:1px solid var(--line);border-radius:var(--radius-card-compact);background:var(--paper);font:inherit;text-align:left}
.pantry-chip-name{min-width:0;overflow-wrap:anywhere}
.pantry-chip-icon{flex:0 0 22px;font-size:20px;line-height:1;display:flex;align-items:center}
.priority-state{font-size:var(--font-size-xs);flex-shrink:0}
.pantry-chip[aria-pressed="true"]{border-color:#c98740;background:#fff0dc}
#edit-pantry{background:transparent;font:inherit;min-height:var(--touch-target);padding:8px}
.pantry-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3);background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-card-compact);padding:10px;margin-top:10px}
.pantry-actions strong{flex-basis:100%;overflow-wrap:anywhere}
.pantry-actions button{font:inherit;min-height:var(--touch-target);border-radius:12px;padding:8px 12px;background:#fff0dc;max-width:100%;overflow-wrap:anywhere}
.use-soon{background:#fff0dc;border:1px solid #f1d4b5;border-radius:var(--radius-button);padding:12px;margin:14px 0}
.priority-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 10px;margin-bottom:6px}
.priority-heading h2{font-size:16px;margin:0}
.priority-heading a{font-size:var(--font-size-sm);min-height:var(--touch-target);display:flex;align-items:center}
.priority-chips>span{background:var(--paper);border-radius:12px;padding:5px 9px;max-width:100%;overflow-wrap:anywhere}
/* Shared compact Kitchen Settings and mobile management. */
.kitchen-settings{margin:18px 0;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-button);padding:12px}
.kitchen-settings>h2{font-size:16px;margin:0 0 4px}
.kitchen-setting-row+.kitchen-setting-row{border-top:1px solid var(--line)}
.kitchen-setting-row{padding:7px 0}
.kitchen-setting-line{display:flex;align-items:center;gap:7px;font-size:var(--font-size-md)}
.kitchen-setting-line strong{flex:1;min-width:0}
.kitchen-setting-line button{font:inherit;background:transparent;min-height:var(--touch-target);padding:6px 0 6px 6px;flex-shrink:0}
.kitchen-setting-row p{font-size:var(--font-size-sm);color:var(--muted);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.settings-dialog section h3{font-size:var(--font-size-body);margin:16px 0 6px}
.setting-choice{display:flex;align-items:center;gap:var(--space-3);border-bottom:1px solid var(--line)}
.setting-choice label{display:flex;align-items:center;gap:10px;flex:1;min-width:0;min-height:48px;padding:7px 0}
.setting-choice label span{overflow-wrap:anywhere;min-width:0}
.setting-choice small{display:block;color:var(--muted);font-size:var(--font-size-xs)}
.setting-choice input{width:20px;height:20px;flex-shrink:0;accent-color:#e7b54f}
.setting-choice summary,.setting-choice button{min-height:var(--touch-target);padding:10px;cursor:pointer}
.setting-choice button{font:inherit;border-radius:10px;background:var(--cream)}
.setting-add{margin-top:16px}
.setting-add summary{min-height:var(--touch-target);padding:10px;cursor:pointer}
.setting-add form,.setting-add label{display:grid;gap:var(--space-3)}
.setting-add form{gap:var(--space-4);padding:10px 0}
.setting-add input{font:inherit;width:100%;min-width:0;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:inherit}

/* Inspiration-only discovery layout. */
.inspiration-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0 20px}
.inspiration-header h1{font-size:var(--font-size-title);line-height:1.25;margin:0;min-width:0}
.inspiration-header>p{font-size:var(--font-size-md);color:var(--muted);margin:0 0 12px;line-height:1.5}
#inspiration-summary{margin:0 0 14px}
#inspiration-summary>p:first-child{font-size:21px;line-height:1.4;font-weight:700;color:var(--brown);margin:0 0 6px;text-wrap:balance}
.inspiration-ready-count{color:#b87530}
#inspiration-summary .prototype-note{margin:0;font-size:var(--font-size-md);line-height:1.5;color:#786551;text-align:left}
.inspiration-page>.chips{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:5px}
.inspiration-page>.chips button{flex-shrink:0;min-height:var(--touch-target)}
.inspiration-section h2{font-size:18px;margin:18px 0 10px}
.inspiration-section+.inspiration-section{margin-top:25px}
.inspiration-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.inspiration-card{position:relative;min-width:0;overflow:hidden;border-radius:17px}
.inspiration-card-link{display:block;height:100%}
.inspiration-card .dish-image{width:100%;height:auto;aspect-ratio:4/3;border-radius:16px 16px 0 0}
.inspiration-card-copy{padding:10px}
.inspiration-card h3{font-size:16px;line-height:1.35;margin:0 0 4px;overflow-wrap:anywhere}
.inspiration-card .english{font-size:var(--font-size-xs);line-height:1.4;overflow-wrap:anywhere;margin-bottom:8px}
.inspiration-card .available{font-size:var(--font-size-sm);line-height:1.5;max-width:100%;overflow-wrap:anywhere}
.inspiration-card-meta{font-size:var(--font-size-sm);color:var(--muted);line-height:1.5;margin:8px 0 0}
.inspiration-card .prototype-note{font-size:var(--font-size-xs);line-height:1.5;margin:7px 0 0;overflow-wrap:anywhere}
.inspiration-card .heart{position:absolute;top:5px;right:5px;width:44px;height:44px;background:#fffdf7ed;border-radius:50%;display:grid;place-items:center}
@media(max-width:340px){.inspiration-grid{gap:var(--space-3)}.inspiration-card-copy{padding:8px}}
@media(max-width:299px){.inspiration-grid{grid-template-columns:minmax(0,1fr)}}
/* Inspiration keeps the document as its only vertical scroller. */
.phone:has(.inspiration-page){overflow:visible}
main:has(>.inspiration-page){padding-bottom:calc(100px + env(safe-area-inset-bottom, 0px))}
.inspiration-page{min-width:0}
.inspiration-page>.chips{
  position:sticky;
  top:env(safe-area-inset-top, 0px);
  z-index:4;
  background:var(--cream);
  padding:6px 0;
  flex-wrap:nowrap;
  overflow-x:auto;
  box-shadow:0 3px 5px #4930250a;
}
.inspiration-page>.chips button{white-space:nowrap}
.inspiration-section{scroll-margin-top:calc(70px + env(safe-area-inset-top, 0px))}
.phone:has(.inspiration-page)>nav{
  position:fixed;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:410px;
  padding-bottom:calc(11px + env(safe-area-inset-bottom, 0px));
}

/* Secondary Inspiration lifestyle controls. */
.lifestyle-filters{display:flex;gap:var(--space-2);overflow-x:auto;margin:0 0 12px;max-width:100%}
.lifestyle-filters button{font:inherit;font-size:var(--font-size-sm);white-space:nowrap;flex-shrink:0;border:1px solid var(--line);border-radius:var(--radius-button);background:var(--paper);min-height:var(--touch-target);padding:8px 10px}
.lifestyle-filters button.active{background:var(--yellow);border-color:#e9c66b;font-weight:700}
.lifestyle-tags{display:flex;flex-wrap:wrap;gap:var(--space-1);margin-top:7px;font-size:var(--font-size-xs);color:var(--muted)}
.lifestyle-tags span{background:var(--cream);border-radius:6px;padding:3px 4px}
.lifestyle-empty{padding:22px 10px;text-align:center;color:var(--muted);line-height:1.8}

/* Temporary Inspiration Cooking dialog; document scrolling is unchanged. */
.cooking-dialog{margin:auto auto 0;border-radius:24px 24px 0 0;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
.cooking-dialog h3{font-size:15px;margin:14px 0 8px}
.cooking-methods{display:flex;flex-wrap:wrap;gap:var(--space-2)}
.cooking-methods label,.cooking-deep{display:flex;align-items:center;gap:var(--space-2);min-height:var(--touch-target);padding:7px 10px;border:1px solid var(--line);border-radius:var(--radius-card-compact);background:var(--paper)}
.cooking-methods label:has(:checked){background:var(--yellow)}
.cooking-deep{margin-top:10px}
.cooking-equipment{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:52px;border-bottom:1px solid var(--line);padding:6px 0}
.cooking-equipment>span{min-width:0;overflow-wrap:anywhere}
.cooking-equipment small{display:block;font-size:var(--font-size-xs);color:var(--muted)}
.cooking-equipment select{font:inherit;max-width:52%;min-height:var(--touch-target);background:var(--paper);color:inherit;border:1px solid var(--line);border-radius:10px;padding:6px}
.cooking-dialog footer{display:flex;gap:10px;padding-top:14px}
.cooking-dialog footer button{font:inherit;min-height:var(--touch-target);border-radius:14px;padding:10px}
.cooking-dialog footer>button:first-child{background:var(--paper);flex:1}
.cooking-dialog footer .primary{width:auto;flex:2}

/* Compact display of existing Dish cooking metadata. */
.dish-cooking-line{font-size:var(--font-size-sm);line-height:1.5;margin:4px 0 0;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Detail-only metadata pills replace the standalone cooking card. */
.dish-detail-metadata{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0;min-width:0}
.dish-detail .dish-detail-secondary{margin:6px 0 0;font-size:13px;font-weight:400;line-height:1.4;color:#957e63;overflow-wrap:anywhere}
.dish-detail .dish-detail-description{margin:12px 0;font-size:15px;font-weight:400;line-height:1.5;color:#806b59;text-align:left;overflow-wrap:break-word}
.dish-detail .dish-detail-description + .dish-ingredient-group h2{margin-top:20px}
.dish-detail .hero > .heart{position:absolute;top:12px;right:12px;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:#fffdf8ed;z-index:1}
.dish-detail .dish-find-recipe{margin-top:16px}
.dish-detail .dish-find-recipe + .detail-parallel{margin-top:26px}
.dish-detail-status{display:table;max-width:100%;margin:10px 0 14px;padding:6px 9px;border-radius:10px;font-size:var(--font-size-md);line-height:1.5;overflow-wrap:anywhere}

/* Reusable semantic Dish tag palette. */
.dish-tag.tag-cuisine{--tag-fill:#fff2cd}
.dish-tag.tag-time{--tag-fill:#eaf2f7}
.dish-tag.tag-difficulty{--tag-fill:#edf3e9}
.dish-tag.tag-quick{--tag-fill:#ffedb4}
.dish-tag.tag-one-pot{--tag-fill:#fce8d6}
.dish-tag.tag-kid{--tag-fill:#f7e7eb}
.dish-tag.tag-method{--tag-fill:#fae3d3}
.dish-tag.tag-equipment{--tag-fill:#eeebf7}
.dish-tag.tag-ready{--tag-fill:#e2f1da}
.dish-tag.tag-one-missing{--tag-fill:#fce7cf}
.dish-tag.tag-use-soon{--tag-fill:#f8dfc8}
.dish-tag[class*="tag-"]{background:var(--tag-fill);color:var(--brown);border:0;border-radius:10px;padding:4px 7px;max-width:100%;overflow-wrap:anywhere;line-height:1.4;font-size:var(--font-size-sm);font-weight:500}
.dish-tag.tag-cuisine,.dish-tag.tag-time,.dish-tag.tag-difficulty{font-weight:400}
.dish-tag.tag-ready,.dish-tag.tag-one-missing{font-weight:600}

/* Compact Today decision dashboard only. */
.today-dashboard header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 8px}
.today-dashboard header h1{font-size:23px;margin:6px 0}
.today-dashboard header p{grid-column:1/-1;color:var(--muted);font-size:var(--font-size-sm);margin:0 0 6px}
.today-header-kid{display:flex;align-items:center;gap:var(--space-1)}
.today-dashboard .section-heading{gap:var(--space-2)}
.today-dashboard h2{font-size:17px;margin:12px 0 8px}
.today-dashboard .section-heading>a,.today-dashboard .section-heading>button{font:inherit;font-size:var(--font-size-sm);background:transparent;min-height:var(--touch-target);padding:6px 0;flex-shrink:0}
.today-dashboard button:disabled{opacity:.45}
.today-priority-names{font-size:var(--font-size-sm);color:var(--muted);line-height:1.4;margin:0 0 7px;overflow-wrap:anywhere}
.today-choice{position:relative;min-width:0;overflow:hidden;border-radius:var(--radius-card-compact)}
.today-choice-link{display:block;height:100%}
.today-choice .dish-image{width:100%;height:auto;aspect-ratio:4/3;border-radius:14px 14px 0 0}
.today-choice-copy{padding:8px;min-width:0}
.today-choice h3{font-size:15px;line-height:1.35;margin:0 0 4px;overflow-wrap:anywhere}
.today-choice-meta{font-size:var(--font-size-xs);color:var(--muted);margin:0 0 5px;line-height:1.4}
.today-choice-tags{display:flex;flex-wrap:wrap;gap:var(--space-1)}
.today-priority-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3);max-width:100%}
.today-priority-card{min-width:0;max-width:100%}
.today-priority-card .today-choice-link{display:block}
.today-priority-card .dish-image{width:100%;height:auto;aspect-ratio:4/3;border-radius:14px 14px 0 0;margin:0}
.today-priority-card .today-choice-copy{padding:7px;min-width:0}
.today-priority-card h3{font-size:var(--font-size-body)}
.today-shortcut-row{display:flex;flex-wrap:wrap;gap:5px}
.today-shortcut-row button{font:inherit;font-size:var(--font-size-sm);border-radius:16px;background:var(--paper);border:1px solid var(--line);padding:7px;min-height:var(--touch-target);min-width:0}
.today-missing-row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:7px 0;min-height:var(--touch-target);border-bottom:1px solid var(--line);font-size:var(--font-size-md)}
.today-missing-row>span{min-width:0;overflow-wrap:anywhere}
.today-missing-row .dish-tag{font-size:var(--font-size-xs);flex-shrink:0;max-width:55%}
.today-more{display:block;text-align:center;min-height:var(--touch-target);padding:13px 16px;margin-top:16px;font-size:var(--font-size-body);font-weight:700;background:var(--yellow);color:var(--brown);border:1px solid #ffd363;border-radius:var(--radius-button)}
main:has(>.today-dashboard){padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}


@media(max-width:299px){.today-priority-strip{grid-template-columns:minmax(0,1fr)}}

/* Today Layout B: presentation only; source order remains recommendation order. */
.today-dashboard>header{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 70px;gap:2px 8px;min-height:96px}
.today-dashboard>header>.mascot,
.intro.primary-page-header>.mascot{grid-column:2;grid-row:1/4;width:70px;height:78px;object-fit:contain;align-self:center}
.today-dashboard>header h1,
.intro.primary-page-header h1{grid-column:1;grid-row:1;font-size:23px;margin:4px 0}
.today-dashboard>header p,
.intro.primary-page-header p{grid-column:1;grid-row:2;font-size:var(--font-size-sm);margin:0;line-height:1.45}
.today-header-kid{grid-column:1;grid-row:3;font-size:var(--font-size-xs);min-height:32px;gap:7px}
.today-priority-card .today-choice-link{display:flex;align-items:center}
.today-priority-card .dish-image{width:32%;height:auto;aspect-ratio:1/1;flex-shrink:0;border-radius:10px;margin:5px 0 5px 5px}
.today-priority-card .today-choice-copy{padding:6px;min-width:0}
.today-priority-card h3{font-size:var(--font-size-sm);line-height:1.4}
.today-priority-card .today-choice-meta{font-size:var(--font-size-xs);margin-bottom:3px}
.today-dashboard .cozy{margin-top:8px}
@media(max-width:299px){.today-dashboard>header,.intro.primary-page-header{grid-template-columns:minmax(0,1fr) 60px}.today-dashboard>header>.mascot,.intro.primary-page-header>.mascot{width:60px}}

/* Today greeting illustration and compact fourth tile only. */
.today-dashboard>header{--today-cat-size:clamp(110px,32vw,140px);grid-template-columns:minmax(0,1fr) var(--today-cat-size);min-height:120px;column-gap:8px;padding-bottom:4px}
.today-dashboard>header>.mascot,
.intro.primary-page-header>.mascot{position:absolute;right:0;bottom:-4px;width:var(--today-cat-size);height:var(--today-cat-size);object-fit:contain;pointer-events:none;-webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 74%,transparent 100%);mask-image:linear-gradient(to bottom,#000 0%,#000 74%,transparent 100%)}
.today-dashboard>header h1,.today-dashboard>header p,.today-header-kid,
.intro.primary-page-header h1,.intro.primary-page-header p{min-width:0;overflow-wrap:anywhere}
.today-header-kid{justify-self:start;min-height:36px}
@media(max-width:299px){.today-dashboard>header,.intro.primary-page-header{--today-cat-size:clamp(80px,32vw,100px);grid-template-columns:minmax(0,1fr) var(--today-cat-size)}}

/* Today five-tile mosaic: one layout system, natural content height. */
.today-bento{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-areas:"primary primary primary medium medium medium" "primary primary primary small small small" "four four wide wide wide wide";gap:var(--space-3);align-items:stretch}
.today-bento-tile{min-width:0;overflow:hidden;border-radius:var(--radius-card-compact);background:#fff6df;border:1px solid #efe6d440;box-shadow:none}
.bento-1{grid-area:primary}
.bento-2{grid-area:medium}
.bento-3{grid-area:small}
.bento-4{grid-area:four}
.bento-5{grid-area:wide}
.today-bento-link{display:grid;min-width:0}
.today-bento-tile .dish-image{width:100%;height:auto;aspect-ratio:2/1;border-radius:14px 14px 0 0}
.bento-1 .dish-image{aspect-ratio:3/4}
.bento-4 .dish-image{aspect-ratio:1.7/1}
.today-bento-copy{padding:7px;min-width:0}
.today-bento-copy h3{font-size:var(--font-size-body);line-height:1.35;margin:0 0 4px;overflow-wrap:anywhere}
.bento-1 h3{font-size:17px}
.today-bento-copy p{font-size:var(--font-size-xs);line-height:1.4;margin:0 0 5px;color:var(--muted);overflow-wrap:anywhere}
.today-bento-tags{display:flex;flex-wrap:wrap;gap:var(--space-1)}
.today-bento-tile{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr}
.today-bento-link{grid-column:1/-1;grid-row:1}
.bento-5 .today-bento-link{grid-template-columns:minmax(0,2fr) minmax(0,3fr);align-items:center}
.bento-5 .dish-image{aspect-ratio:3/4;border-radius:12px;height:auto}
@media(max-width:319px){.today-bento{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"primary primary" "medium small" "four wide"}.bento-1 .dish-image{aspect-ratio:16/7}.bento-5 .today-bento-link{grid-template-columns:minmax(0,1fr)}.bento-5 .dish-image{aspect-ratio:2/1}}

/* Shared Today card DNA; proportions remain owned by the existing grid. */
.today-dashboard{--today-card-radius:15px;--today-card-surface:#fffbf1;--today-card-line:#eee5d580;--today-card-shadow:0 2px 5px #49302508;--today-card-space:7px}
.today-dashboard :is(.today-priority-card,.today-bento-tile){border-radius:var(--today-card-radius);background:var(--today-card-surface);border:1px solid var(--today-card-line);box-shadow:var(--today-card-shadow);overflow:hidden;min-width:0}
.today-dashboard :is(.today-choice-copy,.today-bento-copy){padding:var(--today-card-space);min-width:0}
.today-dashboard :is(.today-priority-card,.today-bento-tile) .dish-image{border:0;border-radius:0;margin:0;padding:0;min-width:0;overflow:hidden}
.today-dashboard :is(.today-priority-card,.today-bento-tile) .dish-image img{width:100%;height:100%;object-fit:cover;display:block;border:0;margin:0;padding:0}
.today-priority-card .today-choice-link{display:grid;grid-template-columns:minmax(0,34fr) minmax(0,66fr);align-items:stretch;height:100%}
.today-priority-card .dish-image,.bento-5 .dish-image{position:relative;width:100%;height:100%;min-height:80px;aspect-ratio:auto;align-self:stretch}
.today-priority-card .dish-image img,.bento-5 .dish-image img{position:absolute;inset:0}
.bento-5 .today-bento-link{grid-template-columns:minmax(0,2fr) minmax(0,3fr);align-items:stretch;height:100%}
.bento-5 .today-bento-copy,.today-priority-card .today-choice-copy{align-self:center}
.today-dashboard :is(.today-choice-tags,.today-bento-tags) .dish-tag{font-size:var(--font-size-xs);padding:3px 5px;line-height:1.4;border-radius:10px}
.today-bento-tile{grid-template-columns:minmax(0,1fr)}
.today-dashboard>header,
.intro.primary-page-header{min-height:calc(var(--today-cat-size) + 40px);grid-template-rows:auto auto 40px}
.today-dashboard>header>.mascot,
.intro.primary-page-header>.mascot{bottom:40px}
.today-header-kid{grid-column:1/-1;grid-row:3;justify-self:end;align-self:end;display:flex;align-items:center;gap:var(--space-2);min-height:40px;font-size:var(--font-size-xs);color:var(--muted)}
.today-header-kid .switch{flex-shrink:0}
@media(max-width:319px){.bento-5 .today-bento-link{grid-template-columns:minmax(0,1fr)}.bento-5 .dish-image{height:auto;aspect-ratio:2/1;min-height:0}}
/* Shorter READY Bento only: preserve column widths and all text/actions. */
.today-bento{row-gap:6px;--today-card-space:4px}
.today-bento-link{grid-template-rows:auto 1fr}
.today-bento-tile .dish-image{aspect-ratio:4/1}
.today-bento .bento-1 .dish-image{aspect-ratio:3/2}
.today-bento .bento-4 .dish-image{aspect-ratio:3.4/1}
.today-bento-copy h3{margin-bottom:3px}
.today-bento-copy p{margin-bottom:3px}
.today-bento-tags{row-gap:3px}
.today-bento .bento-5 .today-bento-link{grid-template-rows:1fr}
.today-bento .bento-5 .dish-image{aspect-ratio:auto;min-height:60px;height:100%}
@media(max-width:319px){.today-bento .bento-1 .dish-image{aspect-ratio:16/4}.today-bento .bento-5 .today-bento-link{grid-template-rows:auto 1fr}.today-bento .bento-5 .dish-image{aspect-ratio:4/1;height:auto;min-height:0}}

/* Image-first interiors; outer grid areas and widths are unchanged. */
.today-bento-link{grid-template-rows:minmax(0,1fr) auto;height:100%}
.today-bento .dish-image{min-height:0;align-self:stretch}
.today-bento .today-bento-copy{padding:6px}
.today-bento-copy h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-bottom:3px}
.today-bento-copy p{margin-bottom:0}
.today-bento-tags{margin-top:4px}
.today-bento .bento-3 .dish-image{aspect-ratio:2.5/1}
.today-bento .bento-4 .dish-image{aspect-ratio:2/1}
.today-bento .bento-5 .today-bento-link{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:1fr}
.today-bento .bento-5 .dish-image{height:100%;aspect-ratio:auto;min-height:0}
@media(max-width:319px){.today-bento .bento-5 .today-bento-link{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.today-bento .bento-5 .dish-image{height:auto;aspect-ratio:2/1}}

/* Upper-right supporting variant: image, name and time only. */
.today-bento .bento-2 .today-bento-link{grid-template-rows:minmax(0,2fr) minmax(0,1fr);min-height:0}
.today-bento .bento-2 .dish-image{aspect-ratio:auto;width:100%;height:100%;min-height:0;position:relative;margin:0;padding:0;border:0}
.today-bento .bento-2 .dish-image img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.today-bento .bento-2 .today-bento-copy{padding:6px;min-height:0}
.today-bento .bento-2 h3{line-height:1.35;margin-bottom:2px;-webkit-line-clamp:2}
.today-bento .bento-2 .dish-image>span{display:none}
/* Smart entry and ordinary-Pantry batch management only. */
.pantry-add>h2{margin:12px 12px 0;font-size:17px}
#pantry-input-help{margin:0;line-height:1.4;text-align:left}
#pantry-form .primary{overflow-wrap:anywhere}
#pantry-preview{min-width:0;overflow-wrap:anywhere}
#pantry-heading{gap:var(--space-2);flex-wrap:wrap}
#pantry-heading>div{display:flex;gap:var(--space-1)}
#pantry-heading button{min-height:var(--touch-target);padding:8px;background:transparent;border-radius:12px}
.pantry-selection-mark{flex:none;color:var(--brown)}
.pantry-chip[aria-pressed="true"]{background:var(--yellow);border-color:#c98740}
.pantry-chip[aria-pressed] .priority-state{font-size:10px;opacity:.7}
#pantry-batch:has(.pantry-batch-bar){height:150px}
.pantry-batch-bar{position:fixed;z-index:6;bottom:calc(76px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:calc(100% - 24px);max-width:386px;padding:10px;background:var(--paper);border:1px solid var(--line);border-radius:16px;box-shadow:0 3px 12px #49302512}
.pantry-batch-bar strong{display:block;font-size:var(--font-size-sm);margin-bottom:5px}
.pantry-batch-bar>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.pantry-batch-bar button{flex:1;min-width:0;min-height:var(--touch-target);border-radius:11px;background:#fff0dc;padding:6px;font:inherit;font-size:var(--font-size-sm);overflow-wrap:anywhere}
.pantry-confirm-actions{display:flex;gap:10px;justify-content:flex-end}
.pantry-confirm-actions button{min-height:var(--touch-target);padding:10px 18px;border-radius:12px;background:var(--yellow)}
/* Category headings share the existing compact ingredient chips. */
.pantry-category{margin:14px 0 18px;min-width:0}
.pantry-category h3{font-size:var(--font-size-body);font-weight:600;margin:0 0 8px}
.pantry-category h3 small{font-size:var(--font-size-sm);font-weight:400;color:var(--muted)}
/* Compact Parallel Cooking suggestions, scoped to Dish Detail. */
.detail-parallel{margin:18px 0;min-width:0}
.detail-parallel h2{font-size:17px;margin:0 0 5px}
.parallel-help{font-size:var(--font-size-sm);color:var(--muted);margin:0 0 9px}
.parallel-suggestion{display:block;border:1px solid var(--line);border-radius:var(--radius-card-compact);background:var(--cream);padding:10px;margin-top:8px;min-width:0;overflow-wrap:anywhere}
.parallel-card-top{display:grid;grid-template-columns:72px minmax(0,1fr);gap:9px;align-items:start}
.parallel-card-top .dish-image{width:72px;height:72px;min-width:0;border-radius:10px;overflow:hidden;margin:0}
.parallel-card-top .dish-image img{display:block;width:100%;height:100%;object-fit:cover}
.parallel-card-top .dish-image>span{display:none}
.parallel-card-copy{min-width:0}
.parallel-card-copy>small{font-size:10px;color:var(--muted)}
.parallel-card-copy h3{font-size:15px;line-height:1.4;margin:2px 0 5px}
.parallel-tags{display:flex;flex-wrap:wrap;gap:var(--space-1)}
.parallel-tags .dish-tag{max-width:100%;white-space:normal}
.parallel-reasons{display:flex;flex-wrap:wrap;gap:3px 10px;list-style:none;padding:0;margin:8px 0;font-size:var(--font-size-xs);line-height:1.5}
@media(max-width:340px){.parallel-card-top{grid-template-columns:60px minmax(0,1fr)}.parallel-card-top .dish-image{width:60px;height:64px}}
.alias-manage,.alias-link{background:transparent;text-align:left;min-height:var(--touch-target);padding:8px 12px;color:var(--brown);font:inherit;font-size:var(--font-size-sm);max-width:100%;overflow-wrap:anywhere}
#pantry-alias-form{display:grid;gap:10px}
#pantry-alias-dialog label{display:grid;gap:5px}
#pantry-alias-dialog input,#pantry-alias-dialog select{font:inherit;width:100%;min-width:0;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}
#pantry-alias-dialog p{font-size:var(--font-size-sm);line-height:1.6;overflow-wrap:anywhere}
.alias-row{display:flex;align-items:center;gap:var(--space-3);padding:6px 0;border-bottom:1px solid var(--line)}
.alias-row span{flex:1;min-width:0;overflow-wrap:anywhere}
.alias-row button{min-height:var(--touch-target);padding:8px;border-radius:10px;background:var(--cream);flex-shrink:0}
/* Bilingual product lockup; UI language switching does not rename the brand. */
.topbar .brand-lockup{display:flex;flex-direction:column;gap:2px;line-height:1.15}
.topbar #brand-name{font-size:17px}
.topbar .brand-zh{font-family:var(--font-zh);font-size:var(--font-size-sm);letter-spacing:2px}
.desktop-note .brand-zh{display:block;font-family:var(--font-zh);font-size:18px;letter-spacing:3px;margin-top:5px}
/* The selected language leads the brand hierarchy. */
html:lang(zh) .topbar .brand-zh{order:-1;font-size:21px;font-weight:700;letter-spacing:2px}
html:lang(zh) .topbar #brand-name{font-size:var(--font-size-sm);letter-spacing:.5px}
html:lang(en) .topbar #brand-name{font-size:21px}
html:lang(en) .topbar .brand-zh{font-size:var(--font-size-sm)}
.desktop-note{display:flex;flex-direction:column}
html:lang(zh) .desktop-note .brand-zh{order:-1;font-size:30px;margin:0 0 5px}
html:lang(zh) #desktop-brand{font-size:18px}
.brand-slogan{margin:5px 23px 9px;white-space:pre-line;color:var(--muted);font-size:var(--font-size-sm);line-height:1.6}
#desktop-motto{white-space:pre-line;line-height:1.8;letter-spacing:0;max-width:230px}
@media(max-width:900px){.desktop-note{display:none}}
/* A little breathing room between Today modules in both UI languages. */
.today-dashboard>section+section{padding-top:10px}

/* Pantry category choices reuse the canonical labels and existing dialog surface. */
.pantry-category-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}
.pantry-category-options button{min-width:0;min-height:var(--touch-target);padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--paper);font:inherit;overflow-wrap:anywhere}
.pantry-draft-category{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin:8px 0;flex-wrap:wrap}
.pantry-draft-category select{max-width:100%;min-width:0}

#pantry-category-dialog h2{margin:12px 0}
#default-pantry-category{background:transparent;color:var(--muted)}
.pantry-add .pantry-draft-category{overflow-wrap:anywhere}

/* Lightweight Today-only meal actions, outside the card's detail link. */
.today-dashboard .today-meal-actions{display:flex;flex-wrap:wrap;align-items:center;gap:0 6px;padding:0;margin-top:4px}
.today-meal-actions button{font:inherit;font-size:var(--font-size-xs);line-height:1.4;min-height:32px;padding:3px 0;background:transparent;color:var(--brown);border:0;border-radius:6px}
.today-dashboard .today-meal-actions button:disabled{opacity:1;color:var(--muted);cursor:default}
.today-dashboard .today-meal-actions .today-meal-pill{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-height:var(--action-size-compact);height:30px;padding:0 10px;border:1px solid #dde5d7;border-radius:var(--radius-pill);background:#eef2e8;color:#596650;font-size:var(--font-size-sm);font-weight:600;line-height:1;letter-spacing:0;white-space:nowrap;cursor:pointer;box-shadow:none}
.today-dashboard .today-meal-actions .today-meal-pill:not(:disabled):hover{background:#e3eadc;border-color:#cbd7c3}
.today-dashboard .today-meal-actions .today-meal-pill:focus-visible{outline:2px solid var(--brown);outline-offset:2px}
.today-dashboard .today-meal-actions .today-meal-pill.is-completed{background:#dce5d3;border-color:#c8d4bd;color:#46553e;opacity:1;box-shadow:none;cursor:default}
.today-meal-actions .today-meal-undo{color:var(--muted);font-weight:400;white-space:nowrap;text-decoration:underline}
.today-meal-error{font-size:var(--font-size-xs);color:var(--muted);overflow-wrap:anywhere}
.today-meal-error:empty{display:none}
.today-card-image-link{display:contents}
.today-card-text-link{display:block}
.today-dashboard :is(.today-priority-card,.today-bento-tile){container-type:inline-size}
/* Narrow horizontal cards put the image above the text so one shared chip fits. */
@container(max-width:250px){
 .today-priority-card .today-choice-link,.today-bento .bento-5 .today-bento-link{grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr}
 .today-priority-card .dish-image,.today-bento .bento-5 .dish-image{height:auto;min-height:0;aspect-ratio:3/1}
 .today-priority-card .dish-image img,.today-bento .bento-5 .dish-image img{position:static}
}
/* Give the English pill enough room in the narrow bottom-row card. */
@media(min-width:319px) and (max-width:430px){.today-bento{grid-template-areas:"primary primary primary medium medium medium" "primary primary primary small small small" "four four four wide wide wide"}}

/* My Meals: keep Favorites intact; History is a read-only meal view. */
.my-meals-tabs{display:flex;gap:var(--space-1);padding:4px;margin:4px 0 16px;border-radius:var(--radius-pill);background:#efe8d9}
.my-meals-tabs button{flex:1;min-width:0;min-height:36px;border-radius:var(--radius-pill);background:transparent;color:var(--muted);font-size:var(--font-size-md);font-weight:600}
.my-meals-tabs button[aria-pressed="true"]{background:var(--paper);color:var(--brown);box-shadow:var(--shadow-soft)}
.meal-history-day{margin:0 0 22px}
.meal-history-day>h2{font-size:16px;margin:14px 0 9px}
.meal-history-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 7px;align-items:start}
/* Preserve each meal's DOM grouping while its dishes share the date's grid. */
.meal-history-card,.meal-history-dishes{display:contents}
.meal-history-dish{min-width:0;display:block;border-radius:var(--radius-image);overflow:hidden}
.meal-history-dish .dish-image{width:100%;height:auto;aspect-ratio:1/1;border-radius:var(--radius-image);overflow:hidden}
.meal-history-dish .dish-image>span{display:none}
.meal-history-dish .dish-image img{display:block;width:100%;height:100%;object-fit:cover}
.meal-history-dish h3{font-size:var(--font-size-xs);line-height:1.4;margin:5px 1px 0;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.meal-history-unavailable{display:grid;place-items:center;aspect-ratio:1/1;border-radius:var(--radius-image);background:var(--cream);color:var(--muted);font-size:var(--font-size-xs);padding:5px;overflow-wrap:anywhere}
.meal-history-empty{text-align:center;padding:28px 12px;color:var(--muted)}
.meal-history-empty .mascot{position:static;width:var(--mascot-empty);height:var(--mascot-empty);object-fit:contain;margin:0 auto 12px}
.meal-history-empty h2{font-size:18px;color:var(--brown);margin:0 0 10px}
.meal-history-empty p{font-size:var(--font-size-md);line-height:1.7;margin:0}

/* A compact, read-only History entry and temporary past-meal picker. */
.past-meals-entry{display:inline-flex;align-items:center;background:#ffe0bd;color:#795034;border:1px solid #edbd88;border-radius:var(--radius-pill);font-size:var(--font-size-md);font-weight:600;padding:8px 14px;min-height:36px}
.past-meals-entry:hover{background:#ffd3a5}
.history-day-empty{font-size:var(--font-size-sm);color:var(--muted);line-height:1.5}
#past-meals-saved{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:20;width:max-content;max-width:min(340px,calc(100vw - 32px));margin:0;padding:10px 15px;background:#fff7ea;color:#795034;border:1px solid #edcfaa;border-radius:14px;box-shadow:0 4px 18px #49302520;font-size:var(--font-size-md);line-height:1.5;overflow-wrap:anywhere;pointer-events:none}
#past-meals-saved:empty{display:none}
.meal-history-day{scroll-margin-top:12px}
.past-meals-dialog{margin:auto auto 0;max-width:410px;border-radius:22px 22px 0 0;padding-bottom:env(safe-area-inset-bottom,0px)}
.past-meals-dialog h2{font-size:17px}
.past-meal-dates{display:flex;gap:var(--space-2);margin:4px 0 12px}
.past-meal-dates button{flex:1;min-width:0;min-height:36px;border-radius:var(--radius-pill);background:#f0eadf;font-size:var(--font-size-sm)}
.past-meal-dates button[aria-pressed="true"]{background:#f5dfae;color:var(--brown);font-weight:600}
.past-meals-dialog .meal-history-dish{background:var(--paper);padding:3px;border:2px solid transparent;text-align:left;color:var(--brown)}
.past-meals-dialog .meal-history-dish[aria-pressed="true"]{background:#e5ecdd;border-color:#859778}
.past-meals-dialog .meal-history-dish h3{margin-bottom:3px}
.past-meals-dialog footer{position:sticky;bottom:0;background:var(--cream);padding:10px 0 12px;margin-top:12px;border-top:1px solid var(--line)}
#past-meal-message{font-size:var(--font-size-sm);line-height:1.5;color:var(--muted);margin:0 0 7px}
#past-meal-message:empty{display:none}
#save-past-meals{width:100%;min-height:40px;border-radius:14px;background:var(--yellow);font-weight:600}
#save-past-meals:disabled{opacity:.45;cursor:default}

/* Record the current detail dish together with its specific suggested partner. */
.parallel-meal-action{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2);margin:-2px 0 14px;padding:0 6px}
.parallel-meal-chip{width:auto;min-height:var(--action-size-compact);padding:0 10px;border:1px solid #dde5d7;border-radius:var(--radius-pill);background:#eef2e8;color:#596650;font-size:var(--font-size-sm);font-weight:600;white-space:nowrap}
.parallel-meal-chip:not(:disabled):hover{background:#e3eadc}
.parallel-meal-chip.is-completed{background:#dce5d3;border-color:#c8d4bd;color:#46553e;opacity:1;cursor:default}
.parallel-meal-undo{background:transparent;color:var(--muted);font-size:var(--font-size-xs);min-height:var(--action-size-compact);text-decoration:underline}
.parallel-meal-action [role="status"]{font-size:var(--font-size-xs);color:var(--muted)}
.parallel-meal-action [role="status"]:empty{display:none}

/* Built-in Pantry manager only; preserve shared equipment/custom controls. */
.pantry-select-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.pantry-select-chip{position:relative;min-width:0;cursor:pointer}
.pantry-select-chip>input{position:absolute;width:1px;height:1px;opacity:0;margin:0}
.pantry-select-chip>span{display:flex;align-items:center;justify-content:center;gap:var(--space-1);min-height:var(--touch-target);height:100%;padding:7px 6px;border:1px solid #e9dfcf;border-radius:var(--radius-button);background:#fffdf9;color:#877360;font-size:var(--font-size-sm);line-height:1.3;text-align:center;overflow-wrap:anywhere}
.pantry-select-chip .pantry-chip-check{display:none;flex-shrink:0}
.pantry-select-chip>input:checked+span{background:#fff0bf;border-color:#e6cd8c;color:#604829;font-weight:600}
.pantry-select-chip>input:checked+span .pantry-chip-check{display:inline}
.pantry-select-chip>input:focus-visible+span{outline:2px solid #b48343;outline-offset:2px}

.pantry-bulk-actions{display:flex;justify-content:flex-end;gap:14px;margin:4px 0 8px}
.pantry-bulk-actions button{background:transparent;padding:8px 0;color:#927043;font-size:var(--font-size-sm);line-height:1.4}

/* Equal standard cards only when Ready to Cook contains two dishes. */
.today-bento.today-bento-pair{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:none;grid-template-rows:auto;align-items:stretch}
.today-bento-pair .today-pair-card{grid-area:auto;min-width:0}
.today-bento-pair .today-bento-link{display:flex;flex-direction:column;height:100%}
.today-bento-pair .today-pair-card .dish-image{position:relative;width:100%;height:auto;aspect-ratio:3/2;flex:none}
.today-bento-pair .dish-image img{position:absolute;inset:0;object-fit:cover}
.today-bento-pair .today-bento-copy{display:flex;flex-direction:column;flex:1;padding:8px}
.today-bento-pair h3{font-size:var(--font-size-body);line-height:1.35}
.today-bento-pair .today-bento-tags{display:flex;flex-wrap:wrap;gap:var(--space-1);min-height:24px}
.today-dashboard .today-bento-pair .today-meal-actions{margin-top:auto;padding-top:8px}

/* Four dishes: mirrored 54/46 rows, preserving recommendation order. */
.today-bento.today-bento-four{grid-template-columns:repeat(13,minmax(0,1fr));grid-template-areas:none;grid-template-rows:repeat(2,1fr);gap:8px 0;align-items:stretch}
.today-bento-four .four-1{grid-column:1/8;grid-row:1;margin-right:4px}
.today-bento-four .four-2{grid-column:8/14;grid-row:1;margin-left:4px}
.today-bento-four .four-3{grid-column:1/7;grid-row:2;margin-right:4px}
.today-bento-four .four-4{grid-column:7/14;grid-row:2;margin-left:4px}
.today-bento-four .today-bento-link{display:flex;flex-direction:column;height:100%}
.today-bento-four .today-four-card .dish-image{position:relative;width:100%;height:auto;aspect-ratio:3/2;flex:none}
.today-bento-four .dish-image img{position:absolute;inset:0;object-fit:cover}
.today-bento-four .today-bento-copy{display:flex;flex-direction:column;flex:1;padding:7px}
.today-bento-four h3{font-size:var(--font-size-body);line-height:1.35}
.today-bento-four .today-bento-tags{display:flex;flex-wrap:wrap;gap:3px}
.today-dashboard .today-bento-four .today-meal-actions{margin-top:auto;padding-top:8px}
.today-dashboard .today-bento-four .today-meal-pill{padding-inline:7px;font-size:var(--font-size-xs)}

.today-shortcut-row{gap:var(--space-3)}
.today-shortcut-row button{flex:0 0 auto;padding-inline:12px}

/* Complete library browsing: isolated from recommendation cards. */


.inspiration-header .all-dishes-entry:focus-visible{outline:2px solid #a66d31;outline-offset:3px}
.all-dishes-back{display:inline-block;font-size:var(--font-size-md);margin-bottom:12px}
.all-dishes-page{min-width:0}
.all-dishes-page h1{font-size:23px;margin:0 0 14px}
.all-dishes-filters{display:flex;gap:var(--space-2);overflow-x:auto;max-width:100%;padding:3px 0 8px;margin-bottom:4px}
.all-dishes-filters button{flex:0 0 auto;border:1px solid #e6dccb;border-radius:var(--radius-pill);background:#fffdf7;color:var(--brown);font:inherit;font-size:var(--font-size-sm);padding:8px 11px;white-space:nowrap}
.all-dishes-filters button[aria-pressed="true"]{background:#f4df9d;border-color:#d8bf78}
.all-dishes-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 8px;margin-top:14px}
.all-dishes-card{display:block;min-width:0;color:var(--brown)}
.all-dishes-card .dish-image{width:100%;height:auto;aspect-ratio:1;border-radius:var(--radius-image);overflow:hidden}
.all-dishes-card .dish-image img{display:block;width:100%;height:100%;object-fit:cover}
.all-dishes-card .dish-image>span{display:none}
.all-dishes-card h3{margin:5px 0 0;font-size:var(--font-size-xs);line-height:1.4;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.all-dishes-empty{grid-column:1/-1;font-size:var(--font-size-md)}

/* Compact Inspiration filters only. */
.inspiration-page>.chips{margin:8px 0 6px;padding:3px 0;gap:var(--space-2)}
.inspiration-page>.chips button{min-height:var(--filter-size-compact);padding:6px 11px;line-height:20px}
.inspiration-page>.lifestyle-filters{margin:0 0 8px;gap:var(--space-2)}
.inspiration-page>.lifestyle-filters button{min-height:var(--filter-size-compact);padding:6px 10px;line-height:20px;border-radius:var(--radius-pill)}

.all-dishes-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.all-dishes-header h1{margin:0;min-width:0;font-size:var(--font-size-title);line-height:1.3}
.inspiration-header .all-dishes-entry,.all-dishes-header .all-dishes-back{display:inline-flex;align-items:center;flex-shrink:0;white-space:nowrap;padding:8px 11px;border-radius:var(--radius-pill);border:1px solid #eed2a6;background:#f7e1bb;color:#79502b;font-size:var(--font-size-sm);font-weight:600;line-height:1.4}
.all-dishes-header .all-dishes-back{margin:0}
.inspiration-header .all-dishes-entry:hover,.all-dishes-header .all-dishes-back:hover{background:#f0d4a3}

/* Shared intro variants are opt-in; existing intro() calls retain their layout. */
.intro-shared{--intro-mascot-size:var(--mascot-intro);--intro-mascot-offset:0px;height:auto;min-height:149px;padding-bottom:16px;text-align:left;isolation:isolate}
.intro-shared.intro-size-small{--intro-mascot-size:90px}
.intro-shared.intro-size-large{--intro-mascot-size:clamp(112px,32vw,140px)}
.intro-shared h1,.intro-shared p,.intro-shared .date,.intro-shared .intro-eyebrow{max-width:calc(100% - var(--intro-mascot-size) - 8px);position:relative;z-index:1}
.intro-shared img.mascot,.intro-shared.en img.mascot{width:var(--intro-mascot-size);height:var(--intro-mascot-size);right:var(--intro-mascot-offset);bottom:4px;object-fit:contain;pointer-events:none}
.intro-shared.intro-position-overlap{--intro-mascot-offset:-8px}
.intro-shared.intro-position-overlap img.mascot{bottom:-8px}
.intro-shared.intro-position-crop{--intro-mascot-offset:-16px;overflow:hidden}
.intro-shared.intro-position-crop img.mascot{bottom:-12px}
.intro-shared.intro-tone-warm{background:radial-gradient(ellipse at right bottom,#ffda7026,transparent 70%)}
.intro-eyebrow{font-size:var(--font-size-xs);color:var(--muted);line-height:1.4;margin-bottom:var(--space-2)}
.intro-accents{position:absolute;right:4px;top:8px;width:7px;height:7px;border-radius:50%;background:var(--yellow);opacity:.45;box-shadow:-18px 9px 0 -2px var(--yellow);pointer-events:none;z-index:-1}
@media(max-width:360px){.intro-shared{--intro-mascot-size:94px}.intro-shared.intro-size-small{--intro-mascot-size:80px}.intro-shared.intro-size-large{--intro-mascot-size:104px}}

/* Today: compact brand, restored Bento, and integrated peekaboo header. */
.phone:has(.today-dashboard,.primary-page-header,.all-dishes-page) .brand-slogan{display:none}
.phone:has(.today-dashboard,.primary-page-header,.all-dishes-page) .topbar{height:48px;padding:9px 20px}
.phone:has(.today-dashboard,.primary-page-header,.all-dishes-page) .topbar .brand-zh{font-size:16px}
.phone:has(.today-dashboard,.primary-page-header,.all-dishes-page) .topbar #brand-name{font-size:11px}
html:lang(en) .phone:has(.today-dashboard,.primary-page-header,.all-dishes-page) .topbar #brand-name{font-size:16px}
html:lang(en) .phone:has(.today-dashboard,.primary-page-header,.all-dishes-page) .topbar .brand-zh{font-size:11px}

.today-dashboard>header,

.intro.primary-page-header{--today-cat-size:clamp(156px,48vw,200px);position:relative;display:grid;grid-template-columns:minmax(0,1fr) 42%;grid-template-rows:auto auto;align-content:start;min-height:122px;gap:7px 0;padding:7px 0 0;background:radial-gradient(ellipse at right bottom,#ffda7020,transparent 65%);border:0;box-shadow:none;text-align:left;overflow:hidden}
.today-dashboard>header h1,
.intro.primary-page-header h1{grid-column:1;grid-row:1;margin:0;font-size:clamp(23px,6.4vw,26px);line-height:1.3;font-weight:800;letter-spacing:0;z-index:1}
.today-dashboard>header p,
.intro.primary-page-header p{grid-column:1;grid-row:2;margin:0;font-size:12px;line-height:1.8;color:#806b59;overflow-wrap:normal;z-index:1}
.today-dashboard>header>.mascot,
.intro.primary-page-header>.mascot{position:absolute;width:var(--today-cat-size);height:var(--today-cat-size);right:-26px;bottom:-8px;object-fit:contain;object-position:right bottom;pointer-events:none;mask-image:none;-webkit-mask-image:none}
.today-household,.primary-header-secondary{display:flex;justify-content:flex-end;margin:-3px 0 3px;position:relative}
.today-household .today-header-kid{display:flex;align-items:center;gap:6px;min-height:44px;padding:0;background:transparent;border:0;border-radius:0;font-size:var(--font-size-xs);color:var(--muted)}
.today-household #child{position:relative}
.today-household #child:before{content:"";position:absolute;inset:-10px 0}
.today-dashboard .section-heading{gap:8px;align-items:center;margin-bottom:8px}
.today-dashboard .section-heading h2{font-size:18px;line-height:1.4;margin:0}
.today-dashboard .section-heading>a,.today-dashboard #rotate-today{font-size:11px;background:transparent;padding:8px 0;color:#94704b;white-space:nowrap}
@media(max-width:360px){.today-dashboard>header,.intro.primary-page-header{min-height:118px}.today-dashboard>header p,.intro.primary-page-header p{font-size:11px}.today-dashboard>header>.mascot,.intro.primary-page-header>.mascot{right:-28px}}

/* Today top canvas only: layered illustration, with existing cards untouched. */
.phone:has(.today-dashboard,.primary-page-header,.all-dishes-page) .topbar{height:64px;padding:21px 20px 9px}
.today-dashboard>header,
.intro.primary-page-header{display:block;position:relative;isolation:isolate;min-height:0;height:200px;padding:0;overflow:hidden;background:radial-gradient(ellipse at 85% 66%,#ffda7033,transparent 65%)}
.today-dashboard>header h1,
.intro.primary-page-header h1{position:relative;z-index:2;max-width:225px;margin:0 0 4px;font-size:26px;line-height:1.25}
.today-dashboard>header p,
.intro.primary-page-header p{position:relative;z-index:2;max-width:190px;margin:0;font-size:12px;line-height:1.4;overflow-wrap:normal}
.today-dashboard>header>.mascot,
.intro.primary-page-header>.mascot{--today-cat-size:clamp(220px,61vw,250px);position:absolute;z-index:1;width:var(--today-cat-size);height:var(--today-cat-size);right:-28px;bottom:8px;object-fit:contain;object-position:right bottom;opacity:1;pointer-events:none;-webkit-mask-image:linear-gradient(105deg,rgba(0,0,0,.25) 0%,rgba(0,0,0,.35) 24%,#000 56%,#000 100%);mask-image:linear-gradient(105deg,rgba(0,0,0,.25) 0%,rgba(0,0,0,.35) 24%,#000 56%,#000 100%)}
.today-household,.primary-header-secondary{position:relative;z-index:2;display:flex;justify-content:flex-end;margin:-44px 0 3px;min-height:44px}
.today-household .today-header-kid{padding:0 3px;min-height:44px;background:transparent}
@media(max-width:360px){.today-dashboard>header,.intro.primary-page-header{height:200px;min-height:0}.today-dashboard>header h1,.intro.primary-page-header h1{font-size:24px;max-width:205px}.today-dashboard>header p,.intro.primary-page-header p{font-size:11px;max-width:170px}.today-dashboard>header>.mascot,.intro.primary-page-header>.mascot{right:-34px}}

/* Today household control sits below the supporting copy, aligned left. */
.today-household{justify-content:flex-start;margin-top:-98px;margin-bottom:57px}
.today-household .today-header-kid{padding-left:0}

/* Compact Today header spacing while retaining the left household control. */
.today-dashboard>header{height:168px;padding-top:6px}
.today-dashboard>header>.mascot,
.intro.primary-page-header>.mascot{bottom:-4px}
.today-household,.primary-header-secondary{margin-top:-72px;margin-bottom:31px}
@media(max-width:360px){.today-dashboard>header,.intro.primary-page-header{height:168px}}

/* Approved primary header parameters. Today uses the defaults; intro opts in via layout: primary. */
.today-dashboard>header,.intro.primary-page-header{background:var(--header-glow,radial-gradient(ellipse at 85% 66%,#ffda7033,transparent 65%))}
.today-dashboard>header>.mascot,.intro.primary-page-header>img.mascot{width:var(--header-mascot-width,clamp(220px,61vw,250px));height:var(--header-mascot-width,clamp(220px,61vw,250px));right:var(--header-mascot-x,-28px);bottom:var(--header-mascot-y,-4px);opacity:var(--header-mascot-opacity,1);-webkit-mask-image:var(--header-mascot-mask,linear-gradient(105deg,rgba(0,0,0,.25) 0%,rgba(0,0,0,.35) 24%,#000 56%,#000 100%));mask-image:var(--header-mascot-mask,linear-gradient(105deg,rgba(0,0,0,.25) 0%,rgba(0,0,0,.35) 24%,#000 56%,#000 100%))}
.intro.primary-page-header h1,.intro.primary-page-header p{max-width:var(--header-text-width,190px)}
.intro.primary-page-header h1{max-width:225px}
.primary-header-secondary{gap:6px;font-size:var(--font-size-xs);color:var(--muted)}
@media(max-width:360px){.today-dashboard>header>.mascot,.intro.primary-page-header>img.mascot{right:var(--header-mascot-x,-34px)}.intro.primary-page-header h1{max-width:205px}.intro.primary-page-header p{max-width:170px}}

/* Kitchen's basket composition uses the shared primary intro canvas. */
.intro.primary-page-header:has(+.pantry-add){--header-mascot-width:clamp(200px,58vw,238px);--header-mascot-x:-35px;--header-mascot-y:-50px;--header-glow:radial-gradient(ellipse at 90% 75%,#dce5d340,transparent 58%),radial-gradient(ellipse at 70% 90%,#ffda7026,transparent 68%);--header-mascot-mask:linear-gradient(100deg,rgba(0,0,0,.25) 0%,rgba(0,0,0,.4) 23%,#000 52%,#000 100%);height:168px;min-height:0}

/* Kitchen-only compact section rhythm and quick-add chips. */
#app:has(>.pantry-add)>.pantry-add{margin:6px 0 10px}
#app:has(>.pantry-add)>.quick-add{margin:10px 0}
#app:has(>.pantry-add) .quick-add-heading h2{margin-bottom:5px}
#app:has(>.pantry-add) .quick-add-chips{gap:5px}
#app:has(>.pantry-add) .quick-add-chips button{min-height:32px;padding:4px 8px;font-size:12px;line-height:1.4;border-radius:var(--radius-pill)}
#app:has(>.pantry-add)>#pantry-heading h2{margin:10px 0 7px}
#app:has(>.pantry-add) .pantry-category{margin:8px 0 12px}
#app:has(>.pantry-add) .pantry-category h3{margin-bottom:5px}
#app:has(>.pantry-add) .use-soon{margin:10px 0;padding:10px}
#app:has(>.pantry-add)>.kitchen-settings{margin:12px 0;padding:10px}
#app:has(>.pantry-add)>.cozy{margin-top:10px}

/* Inspiration chef composition on the shared primary header canvas. */
.inspiration-page>.intro.primary-page-header{--header-mascot-width:clamp(200px,57vw,235px);--header-mascot-x:-30px;--header-mascot-y:-34px;--header-glow:radial-gradient(ellipse at 88% 70%,#ffda7033,transparent 67%);--header-mascot-mask:linear-gradient(100deg,rgba(0,0,0,.25),rgba(0,0,0,.45) 24%,#000 52%);height:176px;min-height:0}
.inspiration-page>.inspiration-header{justify-content:flex-start;margin:6px 0 14px}

/* Keep Inspiration's right crop while releasing the chef's vertical overflow.
   clip (unlike hidden) does not turn the visible opposite axis into auto. */
.inspiration-page>.intro.primary-page-header{overflow-x:clip;overflow-y:visible}

/* Existing Inspiration library CTA joins the header's lower-left composition. */
.inspiration-page>.primary-page-header>.all-dishes-entry{position:absolute;left:0;bottom:12px;z-index:2;display:inline-flex;align-items:center;justify-content:center;min-height:42px;width:max-content;max-width:55%;padding:9px 12px;border:1px solid #eed2a6;border-radius:var(--radius-pill);background:#f7e1bb;color:#79502b;font-size:var(--font-size-sm);font-weight:600;line-height:1.4;box-shadow:none}
.inspiration-page>.primary-page-header>.all-dishes-entry:hover{background:#f0d4a3}
.inspiration-page>.primary-page-header>.all-dishes-entry:focus-visible{outline:2px solid #a66d31;outline-offset:3px}

/* English-only Inspiration fit; approved Chinese composition is unchanged. */
html:lang(en) .inspiration-page>.intro.primary-page-header{--header-mascot-x:-64px;overflow-x:clip;overflow-y:visible;clip-path:inset(-80px 0 0 0)}
html:lang(en) .inspiration-page>.intro.primary-page-header h1{font-size:24px;white-space:nowrap;max-width:215px;line-height:1.25}
html:lang(en) .inspiration-page>.intro.primary-page-header p{max-width:205px;font-size:12px;line-height:1.5}
html:lang(en) .inspiration-page>.primary-page-header>.all-dishes-entry{bottom:12px;padding:8px 10px;white-space:nowrap;min-height:40px}
html:lang(en) .inspiration-page>.chips,html:lang(en) .inspiration-page>.lifestyle-filters{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;-ms-overflow-style:none}
html:lang(en) .inspiration-page>.chips::-webkit-scrollbar,html:lang(en) .inspiration-page>.lifestyle-filters::-webkit-scrollbar{display:none}
html:lang(en) .inspiration-page>.chips button,html:lang(en) .inspiration-page>.lifestyle-filters button{flex-shrink:0;white-space:nowrap}

/* Chinese Inspiration summary clears the chef's existing vertical overflow. */
html:lang(zh) .inspiration-page>#inspiration-summary{margin-top:40px}

/* Persistent My Meals parent header, above either tab's existing content. */
.intro.primary-page-header:has(+.my-meals-tabs){--header-mascot-width:clamp(220px,59vw,240px);--header-mascot-x:-27px;--header-mascot-y:-22px;--header-glow:radial-gradient(ellipse at 86% 75%,#ffda702b,transparent 60%),radial-gradient(ellipse at right bottom,#ffe0bd30,transparent 70%);--header-mascot-mask:linear-gradient(100deg,rgba(0,0,0,.3),rgba(0,0,0,.5) 22%,#000 50%);height:130px;min-height:0;overflow:hidden}
.primary-page-header+.my-meals-tabs{margin:6px 0 12px}

/* Reveal the My Meals mascot above the header; retain right/bottom cropping. */
.intro.primary-page-header:has(+.my-meals-tabs){overflow-x:clip;overflow-y:visible;clip-path:inset(-120px 0 0 0)}

/* Use-soon heading only; keep its existing 44px row and section spacing. */
.today-dashboard .today-use-soon-heading{min-height:44px}
.today-use-soon-heading h2{display:flex;align-items:center;gap:6px;min-width:0}
.today-use-soon-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;border-radius:8px;background:#fff0cc;color:#a5753c}
.today-use-soon-icon svg{width:15px;height:15px}
.today-dashboard .today-use-soon-heading>.today-use-soon-more{display:inline-flex;align-items:center;justify-content:center;min-height:32px;height:32px;padding:0 9px;border:1px solid #eadbb9;border-radius:var(--radius-pill);background:#fff7e2;color:#795b39;font-size:11px;line-height:1.4;box-shadow:none}
.today-priority-names strong{font-weight:600;color:#8a633e}

/* Today use-soon panel matches Kitchen's existing priority surface. */
.today-dashboard>section:has(.today-use-soon-heading){background:#fff0dc;border:1px solid #f1d4b5;border-radius:var(--radius-button);padding:12px;margin-bottom:12px}

/* Kitchen quick-add and selection actions: compact, distinct button surfaces. */
#app:has(>.pantry-add) .quick-add-heading button,
#app:has(>.pantry-add) #select-all-pantry,
#app:has(>.pantry-add) #edit-pantry{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 12px;border:1px solid #e6cda3;border-radius:var(--radius-pill);background:#f7e1bb;color:#79502b;font-size:12px;font-weight:600;line-height:1.4;white-space:nowrap}
#app:has(>.pantry-add) #pantry-heading>div{display:flex;align-items:center;gap:6px}
#app:has(>.pantry-add) #select-all-pantry{background:#fff0bf;border-color:#e6cd8c;color:#604829}
#app:has(>.pantry-add) #edit-pantry[aria-pressed="true"]{background:#dce5d3;border-color:#c8d4bd;color:#46553e}

/* Match compact Kitchen heading actions and separate quick-add chips. */
#app:has(>.pantry-add) .quick-add-heading button,
#app:has(>.pantry-add) #edit-pantry,
#app:has(>.pantry-add) #select-all-pantry{min-height:30px;height:30px;padding:4px 10px}
#app:has(>.pantry-add) .quick-add-heading{margin-bottom:7px}
#app:has(>.pantry-add) .quick-add-heading h2{margin-bottom:0}

/* Kitchen inventory: Use Soon tint follows the existing heart marker. */
#app:has(>.pantry-add) .pantry-chip:has(.priority-state){background:#fff0dc;border-color:#f1d4b5}
/* Keep management selection distinguishable from the persistent Use Soon flag. */
#app:has(>.pantry-add) .pantry-chip[aria-pressed="true"]{background:var(--yellow);border-color:#c98740}

/* All Dishes: compact, mascot-free header using the approved brand spacing. */
.all-dishes-header{padding-top:6px;margin-bottom:14px;gap:8px}
.all-dishes-header h1{font-size:26px;font-weight:800;line-height:1.25;letter-spacing:0;color:var(--brown);white-space:nowrap}
.all-dishes-header .all-dishes-back{min-height:40px;padding:8px 10px;justify-content:center}
html:lang(en) .all-dishes-header h1{font-size:22px}
html:lang(en) .all-dishes-header .all-dishes-back{font-size:12px;padding-inline:9px}

/* Inspiration progressive result presentation only. */
:is(.inspiration-page,.all-dishes-page) .inspiration-expansion{display:flex;justify-content:center;margin-top:12px}
:is(.inspiration-page,.all-dishes-page) .inspiration-expansion:empty{display:none}
:is(.inspiration-page,.all-dishes-page) .inspiration-expand{min-height:44px;padding:8px 16px;border:1px solid var(--line);border-radius:999px;background:var(--paper);color:var(--brown);font:inherit;font-size:13px;cursor:pointer}
:is(.inspiration-page,.all-dishes-page) .inspiration-expand:focus-visible{outline:2px solid var(--brown);outline-offset:3px}
.inspiration-page .inspiration-section h2{scroll-margin-top:calc(70px + env(safe-area-inset-top, 0px))}

/* Compact Inspiration text bodies; image geometry remains unchanged. */
.inspiration-page .inspiration-grid{align-items:stretch}
.inspiration-page .inspiration-card{align-self:stretch;height:100%;display:flex;flex-direction:column}
.inspiration-page .inspiration-card-link{display:flex;flex-direction:column}
.inspiration-page .inspiration-card .dish-image{flex-shrink:0}
.inspiration-page .inspiration-card-copy{padding:6px 9px}
.inspiration-page .inspiration-card h3{font-size:16px;line-height:1.2;margin:0 0 3px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.inspiration-page .inspiration-card .available{font-size:12px;line-height:1.25;padding:2px 5px}
.inspiration-page .inspiration-card-meta{font-size:12px;line-height:1.3;margin:4px 0 0}
.inspiration-page .inspiration-card .dish-cooking-line{font-size:12px;line-height:1.3;margin:3px 0 0}
.inspiration-page .inspiration-card .prototype-note{font-size:11px;line-height:1.25;margin:4px 0 0}
.inspiration-page .inspiration-card .lifestyle-tags{gap:3px;margin-top:4px;line-height:1.25}
.inspiration-page .inspiration-card .dish-tag[class*="tag-"]{font-size:11px;line-height:1.25;padding:2px 5px}
.inspiration-page .inspiration-card .lifestyle-tags .dish-tag>span{padding:0;background:transparent}

/* Inspiration only: compact illustrated top canvas, with the entire chef visible. */
.phone:has(.inspiration-page) .topbar{height:48px;padding:12px 20px 6px;justify-content:flex-start;gap:12px}
.inspiration-page>.intro.primary-page-header,
html:lang(en) .inspiration-page>.intro.primary-page-header{--header-mascot-width:clamp(160px,42.75vw,176px);--header-mascot-x:0px;--header-mascot-y:0px;--header-mascot-mask:none;height:130px;min-height:0;padding-top:0;margin-bottom:0;overflow:visible;clip-path:none}
html:lang(en) .inspiration-page>.intro.primary-page-header{height:110px}
.inspiration-page>.intro.primary-page-header>img.mascot{object-fit:contain;object-position:center;max-height:none;opacity:1;mask-image:none;-webkit-mask-image:none;pointer-events:none}
.inspiration-page>.intro.primary-page-header h1,
html:lang(en) .inspiration-page>.intro.primary-page-header h1{max-width:165px;margin:0 0 4px;line-height:1.2}
.inspiration-page>.intro.primary-page-header p,
html:lang(en) .inspiration-page>.intro.primary-page-header p{max-width:165px;margin:0;line-height:1.4;font-size:12px}
.inspiration-page>.primary-page-header>.all-dishes-entry,
html:lang(en) .inspiration-page>.primary-page-header>.all-dishes-entry{top:76px;bottom:auto;min-height:34px;padding:6px 10px;max-width:165px;white-space:nowrap}
html:lang(en) .inspiration-page>.primary-page-header>.all-dishes-entry{top:56px}
.inspiration-page>#inspiration-summary,
html:lang(zh) .inspiration-page>#inspiration-summary{margin:4px 0 3px;padding:0}
.inspiration-page>#inspiration-summary>p:first-child{margin:0 0 2px;line-height:1.3}
.inspiration-page>#inspiration-summary>.prototype-note{line-height:1.35;margin:0}
/* Keep the full illustration inside the viewport at wider phone widths. */
html:lang(en) .inspiration-page>.intro.primary-page-header{height:max(114px,calc(var(--header-mascot-width) - 50px))}
html:lang(zh) .inspiration-page>.intro.primary-page-header p{max-width:185px;font-size:11px;line-height:1.5}
html:lang(en) .phone:has(.inspiration-page) .topbar{height:44px;padding-top:10px;padding-bottom:4px}
html:lang(en) .inspiration-page>#inspiration-summary{margin-top:0}
/* Give the Inspiration brand and following content a little more top breathing room. */
.phone:has(.inspiration-page){padding-top:10px}
/* Today and Kitchen follow the approved compact Inspiration header scale. */
.phone:has(.today-dashboard,.primary-page-header + .pantry-add,.my-meals-tabs){padding-top:10px}
.phone:has(.today-dashboard,.primary-page-header + .pantry-add,.my-meals-tabs) .topbar{height:48px;padding:12px 20px 6px;justify-content:flex-start;gap:12px}
html:lang(en) .phone:has(.today-dashboard,.primary-page-header + .pantry-add,.my-meals-tabs) .topbar{height:44px;padding-top:10px;padding-bottom:4px}
.today-dashboard>header,
.intro.primary-page-header:has(+.pantry-add){--header-mascot-width:clamp(160px,42.75vw,176px);--header-mascot-x:0px;--header-mascot-y:0px;--header-mascot-mask:none;min-height:130px;height:auto;padding:0 0 12px;overflow:visible;clip-path:none;margin-bottom:0}
.today-dashboard>header>.mascot,
.intro.primary-page-header:has(+.pantry-add)>img.mascot{width:var(--header-mascot-width);height:var(--header-mascot-width);right:0;bottom:0;object-fit:contain;object-position:center;max-height:none;opacity:1;mask-image:none;-webkit-mask-image:none;pointer-events:none}
.today-dashboard>header h1,
.intro.primary-page-header:has(+.pantry-add) h1{max-width:calc(100% - 176px);margin:0 0 4px;font-size:26px;line-height:1.2}
.today-dashboard>header p,
.intro.primary-page-header:has(+.pantry-add) p{max-width:calc(100% - 176px);margin:0;font-size:12px;line-height:1.4}
html:lang(en) .today-dashboard>header h1,
html:lang(en) .intro.primary-page-header:has(+.pantry-add) h1{font-size:22px}
html:lang(en) .today-dashboard>header p,
html:lang(en) .intro.primary-page-header:has(+.pantry-add) p{font-size:11px;line-height:1.4}
.today-dashboard>header{padding-bottom:54px}
.today-dashboard>.today-household{position:relative;z-index:2;justify-content:flex-start;min-height:44px;margin-top:-48px;margin-bottom:8px;max-width:calc(100% - 176px)}
.today-dashboard>.today-household .today-header-kid{padding:0;gap:5px;font-size:11px;white-space:nowrap}
.today-dashboard>.today-household #child{flex-shrink:0}
/* Today mascot stays alongside the text, with a dedicated clear gap. */
.today-dashboard>header{--header-mascot-width:clamp(160px,42.75vw,176px);min-height:130px;height:auto;padding:0 0 54px;overflow:visible}
.today-dashboard>header>.mascot{right:0;top:0;bottom:auto;width:var(--header-mascot-width);height:var(--header-mascot-width);object-fit:contain;clip-path:none}
.today-dashboard>.today-household{margin-top:-48px;margin-bottom:8px}

/* Compact Inspiration list navigation; no result or card changes. */
:is(.inspiration-page,.all-dishes-page) .inspiration-expansion{align-items:center;gap:8px;flex-wrap:wrap}
:is(.inspiration-page,.all-dishes-page) .inspiration-collapse{min-height:44px;padding:8px 10px;background:transparent;color:var(--muted);font-size:13px;border-radius:var(--radius-pill)}
:is(.inspiration-page,.all-dishes-page) #inspiration-top{position:fixed;z-index:6;right:max(12px,calc((100vw - 410px)/2 + 12px));bottom:calc(78px + env(safe-area-inset-bottom,0px));min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:var(--radius-pill);background:#ebc88ff5;color:var(--brown);font-size:12px;box-shadow:0 2px 8px #4930250c}
:is(.inspiration-page,.all-dishes-page) #inspiration-top[hidden]{display:none}
.today-dashboard .today-batch-navigation{display:flex;align-items:center;gap:4px;flex-shrink:0}
.today-dashboard .today-batch-navigation button,.today-dashboard .today-batch-end{min-height:36px;display:inline-flex;align-items:center;justify-content:center;padding:5px 6px;min-width:64px;border-radius:var(--radius-pill);font-size:11px;white-space:nowrap;background:#f7e9cf;color:#79502b}
.today-dashboard .today-batch-navigation button:disabled{background:transparent;color:var(--muted);opacity:.5;cursor:default}
.today-dashboard .today-batch-number{font-size:10px;color:var(--muted);white-space:nowrap;min-width:34px;text-align:center}
.today-dashboard .today-batch-end{background:transparent;color:var(--muted)}
html:lang(en) .today-dashboard .today-batch-navigation button,html:lang(en) .today-dashboard .today-batch-end{min-width:76px;padding-inline:4px}
html:lang(en) .today-dashboard .today-batch-number{min-width:16px}
.today-dashboard #today-undo-notice:empty{display:none}
.today-dashboard #today-undo-notice{font-size:12px;color:var(--muted);margin:0 0 8px}
.today-dashboard #today-undo-notice>span{display:block}
.today-dashboard #today-undo-notice button{background:transparent;color:var(--brown);text-decoration:underline;min-height:36px;padding:4px 8px}
/* Today: enlarge the full illustration without the former square letterbox. */
.today-dashboard>header{--header-mascot-width:clamp(195.2px,52.155vw,214.72px)}
.today-dashboard>header>.mascot{right:-16px;top:-18px;bottom:auto;width:var(--header-mascot-width);height:auto;aspect-ratio:auto;object-fit:contain;max-height:none;overflow:visible;clip-path:none}
.today-dashboard .section-heading:has(.today-batch-navigation){align-items:center;gap:6px}
.today-dashboard .section-heading:has(.today-batch-navigation) h2{white-space:nowrap}
.today-dashboard .today-batch-navigation{margin-left:auto;gap:3px}
.today-dashboard .today-batch-navigation button,.today-dashboard .today-batch-end{min-height:32px;min-width:60px;padding:4px 5px;font-size:11px}
html:lang(en) .today-dashboard .today-batch-navigation button,html:lang(en) .today-dashboard .today-batch-end{min-width:72px;padding-inline:4px}

/* Mobile reading scale: retain existing image, control, and grid geometry. */
nav a,
.staple-count,
.today-dashboard .today-batch-number,
.parallel-card-copy>small{font-size:12px}

.meta,
.available,
.dish-tags span,
.prototype-note,
.today-dashboard .today-batch-navigation button,
.today-dashboard .today-batch-end,
.inspiration-page .inspiration-card .available,
.inspiration-page .inspiration-card-meta,
.inspiration-page .inspiration-card .dish-cooking-line,
.inspiration-page .inspiration-card .prototype-note,
.inspiration-page .inspiration-card .dish-tag[class*="tag-"]{font-size:var(--font-size-xs)}

.intro.primary-page-header p,
.today-dashboard>header p,
.intro.primary-page-header:has(+.pantry-add) p,
html:lang(en) .today-dashboard>header p,
html:lang(en) .intro.primary-page-header:has(+.pantry-add) p,
.inspiration-page>.intro.primary-page-header p,
html:lang(zh) .inspiration-page>.intro.primary-page-header p,
html:lang(en) .inspiration-page>.intro.primary-page-header p,
.today-dashboard>.today-household .today-header-kid,
.today-dashboard .today-use-soon-heading>.today-use-soon-more,
#app:has(>.pantry-add) .quick-add-chips button,
#app:has(>.pantry-add) .quick-add-heading button,
#app:has(>.pantry-add) #edit-pantry,
#app:has(>.pantry-add) #select-all-pantry,
:is(.inspiration-page,.all-dishes-page) .inspiration-expand,
:is(.inspiration-page,.all-dishes-page) .inspiration-collapse,
:is(.inspiration-page,.all-dishes-page) #inspiration-top,
.today-dashboard #today-undo-notice{font-size:var(--font-size-sm)}

.search input,
.pantry-add input,
.pantry-add textarea,
.pantry-add select,
.setting-add input,
#pantry-alias-dialog input,
#pantry-alias-dialog select,
.cooking-equipment select,
.dish-ingredient-chips span,
.dish-detail .dish-detail-description{font-size:var(--font-size-body)}

.dish-ingredient-chips small{font-size:var(--font-size-xs)}
/* Larger labels need a second line only when the Today heading row cannot fit. */
.today-dashboard .section-heading:has(.today-batch-navigation){flex-wrap:wrap}

/* The enlarged Chinese subtitle reaches the formerly fixed CTA position. */
html:lang(zh) .inspiration-page>.primary-page-header>.all-dishes-entry{top:82px}

/* Four-column labels remain compact; show complete names instead of truncating them. */
.all-dishes-card h3,
.meal-history-dish h3{font-size:12px;-webkit-line-clamp:unset}
/* English heroes keep title and supporting copy together beside the artwork. */
html:lang(en) .today-dashboard>header,
html:lang(en) .intro.primary-page-header:has(+.pantry-add){display:block;height:auto}
html:lang(en) .today-dashboard>header p{max-width:180px;text-wrap:balance}
html:lang(en) .today-dashboard>header>.mascot{
  width:calc(var(--header-mascot-width) * .9);right:-16px;top:-18px;
}
html:lang(en) .intro.primary-page-header:has(+.pantry-add) p{max-width:205px;text-wrap:pretty}
html:lang(en) .intro.primary-page-header:has(+.pantry-add)>img.mascot{
  width:calc(var(--header-mascot-width) * 0.817);
  height:calc(var(--header-mascot-width) * 0.817);
  right:-10px;top:-24px;bottom:auto;
}
html:lang(en) .intro.primary-page-header:has(+.my-meals-tabs) p{
  max-width:min(100%,240px);
}
html:lang(en) .intro.primary-page-header:has(+.my-meals-tabs)>img.mascot{
  right:calc(var(--header-mascot-x) - 16px);
}

/* Keep the English Today title in two balanced lines on wider phones too. */
html:lang(en) .today-dashboard>header h1{max-width:min(100%,160px)}
/* Shared primary-header wrapping avoids short trailing lines. */
.today-dashboard>header h1,
.intro.primary-page-header h1{text-wrap:balance}
.today-dashboard>header p,
.intro.primary-page-header p{text-wrap:pretty}
/* Keep only asymmetric narrow-card English actions compact. */
html:lang(en) .today-dashboard .today-bento :is(.bento-2,.bento-3,.bento-4) .today-meal-pill{
  padding-inline:4px;font-size:12px;
}
.meal-confirmation{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
.meal-confirmation strong,.meal-confirmation>span{flex-basis:100%}
.meal-confirmation>span{font-size:var(--font-size-sm)}
.today-dashboard #today-undo-notice:not(:empty){
  position:fixed;z-index:10;bottom:calc(84px + env(safe-area-inset-bottom));
  left:50%;transform:translateX(-50%);width:calc(100% - 32px);max-width:378px;
  max-height:35vh;overflow:auto;margin:0;padding:12px 14px;
  background:#ffdfad;border:1px solid #e9b96e;border-radius:var(--radius-card);color:var(--brown);
  box-shadow:var(--shadow-card);font-size:var(--font-size-sm);
}
.today-dashboard #today-undo-notice>.meal-confirmation{display:flex}
.parallel-meal-action .meal-confirmation{flex-basis:100%;padding:8px 0}

.today-dashboard #today-undo-notice .meal-confirmation>span{color:#68452f}
.today-dashboard #today-undo-notice button{color:#87420f}

/* Allow three lines for English dish names across Today Bento layouts. */
html:lang(en) .today-dashboard .today-bento h3{-webkit-line-clamp:3}

/* Keep the existing library controls in normal flow while pinning on scroll. */
.all-dishes-toolbar{position:sticky;top:0;z-index:5;background:var(--cream);box-shadow:0 2px 4px #4930250c}

/* Staples helper only: allow natural wrapping without truncation. */
.kitchen-setting-row p.staples-helper,.settings-dialog p.staples-helper{font-size:12px;line-height:1.5;font-weight:400;color:var(--muted);margin:6px 0 8px;white-space:normal;overflow:visible;text-overflow:clip}

/* Today Staples CTA: match the rounded secondary button treatment. */
.today-dashboard [data-check-staples]{display:inline-flex;align-items:center;justify-content:center;min-height:var(--touch-target);max-width:100%;padding:9px 16px;margin-top:4px;border:1px solid #efc99d;border-radius:16px;background:#ffe4c4;color:var(--brown);font-size:var(--font-size-sm);font-weight:600;line-height:1.4;text-decoration:none}
.today-dashboard [data-check-staples]:hover{background:#ffdab0}
.today-dashboard [data-check-staples]:active{background:#ffd09b}

/* Today control labels: compact label/switch row with a full-width helper. */
.today-dashboard>.today-household{max-width:100%;margin-top:-40px}
.today-dashboard>.today-household .today-header-kid{display:grid;grid-template-columns:max-content auto;justify-content:start;white-space:normal;gap:3px 8px;max-width:100%;min-height:0}
.today-kid-copy{display:contents}
.today-kid-copy>span{grid-column:1;grid-row:1;display:block;color:#a66b35;font-size:12px;font-weight:600;line-height:1.3}
.today-dashboard>.today-household #child{grid-column:2;grid-row:1;justify-self:start}
.today-kid-copy>small{grid-column:1/-1;grid-row:2;display:block;margin:0;font-size:11px;font-weight:400;line-height:1.35;color:#95816d;white-space:normal;overflow:visible;text-overflow:clip}
/* English only: lift the setting slightly into the space below the cat. */
html:lang(en) .today-dashboard>.today-household{margin-top:-46px}

/* English setting uses the full hero width as a single compact row. */
html:lang(en) .today-dashboard>.today-household{min-height:25px}
html:lang(en) .today-dashboard>.today-household .today-header-kid{display:flex;gap:3px;min-height:25px;width:100%}
html:lang(en) .today-kid-copy>span{white-space:nowrap;flex-shrink:0}
html:lang(en) .today-kid-copy>small{white-space:nowrap;font-size:10px;flex-shrink:0}
html:lang(en) .today-dashboard>.today-household #child{margin-left:auto}

/* Compact History management keeps the normal four-column grid. */
.history-management{display:flex;justify-content:flex-end;align-items:center;gap:8px;min-height:36px;margin:4px 0 8px}
.history-management button{min-height:36px;padding:6px 10px;border-radius:12px;background:var(--yellow);color:var(--brown);font:inherit;font-size:12px;white-space:normal}
.history-managed-dish{position:relative;min-width:0}
.history-delete-control{position:absolute;top:0;right:0;width:32px;height:32px;padding:2px;border:0;background:transparent;display:grid;place-items:center;color:var(--brown);cursor:pointer;z-index:1}
.history-delete-control span{display:grid;place-items:center;width:24px;height:24px;border:1px solid #dfc8a5;border-radius:50%;background:#fff4df;font-size:20px;line-height:1;box-shadow:0 1px 3px #49302520}
#history-delete-dialog{max-width:calc(100vw - 32px)}

/* First-use card stays outside the Today hero and recommendation state. */
.first-use-guidance{position:relative;margin:12px 0 16px;padding:14px;background:#fff1d9;border:1px solid #efdbb6;border-radius:15px}
.today-dashboard .first-use-guidance h2{font-size:15px;line-height:1.4;margin:0 28px 7px 0}
.first-use-guidance p{font-size:12px;line-height:1.6;color:#806b59;margin:0 0 10px}
.first-use-close{position:absolute;right:5px;top:5px;width:32px;height:32px;border-radius:50%;background:transparent;color:#806b59;font-size:21px}
.first-use-actions{display:flex;flex-wrap:wrap;gap:8px}
.today-dashboard .first-use-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;max-width:100%;margin:0;padding:7px 10px;border:1px solid #ebcda4;border-radius:12px;background:#ffe4c4;color:var(--brown);font-size:12px;font-weight:600;line-height:1.4;text-decoration:none}
.first-use-error{display:block;font-size:12px;color:var(--muted)}

.first-use-more{margin-top:6px;color:#806b59;font-size:12px;line-height:1.6}
.first-use-more summary{display:list-item;list-style:none;cursor:pointer;padding:7px 0;min-height:36px;color:#94704b}
.first-use-more summary::-webkit-details-marker{display:none}
.first-use-more summary:focus-visible{outline:2px solid #c98740;outline-offset:2px;border-radius:4px}
.first-use-more ul{list-style:none;padding:0;margin:2px 0 0}
.first-use-more li{margin:0 0 7px;overflow-wrap:anywhere}
.first-use-more li:last-child{margin-bottom:0}
.first-use-more strong{font-weight:600;color:var(--brown)}
