/* Larger type uses the original sizes plus increments from config.js.
   This file adjusts available space, not the requested type scale. */
.nav-link, .profile-text, .food-name, .product-identity > span:last-child { min-width: 0; }
.hero-meta span { white-space: nowrap; }
.recipe-hero .hero-meta { max-width: 48%; flex-wrap: wrap; row-gap: 7px; }
.scan-option { min-width: 0; }
.scan-option strong, .scan-option small { overflow-wrap: break-word; }
.section-heading { flex-wrap: wrap; row-gap: 9px; }
.section-heading h2 { flex-wrap: wrap; }
.summary-item { align-items: flex-start; }
.summary-item strong { display: inline-block; }
.summary-item strong small { display: inline-block; }
.summary-item p { line-height: 1.5; }
.overview-summary { column-gap: 18px; }
.table-head > span { min-width: 0; overflow-wrap: anywhere; }
.toolbar .filters { flex-wrap: wrap; }
.form-grid { align-items: end; }
.dialog-actions { flex-wrap: wrap; }
.scan-result-field { display: block; min-width: 0; }
.scan-result-field-label { display: none; }
.scan-result input { min-width: 0; height: 40px; }
.app-footer { flex-wrap: wrap; }
.app-footer > span { line-height: 1.6; }
.recipe-card h2 { min-height: 2.7em; }
.recipe-card > p { min-height: 3.6em; }
.recipe-card .hero-meta { flex-wrap: wrap; row-gap: 6px; }
.suggestion { min-width: 0; }
.chat-compose textarea { min-height: 32px; }
.stat-card strong { white-space: nowrap; }
.chart-header { flex-wrap: wrap; gap: 12px; }
.bars-wrap { padding-bottom: 42px; }
.chart-axis { padding-bottom: 42px; }
.bar-label { bottom: -38px; line-height: 1.25; }
.inventory-foot { flex-wrap: wrap; row-gap: 8px; }
.stats-insight, .recipe-insight { flex-wrap: wrap; }

@media (min-width: 1051px) {
  .nav-link { gap: 10px; height: auto; min-height: 49px; padding: 12px; }
  .nav-link > span:not(.nav-count):not(.tiny-dot) {
    flex: 1;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
    line-height: 1.4;
  }
  .nav-link > :is(.icon, .nav-count, .tiny-dot) { flex-shrink: 0; }
  .sidebar :is(.workspace-label, .sidebar-note, .profile-text) { overflow-wrap: anywhere; }
}

@media (min-width: 1051px) and (max-width: 1250px) {
  .sidebar { width: 260px; }
  .nav-link { gap: 10px; padding-inline: 12px; }
}
@media (max-width: 1000px) {
  .toolbar .filters { order: 3; width: 100%; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .add-card { display: block; }
  .add-card h2 { max-width: none; }
  .add-card > p { max-width: none; }
  .scan-options { margin-top: 22px; }
  .manual-add { margin-top: 18px; }
  .lower-grid { grid-template-columns: minmax(0, 1fr); }
  .table-head { grid-template-columns: 1fr auto; }
  .table-head span:nth-child(2), .table-head span:nth-child(3), .table-head span:last-child { display: none; }
  .product-row { grid-template-columns: minmax(0, 1fr) auto 14px; gap: 12px; }
  .product-row > .cell-muted { display: none; }
  .product-identity .product-location { display: none; }
  .product-identity .product-mobile-meta { display: block!important; }
  .product-expiry { align-items: flex-end; }
  .inventory-cards .product-expiry { align-items: flex-start; }
  .overview-summary { gap: 12px; }
  .summary-item + .summary-item { padding-left: 12px; }
}
@media (max-width: 600px) {
  body { min-width: 320px; }
  .topbar-actions { gap: 5px; }
  .topbar .demo-badge { max-width: 64px; text-align: center; line-height: 1.15; }
  .breadcrumb { letter-spacing: .5px; }
  .sidebar { height: 94px; padding: 0 3px 12px; }
  .workspace { padding-bottom: 94px; }
  .nav-link { height: 74px; padding: 8px 0; gap: 5px; justify-content: flex-start; border-width: 0; }
  .nav-link > span:not(.nav-count):not(.tiny-dot) { white-space: normal; line-height: 1.15; letter-spacing: -.3px; text-align: center; }
  .navigation { gap: 0; align-items: center; }
  .recipe-hero { min-height: 0; }
  .recipe-hero .hero-copy { max-width: none; }
  .recipe-hero .hero-meta { max-width: none; }
  .recipe-hero .hero-cta { margin-top: 20px; }
  .hero-art { position: relative; width: 100%; height: 205px; right: auto; bottom: auto; top: auto; margin-top: 24px; }
  .hero-art img { width: auto; max-width: 100%; height: 100%; object-fit: contain; }
  .hero-food-label { right: 2px; bottom: 4px; max-width: 100%; }
  .hero-orbit { width: 180px; height: 180px; }
  .recipe-grid { grid-template-columns: minmax(0, 1fr); }
  .recipe-card h2, .recipe-card > p { min-height: 0; }
  .toolbar .filters { flex-wrap: nowrap; }
  .filter { flex-shrink: 0; }
  .food-name strong, .product-identity strong { overflow-wrap: break-word; }
  .food-icon { flex-shrink: 0; }
  .urgent-item { gap: 10px; }
  .urgent-item > .icon { display: none; }
  .expiry { white-space: nowrap; }
  .stat-cards { gap: 7px; }
  .stat-card { padding-inline: 9px; }
  .stat-card-head { white-space: normal; }
  .bar-label { white-space: normal; text-align: center; }
  .bars-wrap { gap: 5px; }
  .chart-legend { margin-left: 0; }
  .suggestion br { display: none; }
  .chat-disclaimer { line-height: 1.6; }
  .assistant-thread-header { align-items: flex-start; gap: 10px; }
  .assistant-thread-header .button { white-space: normal; }
  .dialog-header { padding-right: 24px; }
  .dialog-actions .button { white-space: normal; }
  .scan-result-head { display: none; }
  .scan-result:not(.scan-result-head) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px; padding: 15px; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--block-radius, 10px); }
  .scan-result-field-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: calc(9px + var(--font-small-increase, 4px)); line-height: 1.4; }
  .scan-result input { height: 40px; padding: 8px; }
  .scan-result input[type="date"] { min-width: 0; }
  .scan-result-label { flex-wrap: wrap; gap: 8px; }
  .toast { bottom: 108px; }
}

/* One shared header for the editable scan table, including narrow screens. */
.scan-table { overflow-x: auto; }
.scan-table .scan-result { min-width: 880px; grid-template-columns: minmax(180px, 1.65fr) minmax(100px, .7fr) minmax(125px, .85fr) minmax(155px, 1fr) minmax(165px, 1.1fr); }
.scan-table .scan-shelf-life { display: flex; align-items: center; gap: 6px; }
.scan-shelf-life input { flex: 1; width: 0; }
.scan-shelf-life small { flex-shrink: 0; color: var(--muted); }
.scan-result select { width: 100%; min-width: 0; height: 35px; padding: 5px 8px; border: 1px solid #bdd8e821; border-radius: 7px; background: #101b2b33; color: #c3d6df; color-scheme: dark; font-size: calc(10px + var(--font-small-increase, 4px)); }
:root[data-theme="light"] .scan-result select { background: #fff9; border-color: #6d9b8a5e; color: var(--text); color-scheme: light; }
.scan-result-head { text-transform: uppercase; }
.dialog.scan-result-dialog { width: min(1120px, calc(100vw - 32px)); max-width: 1120px; }
@media (max-width: 600px) {
  .scan-table .scan-result { display: grid; gap: 8px; margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
  .scan-table .scan-result-head { border: 0; padding-top: 0; padding: 6px 6px;}
}

/* Active receipt/product recognition keeps the selected photo visible. */
.upload-zone.is-scanning { cursor: progress; border-style: solid; border-color: var(--mint); }
.upload-zone.is-scanning > strong, .upload-zone.is-scanning > span { visibility: hidden; }
.upload-zone.is-scanning .upload-preview { opacity: .5; }
.scan-progress { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; background: linear-gradient(180deg, #101b2b55, #101b2bcc); color: #e3f8ee; }
.scan-progress small { color: #c1d9cf; line-height: 1.5; }
.upload-zone .scan-spinner { width: 34px; height: 34px; margin: 0; border: 2px solid #c6f5dd40; border-top-color: #c6f5dd; border-radius: 50%; animation: scan-spin .9s linear infinite; }
.upload-zone.is-scanning::before,
.upload-zone.is-scanning::after { content: ''; position: absolute; z-index: 3; pointer-events: none; left: 5%; right: 5%; top: 10%; animation: scan-sweep 4.8s ease-in-out infinite; }
.upload-zone.is-scanning::before { height: 80px; margin-top: -76px; opacity: 1; background: linear-gradient(180deg, #b4f5de00, #b4f5de14 35%, #b4f5de38 75%, #b4f5de70); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); animation: scan-sweep 4.8s ease-in-out infinite, scan-trail-above 4.8s linear infinite; }
.upload-zone.is-scanning::after { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #b4f5de99, #b4f5de 12%, #eefff9 50%, #b4f5de 88%, #b4f5de99); box-shadow: 0 0 10px #b4f5de, 0 0 19.6px #b4f5de, 0 0 39.2px #b4f5deaa; }
.upload-zone.is-scanning .scan-progress::before { content: ''; position: absolute; top: 10%; z-index: 1; left: 5%; right: 5%; height: 80px; opacity: 0; pointer-events: none; background: linear-gradient(180deg, #b4f5de70, #b4f5de38 25%, #b4f5de14 65%, #b4f5de00); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); animation: scan-sweep 4.8s ease-in-out infinite, scan-trail-below 4.8s linear infinite; }
@keyframes scan-spin { to { transform: rotate(360deg); } }
@keyframes scan-sweep { 0%, 100% { top: 10%; } 50% { top: 88%; } }
/* Crossfade over 480ms around each turn; never flip the visible gradient. */
@keyframes scan-trail-above { 0%, 50%, 100% { opacity: .5; } 5%, 45% { opacity: 1; } 55%, 95% { opacity: 0; } }
@keyframes scan-trail-below { 0%, 50%, 100% { opacity: .5; } 5%, 45% { opacity: 0; } 55%, 95% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .upload-zone .scan-spinner, .upload-zone.is-scanning::before, .upload-zone.is-scanning::after, .upload-zone.is-scanning .scan-progress::before { animation: none; }
}
.reduced-motion .upload-zone .scan-spinner, .reduced-motion .upload-zone.is-scanning::before, .reduced-motion .upload-zone.is-scanning::after, .reduced-motion .upload-zone.is-scanning .scan-progress::before { animation: none; }

/* Fit the whole selected photo against the nearest edge, without cropping. */
.upload-zone.has-preview { height: clamp(240px, 48dvh, 560px); min-height: 0; padding: 6px; }
.upload-zone.has-preview .upload-preview { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); max-width: none; max-height: none; margin: 0; object-fit: contain; }
.upload-zone.has-preview > strong, .upload-zone.has-preview > span { display: none; }

/* Only recognition rows scroll; the dialog heading and actions stay visible. */
.scan-result-dialog { display: flex; flex-direction: column; overflow: hidden; }
.scan-result-dialog > .dialog-header { flex-shrink: 0; }
.scan-result-dialog #scan-result-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.scan-result-dialog #scan-result-form > :not(.scan-table) { flex-shrink: 0; }
.scan-result-dialog .scan-table { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-x: auto; overflow-y: hidden; }
.scan-table-inner { display: flex; flex-direction: column; flex: 1; min-width: 880px; min-height: 0; }
.scan-table-inner > .scan-result-head { flex-shrink: 0; padding-right: 8px; font-weight: 700;}
.scan-products { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
.scan-products::-webkit-scrollbar { width: 8px; }
.scan-result-dialog .form-error:empty { margin: 0; }

@media (max-height: 600px) {
  .scan-result-dialog { padding: 20px; }
  .scan-result-dialog > .dialog-header { margin-bottom: 12px; }
  .scan-result-dialog .dialog-header p { margin-top: 6px; line-height: 1.35; }
  .scan-result-dialog .scan-result-label { margin-bottom: 8px; }
  .scan-result-dialog .dialog-info { margin-top: 8px; line-height: 1.35; }
  .scan-result-dialog .result-total { margin-top: 8px; }
  .scan-result-dialog .dialog-actions { margin-top: 12px; padding-top: 12px; }
}

/* Product names are edited in place without opening a dialog. */
.product-row { cursor: default; }
.product-name-button { display: block; max-width: 100%; padding: 0; background: transparent; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; }
.product-name-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.product-name-editor { display: block; width: 100%; min-width: 0; padding: 5px 8px; border: 1px solid var(--mint); border-radius: 7px; background: var(--glass); color: var(--text); font: inherit; }
.product-open { display: grid; place-items: center; width: 22px; height: 28px; padding: 0; background: transparent; color: var(--muted); }
.product-open .icon { width: 13px; height: 13px; }

.product-location-button, .product-value-button, .product-expiry-button { max-width: 100%; padding: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.product-location-button:hover, .product-value-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-identity .product-location { display: block; }
.product-inline-control { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.product-field-editor { width: 100%; min-width: 0; padding: 5px 7px; border: 1px solid var(--mint); border-radius: 7px; color: var(--text); background: var(--bg); font: inherit; }
.product-field-editor[type="number"] { width: 80px; }
.product-inline-control > span { flex-shrink: 0; font-size: .85em; }

/* Cards have their own layout instead of wrapping the table columns. */
.inventory-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.inventory-cards .product-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(58px, 1fr) auto auto; grid-template-areas: "identity identity" "quantity price" "expiry expiry"; position: relative; min-width: 0; gap: 14px; }
.inventory-cards .product-identity { grid-area: identity; width: auto; padding-right: 28px; align-items: flex-start; }
.inventory-cards .product-open { position: absolute; top: 16px; right: 14px; }
.inventory-cards .inventory-quantity { grid-area: quantity; }
.inventory-cards .inventory-price { grid-area: price; justify-self: end; text-align: right; }
.inventory-cards .product-row > .cell-muted { display: block; min-width: 0; }
.inventory-cards .product-identity .product-mobile-meta { display: none!important; }
.inventory-cards .product-expiry { grid-area: expiry; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.inventory-cards .product-expiry > small { margin: 0; white-space: nowrap; text-align: right; }
.inventory-cards .inventory-price .product-inline-control { width: 120px; max-width: 100%; }
@media (max-width: 1200px) {
  .inventory-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .inventory-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Food pictograms use one visual language across cards, lists and dialogs. */
.food-icon.food-icon-vector { color: var(--mint); }
.food-icon-vector svg { display: block; width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.food-icon-illustrated svg { width: 84%; height: 84%; fill: none; stroke: none; stroke-width: 1.25; }


/* Keep recipe artwork inside its own row, including large intrinsic PNGs. */
.recipe-detail-hero {
  height: 220px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  contain: layout paint;
  margin: 0 0 16px;
}
.recipe-detail-hero > img {
  display: block;
  width: 100%;
  height: 220px;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.recipe-ingredient-plate {
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: min(250px, 90%);
  height: 178px;
  padding: 24px 28px;
  border-radius: 50%;
  border: 8px solid #b6d0c544;
  background: radial-gradient(ellipse, #d3eddf44, #7d9d8d22);
  box-shadow: inset 0 0 0 2px #cde6d744, 0 12px 22px #132d261a;
  position: relative;
  box-sizing: border-box;
}
.recipe-ingredient-plate .food-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.recipe-ingredient-plate .food-icon svg { width: 100%; height: 100%; }
.recipe-photo-slot { width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-width:0; }
.recipe-photo-slot > .recipe-ingredient-plate { flex-shrink:1; min-height:90px; }
.recipe-photo-ellipse { width:min(250px,90%); height:178px; border-radius:50%; overflow:hidden; border:8px solid #b6d0c544; box-shadow:inset 0 0 0 2px #cde6d744,0 12px 22px #132d261a; background:#91ae9c22; flex-shrink:0; position:relative; }
.recipe-image .recipe-photo-ellipse img,.recipe-detail-hero .recipe-photo-ellipse img { display:block; position:static; width:100%; height:100%; object-fit:cover; border-radius:50%; transform:none; filter:none; transition:transform .65s cubic-bezier(.22,1,.36,1); }
.recipe-photo-slot > .recipe-photo-ellipse { height:min(178px,calc(100% - 28px)); }
.recipe-photo-credit,.recipe-photo-caption { font-size:11px; line-height:1.4; color:var(--muted); max-width:90%; text-align:center; }
a.recipe-photo-credit { text-decoration:underline; text-underline-offset:3px; }
a.recipe-photo-credit:hover { color:var(--text); }
.recipe-photo-retry { padding:2px 8px; color:var(--mint); background:transparent; text-decoration:underline; font-size:11px; }
.recipe-photo-retry:focus-visible,.recipe-photo-credit:focus-visible { outline:2px solid var(--mint); outline-offset:3px; }
.recipe-page-actions { display:flex; gap:10px; flex-wrap:wrap; }
.dish-catalog-list { display:grid; gap:14px; margin-top:20px; }
.dish-catalog-item { display:flex; align-items:center; gap:18px; border:1px solid var(--border); border-radius:16px; padding:14px; }
.dish-catalog-item img { width:110px; height:80px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.dish-catalog-item h3 { font-size:17px; overflow-wrap:anywhere; }
.dish-catalog-item p { color:var(--muted); font-size:12px; line-height:1.7; margin:7px 0; overflow-wrap:anywhere; }
.dish-catalog-item a { color:var(--mint); font-size:12px; text-decoration:underline; }
@media(max-width:600px) { .dish-catalog-item { gap:12px; padding:12px; } .dish-catalog-item img { width:80px; height:60px; } }
.recipe-card h2, .dialog-header h2 { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .recipe-detail-hero, .recipe-detail-hero > img { height: 190px; }
}

/* Recipe courses, stock availability and optional individual servings. */
.recipe-course { margin: 32px 0 40px; }
.recipe-course > .section-heading { margin-bottom: 18px; align-items: center; }
.recipe-course > .section-heading h2 { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 500; }
.recipe-availability { margin: 0 0 14px; font-weight: 600; }
.hero-label.recipe-available { color: #b9efce; border-color: #82cfa355; background: #548f6b24; }
.hero-label.recipe-shopping { color: #ffd497; border-color: #e4b05f70; background: #ba79252e; }
:root[data-theme="light"] .hero-label.recipe-available { color: #2c6345; border-color: #83b99b77; background: #d7efdf99; }
:root[data-theme="light"] .hero-label.recipe-shopping { color: #80500d; border-color: #c28b3b99; background: #fff0cfcc; }
.recipe-side-servings { margin: 18px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #a5c7b509; }
.recipe-side-servings summary { cursor: pointer; font-weight: 500; font-size: 14px; }
.recipe-side-servings summary span { color: var(--muted); margin-left: 6px; }
.recipe-side-servings p { color: var(--muted); font-size: 13px; margin-top: 10px; line-height: 1.5; }
.recipe-side-servings ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; max-height: 230px; overflow-y: auto; }
.recipe-side-servings li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.recipe-side-servings small { display: block; color: var(--muted); margin-top: 3px; }
.recipe-side-servings .food-icon { width: 36px; height: 36px; flex: 0 0 36px; }
.recipe-outcomes { display: grid; gap: 0; margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #c5e0d508; }
.recipe-outcome { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,230px); gap: 16px; align-items: center; border: 0; border-radius: 0; padding: 6px 6px 6px 10px; background: transparent; }
.recipe-outcome + .recipe-outcome { border-top: 1px solid var(--border); }
.recipe-outcome > span { min-width: 0; overflow-wrap: anywhere; }
.recipe-outcome strong { font-size: 15px; font-weight: 500; line-height: 1.45; }
.recipe-outcome-name { display: flex; align-items: center; gap: 12px; }
.recipe-outcome-name .food-icon { width: 36px; height: 36px; flex: 0 0 36px; }
.recipe-outcome small { display: block; color: var(--muted); margin-top: 5px; font-size: 13px; }
.recipe-outcome select { width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg, #152535); color: var(--text); font: inherit; font-size: 14px; }
:root[data-theme="light"] .recipe-outcome select { background: #f4faf7; color: #29443a; }
.recipe-outcome select:focus-visible, .recipe-side-servings summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
@media (max-width:600px) {
  .recipe-outcome { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .recipe-course > .section-heading h2 { font-size: 21px; }
}

/* Scroll the recipe content inside a stationary glass frame. */
.dialog.dialog-scroll-shell {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  outline: none;
}
.dialog-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  padding: 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #8caaa780 transparent;
}
.dialog-scroll-shell > .dialog-close { z-index: 7; top: 16px; right: 16px; }
.dialog-scroll-body > .dialog-header { padding-right: 28px; }
.dialog-scroll-shell > .dialog-actions {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  padding: 18px 30px;
  border-radius: 0;
  border-top: 1px solid var(--glass-rim);
  background: linear-gradient(120deg, #d5edff0b, #bed6f504);
  box-shadow: inset 0 1px 0 #ffffff0d;
}
.dialog-scroll-shell > .dialog-actions .button { min-height: 44px; }
:root[data-theme="light"] .dialog-scroll-shell > .dialog-actions {
  background: linear-gradient(120deg, #ffffff7a, #e6f1eb66);
  box-shadow: inset 0 1px 0 #ffffffc2;
}
@media (max-width: 600px) {
  .dialog-scroll-body { padding: 25px 22px; }
  .dialog-scroll-shell > .dialog-actions { padding: 16px 22px; gap: 10px; }
  .dialog-scroll-shell > .dialog-actions .button { flex: 1; min-width: 0; margin-left: 0; }
}

/* Consistent panels and separated rows for both ingredient status lists. */
.recipe-outcome-group { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; background: transparent; }
.recipe-outcome-group > h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 17px; font-weight: 550; letter-spacing: -.02em; }
.recipe-outcome-group > h3 > .icon { width: 19px; height: 19px; color: var(--mint); }
.recipe-outcome-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 8px; background: #a4c6b61c; color: var(--muted); font-size: 12px; font-weight: 500; margin-left: auto; }
.recipe-serving-outcomes { margin-top: 28px; }
.recipe-outcome:focus-within { background: #83b69d0d; }
.recipe-outcome select:has(option[value="used"]:checked) { color: #c7edd8; background-color: #3c705744; border-color: #89c4a04d; }
.recipe-outcome select option { background: var(--language-menu-bg); color: var(--language-menu-text); }
:root[data-theme="light"] .recipe-outcomes { border-color: #9bafa166; background: #ffffff55; }
:root[data-theme="light"] .recipe-outcome + .recipe-outcome { border-top-color: #9bafa166; }
.stat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


:root[data-theme="light"] .recipe-outcome-group > h3 > .icon { color: #47735e; }
:root[data-theme="light"] .recipe-outcome select:has(option[value="used"]:checked) { color: #2e6349; background-color: #e0f1e6; border-color: #88b19a88; }
@media (max-width:600px) {
  .recipe-outcome-group { padding: 0; }
  .recipe-outcome-group > h3 { font-size: 16px; gap: 8px; }
  .recipe-outcome { padding: 12px; }
  .recipe-outcomes { gap: 0; margin-top: 14px; }
}

/* Account exit remains available from every page. */
.profile-panel { max-width: 760px; padding: 28px; }
.profile-form { display: grid; gap: 20px; max-width: 440px; }
.profile-form .field { margin: 0; }
.profile-form .dialog-info { margin: 4px 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.profile-form .field > .button { align-self: flex-start; max-width: 100%; white-space: normal; }
.profile-form-actions { display: flex; padding-top: 4px; }
.profile-account { margin-top: 28px; }
.profile-account .setting-row { flex-wrap: wrap; }
.profile-account .button { max-width: 100%; white-space: normal; }
@media (max-width: 600px) {
  .profile-panel { padding: 20px; }
  .profile-form { max-width: 100%; }
  .profile-account .setting-row { gap: 12px; }
}
.logout-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;min-height:36px;padding:7px 10px;border:1px solid var(--border);border-radius:10px;background:var(--glass);color:var(--muted);font:inherit;font-size:13px;cursor:pointer}.logout-button .icon{width:18px;height:18px}.logout-button:hover{color:var(--text);border-color:var(--mint-strong)}.logout-button:focus-visible{outline:2px solid var(--mint-strong);outline-offset:3px}
@media(max-width:600px){.logout-button{min-width:30px;min-height:32px;padding:5px}.logout-button span{display:none}}
