/* Fuel on desktop (fuel-desk.js): the Plan board, the Log desk, the docked grocery list and the side panel.
   1024 px and up only: every rule sits in the desktop media query (print rules aside), so phone is unchanged.
   Theme tokens only (Pearl by day, Smoke by night from app.css); one image size per role, set here:
   --fdk-card-img (board cards), --fdk-thumb (list rows), --fdk-tile (Log it again), --fdk-panel-img (side panel). */
@media (min-width: 1024px) {
  /* The Fuel tabs use the wide desktop column, on every segment, so switching tabs never moves the segments. */
  html.fdk-desk body:not(.atlas-route) #app.app[data-route=fuel] > main#view:has(> .fv3-page) { max-width: min(1600px, 100% - 76px) !important; }
  .fv3 { --fdk-card-img: 56px; --fdk-thumb: 40px; --fdk-tile: 84px; --fdk-panel-img: 168px; }
  .fdk-host { grid-column: 1 / -1; min-width: 0; }
  .fdk-pill { min-height: 36px; white-space: nowrap; border-radius: 999px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; font: 11px var(--fv3-label) !important; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink) !important; cursor: pointer; }
  .fdk-pill.fdk-primary { background: var(--fv3-primary); border-color: transparent; color: var(--fv3-on) !important; }
  .fdk-pill[disabled] { opacity: .5; cursor: default; }
  .fdk-pill:focus-visible, .fdk-card:focus-visible, .fdk-cell:focus-visible, .fdk-gi:focus-visible, .fdk-gtab:focus-visible, .fdk-step button:focus-visible, .fdk-opt:focus-visible { outline: 3px solid var(--fv3-primary); outline-offset: 2px; }
  .fdk-kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--line); font: 11px var(--fv3-label); color: var(--ink-2); background: var(--glass); box-sizing: border-box; }
  .fdk-mono { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--sand) 70%, var(--paper)), var(--sand-soft)); }
  .fdk-mono { color: var(--sand-text); } .fdk-mono svg { display: block; opacity: .9; } /* a category icon, never a letter (r4b) */

  /* ---- Plan board ---- */
  .fdk-plan { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
  .fdk-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
  .fdk-top { display: flex; align-items: center; gap: 12px; min-height: 40px; }
  .fdk-sp { flex: 1; }
  .fdk-board { display: grid; grid-template-columns: 22px repeat(7, minmax(0, 1fr)); gap: 7px; }
  .fdk-rl { display: grid; place-items: center; }
  .fdk-rl span { writing-mode: vertical-rl; transform: rotate(180deg); font: 10px var(--fv3-label); letter-spacing: .14em; text-transform: uppercase; color: var(--sand-text); white-space: nowrap; }
  .fdk-dh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; column-gap: 6px; row-gap: 2px; min-height: 50px; border-radius: 12px; align-content: flex-start; }
  /* Fill this day: a quiet text action under the date; the same-height placeholder keeps every header level (no shift). */
  .fdk-dfill { flex: 0 0 100%; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; padding: 0; font: 9.5px var(--fv3-label) !important; letter-spacing: .1em; text-transform: uppercase; color: var(--sand-text) !important; cursor: pointer; border-radius: 8px; }
  button.fdk-dfill:hover { text-decoration: underline; text-underline-offset: 3px; }
  button.fdk-dfill:focus-visible { outline: 3px solid var(--fv3-primary); outline-offset: 1px; }
  button.fdk-dfill[disabled] { opacity: .6; cursor: default; text-decoration: none; }
  .fdk-dh b { font: 16px var(--fv3-display); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
  .fdk-dh span { font-size: 12.5px; color: var(--ink-3); }
  .fdk-dh.is-today b, .fdk-dh.is-today span { color: var(--sand-text); }
  .fdk-cell { position: relative; min-height: 118px; border-radius: 16px; display: flex; flex-direction: column; gap: 6px; outline-offset: 2px; }
  .fdk-cell.is-today { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fv3-primary) 45%, transparent); border-radius: 16px; }
  .fdk-card { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0 0 8px; border-radius: 16px; overflow: hidden; background: var(--glass); border: 1px solid var(--hair); box-shadow: var(--shadow-sm); cursor: grab; min-width: 0; color: var(--ink); }
  .fdk-card.is-locked { cursor: default; }
  .fdk-card.is-sel { box-shadow: 0 0 0 2px var(--fv3-primary), var(--shadow-sm); }
  .fdk-card.is-picked, .fdk-card.is-dragging { transform: rotate(-2deg) translateY(-4px); box-shadow: 0 16px 36px rgba(0, 0, 0, .28), 0 0 0 2px var(--fv3-primary); z-index: 2; }
  .fdk-cimg { display: block; width: 100%; height: var(--fdk-card-img); flex: 0 0 auto; overflow: hidden; background: var(--sand-soft); }
  .fdk-cimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
  :root[data-theme="night"] .fdk-cimg img, :root[data-theme="night"] .fdk-pimg img, :root[data-theme="night"] .fdk-rimg img { filter: brightness(.88); }
  .fdk-card b { font: 12.5px/1.22 var(--font-body, var(--f)); font-weight: 400; padding: 6px 9px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 31px; }
  .fdk-card > span:last-child { font: 10px var(--fv3-label); letter-spacing: .04em; color: var(--sand-text); padding: 3px 9px 0; }
  /* The drop hint is an overlay on the cell: it never changes the cell's size. */
  .fdk-drop { position: absolute; inset: 0; display: none; place-items: center; text-align: center; padding: 8px; border-radius: 16px; border: 1.5px dashed var(--fv3-primary); background: color-mix(in srgb, var(--sand-soft) 78%, transparent); font: 10.5px var(--fv3-label); letter-spacing: .08em; text-transform: uppercase; color: var(--sand-text); pointer-events: none; z-index: 1; }
  .fdk-cell.is-target .fdk-drop { display: grid; }
  /* An empty slot (r4b): quiet dashed; its "+" shows on hover and focus. It fills the cell, so nothing shifts. */
  .fdk-add { flex: 1 1 auto; min-height: 118px; width: 100%; display: grid; place-items: center; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--line) 80%, transparent); background: transparent; color: var(--sand-text); cursor: pointer; padding: 0; transition: border-color .15s, background-color .15s; }
  .fdk-add svg { opacity: 0; transition: opacity .15s; }
  .fdk-cell:hover .fdk-add, .fdk-add:focus-visible { border-color: var(--fv3-primary); background: color-mix(in srgb, var(--sand-soft) 40%, transparent); }
  .fdk-cell:hover .fdk-add svg, .fdk-add:focus-visible svg { opacity: 1; }
  .fdk-add:focus-visible { outline: 3px solid var(--fv3-primary); outline-offset: 2px; }
  .fdk-sum { border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--hair); padding: 8px 9px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .fdk-sum.is-today { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fv3-primary) 45%, transparent); }
  .fdk-k { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
  .fdk-k b { font: 18px var(--fv3-display); font-weight: 400; } .fdk-k span { font-size: 11px; color: var(--ink-3); }
  .fdk-sum .fv3-bar { gap: 2px; } .fdk-sum .fv3-bl { gap: 4px; } .fdk-sum .fv3-bl b { font-size: 9px; } .fdk-sum .fv3-bl span { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: clip; } .fdk-sum .fv3-bar i { height: 5px; }
  .fdk-sk { height: 640px; border-radius: 24px; }
  .fdk-panel { position: sticky; top: 12px; gap: 12px; padding: 0 18px 18px; background: var(--glass-strong); overflow: hidden; min-height: 200px; max-height: calc(100dvh - 120px); overflow-y: auto; }
  .fdk-panel:empty { visibility: hidden; } /* the column stays reserved: selecting a meal never shifts the board */
  .fdk-ph { position: relative; height: var(--fdk-panel-img); margin: 0 -18px; flex: 0 0 auto; }
  .fdk-pimg { display: block; width: 100%; height: 100%; overflow: hidden; } .fdk-pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .fdk-pimg.fdk-mono { background: linear-gradient(135deg, color-mix(in srgb, var(--sand) 55%, var(--paper)), var(--sand-soft)); }
  .fdk-pe { position: absolute; left: 18px; bottom: 8px; }
  .fdk-panel h3 { font-size: 24px !important; }
  .fdk-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .fdk-tiles:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
  .fdk-tiles div { border-radius: 14px; border: 1px solid var(--line); background: var(--glass); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
  .fdk-tiles b { font: 21px var(--fv3-display); font-weight: 400; } .fdk-tiles small { font: 11px var(--fv3-label); margin-left: 2px; color: var(--ink-3); }
  .fdk-tiles span { font: 9.5px var(--fv3-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
  .fdk-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .fdk-act .fdk-pill { min-height: 32px; padding: 0 12px; font-size: 10.5px !important; }
  .fdk-step { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
  .fdk-step button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); font: 16px var(--fv3-label); cursor: pointer; }
  .fdk-step button[disabled] { opacity: .35; cursor: default; }
  .fdk-step b { min-width: 30px; text-align: center; font: 13px var(--fv3-label); font-weight: 400; }
  /* Ingredients and Method (r4b): the panel's own glass card (rounded, even padding), bullets inside it; set firmly so a
     page-wide details style can never draw a square box with the bullets on its edge. */
  .fdk-panel details.fdk-fold { display: flex; flex-direction: column; gap: 8px; margin: 0 !important; padding: 12px 14px 14px !important; border-radius: 16px !important; border: 1px solid var(--hair) !important; background: var(--glass) !important; box-shadow: none !important; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .fdk-fold > summary { list-style: none; cursor: pointer; min-height: 24px; display: flex; align-items: center; padding: 0 !important; margin: 0; border: 0 !important; background: none !important; }
  .fdk-fold > summary::-webkit-details-marker { display: none; }
  .fdk-fold .rb-list, .fdk-fold .rb-steps { margin: 4px 0 0 !important; padding: 0 !important; list-style: none; gap: 8px; }
  .fdk-fold .rb-list li, .fdk-fold .rb-steps li { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; margin: 0; padding: 0; }
  .fdk-fold .rb-list li::before { margin-top: 7px; }
  .fdk-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px; border-radius: 14px; border: 1px solid var(--hair); background: var(--glass); cursor: pointer; margin-top: 6px; color: var(--ink); }
  .fdk-opt span { display: flex; flex-direction: column; min-width: 0; } .fdk-opt b { font: 14px var(--font-body, var(--f)); font-weight: 400; } .fdk-opt small { font-size: 12px; color: var(--ink-3); }
  .fdk-oimg { width: var(--fdk-thumb); height: var(--fdk-thumb); border-radius: 10px; overflow: hidden; flex: 0 0 auto; } .fdk-oimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .fdk-gtab { position: fixed; right: 0; top: 260px; z-index: 30; writing-mode: vertical-rl; border: 0; cursor: pointer; background: var(--fv3-primary); color: var(--fv3-on); font: 11px var(--fv3-label); letter-spacing: .14em; text-transform: uppercase; padding: 14px 8px; border-radius: 12px 0 0 12px; box-shadow: var(--shadow); }
  .fdk-gpanel { position: fixed; right: 40px; top: 90px; width: 340px; max-height: calc(100dvh - 130px); overflow: auto; z-index: 31; gap: 10px; background: var(--glass-strong); box-shadow: var(--shadow); }

  /* ---- Grocery list (docked) ---- */
  .fdk-gh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .fdk-gh h3 { font-size: 22px !important; }
  .fdk-gbody { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; }
  .fdk-aisle { display: flex; flex-direction: column; gap: 1px; }
  .fdk-gi { display: flex; align-items: center; gap: 9px; width: 100%; padding: 5px 2px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); min-height: 32px; }
  .fdk-gi i { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line); flex: 0 0 auto; }
  .fdk-gi.is-on i { background: var(--fv3-primary); border-color: var(--fv3-primary); }
  .fdk-gi span { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; } /* two lines, never cut mid-name (r4b) */
  .fdk-gi.is-on span { text-decoration: line-through; color: var(--ink-3); }
  .fdk-gi small { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
  .fdk-gf { display: flex; gap: 6px; flex-wrap: wrap; } .fdk-gf .fdk-pill { min-height: 34px; font-size: 10px !important; padding: 0 12px; } .fdk-gf .fdk-primary { flex: 1; justify-content: center; }
  .fdk-gsk { height: 220px; border-radius: 16px; }

  /* ---- Log desk ---- */
  .fdk-log { display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
  .fdk-lcol, .fdk-mcol { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .fdk-lcol .fv3-hero { grid-template-columns: 130px 1fr; }
  .fdk-lcol .fv3-ringwrap { width: 130px; height: 130px; } .fdk-lcol .fv3-ringwrap svg { width: 130px; height: 130px; }
  /* The middle column stays in view while the page scrolls (r4b): search and This week never leave a void beside the
     longer left and right columns. */
  .fdk-mcol { position: sticky; top: 12px; }
  /* Log it again and Saved meals as compact rows (r4b): a thumbnail, the name and portion, protein and kcal; one click logs. */
  .fdk-again { display: flex; flex-direction: column; gap: 6px; }
  .fv3-qlist { display: flex; flex-direction: column; gap: 6px; }
  .fv3-qrow { position: relative; display: flex; align-items: center; min-width: 0; border-radius: 16px; border: 1px solid var(--hair); background: var(--glass); box-shadow: var(--shadow-sm); }
  .fv3-qrow:hover { background: color-mix(in srgb, var(--sand-soft) 45%, var(--glass)); }
  .fv3-qmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); border-radius: 16px; min-height: 56px; }
  .fv3-qmain:focus-visible, .fv3-qport:focus-visible { outline: 3px solid var(--fv3-primary); outline-offset: 2px; }
  .fv3-qimg { width: 42px; height: 42px; border-radius: 12px; overflow: hidden; flex: 0 0 auto; background: var(--sand-soft); display: grid; place-items: center; }
  .fv3-qimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
  :root[data-theme="night"] .fv3-qimg img { filter: brightness(.88); }
  .fv3-qn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .fv3-qn b { font: 14.5px/1.25 var(--font-body, var(--f)); font-weight: 400; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .fv3-qn small { font-size: 12px; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fv3-qport { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; margin-right: 8px; min-height: 30px; max-width: 46%; padding: 0 6px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink-2); font: 12px var(--font-body, var(--f)); cursor: pointer; white-space: nowrap; }
  .fv3-qadd { min-height: 44px; justify-content: center; border: 1.5px dashed var(--sand); color: var(--sand-text); } .fv3-qadd b { font: 11px var(--fv3-label); letter-spacing: .1em; text-transform: uppercase; font-weight: 400; }
  .fv3-qrow:has(.fv3-qadd) { border: 0; background: transparent; box-shadow: none; }
  .fdk-sbar { display: flex; justify-content: flex-end; } .fdk-legend { display: inline-flex; align-items: center; gap: 4px; }
  .fdk-search { display: flex; align-items: center; gap: 10px; min-height: 56px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--glass-strong); padding: 0 16px; color: var(--ink-2); }
  .fdk-search:focus-within { border-color: var(--fv3-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sand) 25%, transparent); }
  .fdk-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 17px var(--font-body, var(--f)); outline: none; padding: 0; -webkit-appearance: none; appearance: none; }
  .fdk-search input::-webkit-search-cancel-button { display: none; }
  .fdk-res { padding: 8px 12px; gap: 4px; } .fdk-res[hidden] { display: none; }
  .fdk-grp { display: flex; flex-direction: column; gap: 2px; } .fdk-grp > .fv3-eye { padding: 6px 4px 2px; }
  .fdk-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 12px; cursor: pointer; min-height: 44px; }
  .fdk-row:hover { background: color-mix(in srgb, var(--sand-soft) 55%, transparent); }
  .fdk-row.is-act { background: color-mix(in srgb, var(--sand-soft) 85%, transparent); box-shadow: inset 0 0 0 1px var(--hair); }
  .fdk-rimg { width: var(--fdk-thumb); height: var(--fdk-thumb); border-radius: 10px; overflow: hidden; flex: 0 0 auto; } .fdk-rimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .fdk-rimg.fdk-mono, .fdk-oimg.fdk-mono { background: var(--sand-soft); }
  .fdk-rn { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; } .fdk-rn small { font-size: 12px; color: var(--ink-3); }
  .fdk-rm { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
  .fdk-trends { gap: 8px; } .fdk-charts { display: flex; flex-wrap: wrap; gap: 32px; }
  .fdk-ch { display: flex; flex-direction: column; gap: 4px; } .fdk-avg { font-size: 12.5px; color: var(--ink-2); min-height: 16px; }
  .fdk-ch svg text { font: 10px var(--fv3-label); fill: var(--ink-3); }
  .fdk-tr1 { fill: var(--sand); } .fdk-tr2 { fill: var(--red); } .fdk-tr0 { fill: var(--fv3-track); } .fdk-trt { stroke: var(--ink-3); stroke-dasharray: 3 4; stroke-width: 1; }
  .fdk-rcol { position: sticky; top: 12px; gap: 10px; background: var(--glass-strong); max-height: calc(100dvh - 120px); }
  .fdk-rcol .fdk-gbody { flex: 1; }

  /* ---- Today fill (FUEL_TODAY_FILL_ENABLED; Jake chose direction B, Nov 17): Planned cards under the macros and
     meals, and the Next meal column (Recipes, Eating out, Log it again) ---- */
  .fdk-tfill { display: contents; }
  .fdk-tfill .fv3-card { gap: 10px; min-width: 0; }
  .app[data-route=fuel] main#view .fv3-body:has(>.fdk-tfill) { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1fr); }
  .app[data-route=fuel] main#view .fv3-body>.fdk-tfill>.fdk-tf-next { grid-column: 3; grid-row: span 3; align-self: stretch; }
  .app[data-route=fuel] main#view .fv3-body>.fdk-tfill>.fdk-tf-plan { grid-column: 1 / span 2; }
  .app[data-route=fuel] main#view .fv3-body>.fdk-tfill:not(:has(.fdk-tf-plan))>.fdk-tf-next { grid-row: span 2; }
  .fdk-tf-cards { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fdk-tfc { display: flex; flex-direction: column; min-width: 0; border-radius: 16px; border: 1px solid var(--hair); background: var(--glass); overflow: hidden; box-shadow: var(--shadow-sm); }
  .fdk-tfc-open { display: flex; flex-direction: column; text-align: left; border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--ink); min-width: 0; }
  .fdk-tfc-open:focus-visible, .fdk-tf-ropen:focus-visible, .fdk-tf-place:focus-visible, .fdk-tf-tabs button:focus-visible, .fdk-tf-row:focus-visible { outline: 3px solid var(--fv3-primary); outline-offset: 2px; }
  .fdk-tfc-img { display: block; height: 104px; overflow: hidden; background: var(--sand-soft); } .fdk-tfc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  :root[data-theme="night"] .fdk-tfc-img img { filter: brightness(.88); }
  .fdk-tfc-img.fdk-mono { display: grid; place-items: center; }
  .fdk-tfc-eye { padding: 8px 10px 0; }
  .fdk-tfc-open b { font: 13.5px/1.25 var(--font-body, var(--f)); font-weight: 400; padding: 6px 10px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
  .fdk-tfc-eye + b { padding-top: 2px; }
  .fdk-tfc-open small { font-size: 12px; color: var(--ink-2); padding: 2px 10px 0; }
  .fdk-tfc-act { display: flex; gap: 6px; padding: 8px 10px 10px; margin-top: auto; }
  .fdk-tfc-act .fdk-pill, .fdk-tf-rrow .fdk-pill { min-height: 30px; padding: 0 12px; font-size: 10px !important; }
  .fdk-tfc-plus { width: 30px; padding: 0 !important; justify-content: center; }
  .fdk-tf-sub { margin: -4px 0 2px; }
  .fdk-tf-places { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .fdk-tf-place { min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); text-align: left; padding: 0 12px; font: 14px var(--font-body, var(--f)); color: var(--ink); cursor: pointer; }
  .fdk-tf-place:hover, .fdk-tf-row:hover { background: color-mix(in srgb, var(--sand-soft) 55%, var(--glass)); }
  .fdk-tf-sk { height: 150px; border-radius: 14px; }
  .fdk-tf-rows { display: flex; flex-direction: column; gap: 2px; }
  .fdk-tf-row { width: 100%; border: 0; background: transparent; text-align: left; color: var(--ink); }
  .fdk-tf-rrow { gap: 8px; padding: 4px 6px; }
  .fdk-tf-ropen { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; color: var(--ink); cursor: pointer; padding: 0; }
  .fdk-tf-ropen .fdk-rn { font-size: 14.5px; }
  .fdk-tf-sideact { display: flex; gap: 8px; flex-wrap: wrap; }
  .fdk-tf-next { flex: 1; }
  .fdk-tf-next h3 { font: 22px var(--fv3-display); font-weight: 400; margin: 0; letter-spacing: .02em; }
  .fdk-tf-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); }
  .fdk-tf-tabs button { flex: 1; min-height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 10.5px var(--fv3-label); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; white-space: nowrap; padding: 0 8px; }
  .fdk-tf-tabs button[aria-selected="true"] { background: var(--fv3-primary); color: var(--fv3-on); }
  .fdk-tf-panel { display: flex; flex-direction: column; gap: 8px; min-height: 260px; } /* the panel keeps its height when tabs change (no shift) */
  /* With the fill on, the hero photo is shorter so Today fits one screen at 1440. */
  .app[data-route=fuel] main#view .fv3-body:has(>.fdk-tfill) .fv3-herocard .fv3-band { height: 120px; }

  /* ---- Side panel (Recipe Book detail) ---- */
  .fdk-side { position: fixed; right: 16px; top: 76px; bottom: 16px; width: min(460px, 42vw); z-index: 2147482000; overflow: auto; overscroll-behavior: contain; border-radius: 24px; background: var(--glass-strong); border: 1px solid var(--hair); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); padding: 8px 18px 20px; display: flex; flex-direction: column; gap: 10px; animation: fv3-up .2s ease-out; }
  .fdk-sidebody { display: flex; flex-direction: column; gap: 12px; }
  .fdk-sidebody .rb-hero-photo { margin: 0; } .fdk-sidebody .rb-hero-photo img { width: 100%; height: 220px; object-fit: cover; border-radius: 18px; display: block; }
  .fdk-sidebody h1 { font: 28px/1 var(--fv3-display); font-weight: 400; margin: 0; }
  /* Add a meal: the side panel as a picker (r4b). */
  .fdk-psearch { min-height: 48px; border-radius: 16px; }
  .fdk-plist { display: flex; flex-direction: column; gap: 10px; }
  .fdk-plist .fdk-grp > .fv3-eye { padding: 2px 2px 0; }
  .fdk-psk { height: 180px; border-radius: 16px; margin-top: 6px; }
  .fdk-sidebody details { border-radius: 16px !important; }
}
/* Today fill on phone (FUEL_TODAY_FILL_ENABLED; below 1024 px): under Today's meals, Planned with Log it, a row of
   recipe cards that scrolls sideways (fixed card size, nothing reflows), and one Eating out row. */
@media (max-width: 1023px) {
  .fdk-tf-phone { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .fdk-tf-phone .fdk-tf-plan { gap: 8px; }
  .fdk-tf-phone .fdk-tf-rows { display: flex; flex-direction: column; }
  .fdk-tf-prow { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line); }
  .fdk-tf-prow:first-child { border-top: 0; }
  .fdk-tf-pn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .fdk-tf-pn b { font: 15px/1.25 var(--font-body, var(--f)); font-weight: 400; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .fdk-tf-pn small { font-size: 12.5px; color: var(--ink-2); }
  .fdk-tf-phone .fdk-pill { min-height: 40px; border-radius: 999px; padding: 0 16px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); font: 11px var(--fv3-label); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
  .fdk-tf-phone .fdk-pill.fdk-primary { background: var(--fv3-primary); border-color: transparent; color: var(--fv3-on); }
  .fdk-tf-rec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .fdk-tf-hrow { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 6px; margin: 0 -16px; scroll-padding-inline: 16px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .fdk-tf-hrow::-webkit-scrollbar { display: none; }
  .fdk-tf-hrow > * { scroll-snap-align: start; }
  .fdk-tf-phone .fdk-tfc { display: flex; flex-direction: column; min-width: 0; border-radius: 18px; border: 1px solid var(--hair); background: var(--glass); overflow: hidden; box-shadow: var(--shadow); }
  .fdk-tf-phone .fdk-tfc-open { display: flex; flex-direction: column; text-align: left; border: 0; background: transparent; padding: 0; color: var(--ink); min-width: 0; }
  .fdk-tf-phone .fdk-tfc-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand-soft); } .fdk-tf-phone .fdk-tfc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  :root[data-theme="night"] .fdk-tf-phone .fdk-tfc-img img { filter: brightness(.88); }
  .fdk-tf-phone .fdk-tfc-open b { font: 14px/1.25 var(--font-body, var(--f)); font-weight: 400; padding: 8px 10px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
  .fdk-tf-phone .fdk-tfc-open small { font-size: 12px; color: var(--ink-2); padding: 2px 10px 0; }
  .fdk-tf-phone .fdk-tfc-act { display: flex; gap: 6px; padding: 8px 10px 10px; margin-top: auto; }
  .fdk-tf-phone .fdk-tfc-act .fdk-pill { min-height: 36px; padding: 0 12px; }
  .fdk-tf-phone .fdk-tfc-plus { width: 36px; padding: 0; justify-content: center; }
  .fdk-tf-phone .fdk-tfc-open:focus-visible, .fdk-tf-phone .fdk-pill:focus-visible, .fdk-tf-eatrow:focus-visible { outline: 3px solid var(--fv3-primary); outline-offset: 2px; }
}
/* Between 1024 and 1279 px: the side panel sits under the board, and the grocery list under the search. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .fdk-plan { grid-template-columns: minmax(0, 1fr); padding-right: 34px; } .fdk-panel { position: static; max-height: none; }
  .fdk-log { grid-template-columns: 300px minmax(0, 1fr); } .fdk-lcol { grid-row: span 2; } .fdk-rcol { grid-column: 2; position: static; max-height: 560px; } .fdk-mcol { position: static; } /* the list scrolls in its card: column 2 ends with column 1 (r4b) */
  .fdk-cell { min-height: 120px; }
}
@media (prefers-reduced-motion: reduce) { .fdk-side { animation: none; } .fdk-card.is-picked, .fdk-card.is-dragging { transform: none; } }
/* The printed grocery list (r4b3): this sheet's body only. The page, the hidden app, the ASPN header, the footer and the
   sand accent are the one shared ASPN print sheet (print-sheet.css), as on Train's workout sheet. Two columns; an
   aisle header never leaves its first item; black and charcoal text, sand on rules and checkbox strokes only. */
@media print {
  .fdk-grocprint .gp-cols { columns: 2; column-gap: 26pt; }
  .fdk-grocprint .gp-aisle { margin: 0 0 9pt; }
  .fdk-grocprint .gp-keep { break-inside: avoid; page-break-inside: avoid; }
  .fdk-grocprint .gp-h { display: block; margin: 0 0 1pt; padding: 0 0 3pt; border-bottom: 1pt solid var(--ap-sand); break-after: avoid; }
  .fdk-grocprint .gp-item { display: flex; align-items: center; gap: 7pt; min-height: 17pt; padding: 2pt 0; border-bottom: .5pt solid #c9c9c9; break-inside: avoid; page-break-inside: avoid; font-size: 10pt; color: #000; }
  .fdk-grocprint .gp-n { flex: 1; min-width: 0; }
  .fdk-grocprint .gp-q { color: #333; white-space: nowrap; font-size: 9pt; }
  .fdk-grocprint .gp-done .ap-box { position: relative; }
  .fdk-grocprint .gp-done .ap-box::after { content: ""; position: absolute; left: 2pt; top: .2pt; width: 2.6pt; height: 4.6pt; border: solid #222; border-width: 0 1pt 1pt 0; transform: rotate(45deg); }
  .fdk-grocprint .gp-blank small { font: 7pt/1 "Russo One", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #555; }
}

/* r4b density (Jake approved): the Plan board's 28 meal cells and the day totals carry no borders; an empty slot's
   dashed frame shows only on hover and focus (with its "+"), and the day header marks today. */
@media (min-width: 1024px) {
  .fdk-add { border-color: transparent !important; }
  .fdk-cell:hover .fdk-add, .fdk-add:focus-visible { border-color: var(--fv3-primary) !important; }
  .fdk-cell.is-today { box-shadow: none !important; }
  .fdk-sum { border-color: transparent !important; }
  .fdk-sum.is-over .fdk-k b { color: var(--red); }
}
