/* v0.34 (owner 2026-10-12): meal content icons + legend, compact shopping lines + colour legend,
   weekly activity plan. Self-drawn inline SVG only; colours live here, never in inline style attributes. */
:root {
  --ls-grain: #d4aa6c; --ls-grain-ink: #8b6534;
  --ls-leaf: #3f9a52; --ls-leaf-ink: #2b6b39; --ls-leaf-vein: #eaf6ec;
  --ls-milk: #ffffff; --ls-milk-ink: #4b5563; --ls-milk-line: #9aa3ad;
  --ls-amber-ink: #8a4b00;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ls-milk-ink: #cfd6de; --ls-milk-line: #7d8791; --ls-amber-ink: #f3c77a; --ls-grain-ink: #e2bd84; }
}
:root[data-theme="dark"] { --ls-milk-ink: #cfd6de; --ls-milk-line: #7d8791; --ls-amber-ink: #f3c77a; --ls-grain-ink: #e2bd84; }

/* ---------- shared icon strokes ---------- */
.ls-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ls-grain { fill: var(--ls-grain); stroke: var(--ls-grain-ink); stroke-width: .8; }
.ls-grain-stem { fill: none; stroke: var(--ls-grain-ink); stroke-width: 1.4; stroke-linecap: round; }
.ls-leaf { fill: var(--ls-leaf); stroke: var(--ls-leaf-ink); stroke-width: .8; }
.ls-leaf-vein { fill: none; stroke: var(--ls-leaf-vein); stroke-width: 1.1; stroke-linecap: round; }
.ls-milk { fill: var(--ls-milk); stroke: var(--ls-milk-ink); stroke-width: 1.5; stroke-linejoin: round; }
.ls-milk-line { fill: none; stroke: var(--ls-milk-line); stroke-width: 1; }

/* ---------- meal calendar icons and legend ---------- */
.mp-cell .mp-icons, .mp-icons { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.mp-ico { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; }
.mp-legend { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.mp-legend .mp-legend-title { font-size: 14px; margin: 0 0 6px; }
.mp-legend ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; }
.mp-legend li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.mp-legend .mp-ico { width: 20px; height: 20px; flex-basis: 20px; }
.mp-swatch { display: inline-block; width: 18px; height: 14px; border-radius: 4px; flex: 0 0 18px; border: 1px solid var(--line); background: var(--surface); }
.mp-swatch-treat { background: var(--suspected-light); border-color: color-mix(in srgb, var(--suspected) 55%, var(--line)); }
.mp-swatch-other { background: var(--suspected-light); border-color: var(--suspected); border-radius: 999px; }
.mp-swatch-eaten { border-left: 3px solid var(--verified); background: var(--verified-light); }
.mp-swatch-today { background: var(--blue-light); border-color: var(--blue); }

/* ---------- shopping list: compact lines ---------- */
.mp-shop .shgrp { display: block; }
.mp-shop .shgrp > h3 { margin: 16px 0 4px; }
.mp-shop .sh-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.mp-shop .sh-line { display: flex; gap: 10px; align-items: flex-start; }
.mp-shop .sh-line input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 20px; }
.mp-shop .sh-text { min-width: 0; line-height: 1.55; font-size: 14.5px; overflow-wrap: anywhere; }
.mp-shop .sh-text label.sh-name { display: inline; margin: 0; font-size: inherit; font-weight: 650; color: var(--ink); cursor: pointer; }
.mp-shop .sh-meta { color: var(--ink-2); }
.mp-shop .sh-price { font-weight: 650; color: var(--ink); }
.mp-shop .sh-unknown { color: var(--ink-muted); font-style: italic; }
.mp-shop .sh-line:has(input:checked) .sh-name, .mp-shop .sh-line:has(input:checked) .sh-meta,
.mp-shop .sh-line:has(input:checked) .sh-price { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.sh-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border: 1px solid currentColor; border-radius: 999px;
  font-size: 12px; font-weight: 650; line-height: 1; text-decoration: none; color: var(--blue); vertical-align: baseline; white-space: nowrap; }
a.sh-badge:hover, a.sh-badge:focus-visible { background: var(--blue-light); text-decoration: underline; }
.sh-stale { display: inline; padding: 1px 6px; border-radius: 6px; background: var(--suspected-light); color: var(--ls-amber-ink);
  border: 1px solid color-mix(in srgb, var(--suspected) 45%, transparent); font-size: 12.5px; white-space: normal; }
.mp-shop .sh-more { margin: 4px 0 0 30px; }
.mp-shop .sh-more > summary { font-size: 13px; color: var(--ink-2); cursor: pointer; min-height: 32px; padding-block: 6px; }
.mp-shop .sh-more .shopping-package { margin: 4px 0 6px; }
.sh-legend { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, var(--canvas-alt)); }
.sh-legend h3 { margin: 0 0 8px; font-size: 15px; }
.sh-legend ul { margin: 0; padding: 0; display: grid; gap: 8px; }
.sh-legend li { font-size: 13.5px; line-height: 1.5; }
.sh-legend li > span:first-child { margin-right: 6px; }
.sh-done-sample { color: var(--ink-muted); text-decoration: line-through; }
.sh-badge-sample { pointer-events: none; }
.shopping-price-summary strong { font-size: 18px; }
@media (max-width: 600px) {
  .mp-shop .sh-more { margin-left: 0; }
  .sh-badge { min-height: 32px; padding: 0 10px; }
}

/* ---------- weekly activity plan ---------- */
.aw .aw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.aw .aw-head h2 { flex: 1 1 auto; margin: 0; }
.aw .aw-head h2:focus { outline: none; }
.aw .aw-head h2:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.aw-week-nav { display: inline-flex; align-items: center; gap: 4px; }
.aw-week-nav button { min-width: 44px; height: auto; min-height: 44px; font-size: 20px; }
.aw-subject { display: inline-flex; flex-direction: column; gap: 2px; font-size: 13px; margin: 0; }
.aw-subject select { min-height: 44px; }
.aw-principles { margin: 6px 0 12px; padding: 8px 12px; border-left: 3px solid var(--verified); background: var(--verified-light); border-radius: 0 8px 8px 0; font-weight: 600; }
.aw-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.aw-summary > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.aw-summary h3 { margin: 0 0 6px; font-size: 15px; }
.aw-summary ul { margin: 0; padding-left: 18px; }
.aw-big { margin: 0 0 6px; font-size: 15px; }
.aw-big b { font-size: 26px; }
.aw-bar { height: 10px; border-radius: 999px; background: var(--canvas-alt); overflow: hidden; margin: 4px 0 8px; border: 1px solid var(--line); }
.aw-bar-fill { height: 100%; width: 0; background: var(--blue); border-radius: 999px; }
.aw-bar-fill.is-met { background: var(--verified); }
.aw-dots { display: flex; gap: 6px; margin: 4px 0 0; padding: 0; }
.aw-dots li { display: grid; justify-items: center; gap: 2px; font-size: 12px; color: var(--ink-2); }
.aw-dots li > span[aria-hidden] { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.aw-dots li.is-met > span[aria-hidden] { background: var(--verified-light); border-color: var(--verified); color: var(--verified); }
.aw-dots li.is-missed > span[aria-hidden] { background: var(--canvas-alt); }
.aw-today { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; background: var(--surface); }
.aw-today h3 { margin: 0 0 6px; font-size: 15px; }
.aw-today-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px dashed var(--line); }
.aw-today-row:first-child { border-top: 0; }
.aw-today-act { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.aw-today-act button { height: auto; min-height: 40px; }
.aw-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.aw-day { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--surface); }
.aw-day.is-today { border-color: var(--blue); background: color-mix(in srgb, var(--blue-light) 55%, var(--surface)); }
.aw-day.is-past { background: color-mix(in srgb, var(--canvas-alt) 45%, var(--surface)); }
.aw-day h3 { margin: 0; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.aw-day h3 .aw-date { color: var(--ink-2); font-weight: 500; }
.aw-day h3 .chip { font-size: 10.5px; padding: 0 6px; }
.aw-items { display: grid; gap: 6px; margin: 0; padding: 0; }
.aw .aw-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; align-items: start; justify-content: stretch; width: 100%; height: auto; min-height: 44px; padding: 6px 7px;
  line-height: 1.3; text-align: left; border: 1px solid var(--line); border-left-width: 3px; border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; white-space: normal; }
.aw-item:hover { border-color: var(--blue); }
.aw-item:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.aw-st-done { border-left-color: var(--verified); }
.aw-st-other { border-left-color: var(--suspected); }
.aw-st-skipped { border-left-color: var(--line-strong); background: var(--canvas-alt); }
.aw-st-skipped .aw-item-name { color: var(--ink-2); }
.aw-item-text { display: grid; gap: 2px; min-width: 0; }
.aw-item-name { font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
@media (min-width: 1181px) {
  .aw .aw-item { grid-template-columns: 20px minmax(0, 1fr); gap: 5px; padding: 6px 5px; }
  .aw .aw-item .aw-ico { width: 20px; height: 20px; flex-basis: 20px; }
  .aw-item-name { font-size: 12.5px; }
}
.aw-item-meta { font-size: 12px; color: var(--ink-2); }
.aw-mark { justify-self: start; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--canvas-alt); color: var(--ink-2); }
.aw-mark-done { background: var(--verified-light); color: var(--verified); }
.aw-mark-other { background: var(--suspected-light); color: var(--ls-amber-ink); }
.aw-ico { display: inline-flex; width: 24px; height: 24px; flex: 0 0 24px; color: var(--blue); }
.aw-line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.aw-logged { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; align-items: center; font-size: 12px; color: var(--ink-2); }
.aw-logged .aw-ico { width: 20px; height: 20px; color: var(--ink-muted); }
.aw-empty { margin: 0; }
.aw-day-total { margin: 0; font-size: 12px; color: var(--ink-2); }
.aw .aw-add { margin-top: auto; align-self: stretch; height: auto; min-height: 40px; border: 1px dashed var(--line-strong); border-radius: 10px; background: transparent; }
.aw-panel { margin: 12px 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.aw-panel:focus { outline: none; }
.aw-detail-head { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.aw-detail-head h3 { margin: 0; }
.aw-detail-head .dt-close { position: static; transform: none; width: 44px; height: 44px; min-width: 44px; font-size: 18px; }
.aw-detail-head h3:focus { outline: none; }
.aw-detail-head h3:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.aw-panel .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.aw-panel .actions button { height: auto; min-height: 44px; }
.aw-form { display: grid; gap: 10px; margin-top: 10px; }
.aw-form h3, .aw-form h4 { margin: 0; }
.aw-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.aw-form label { display: grid; gap: 4px; }
.aw-form input, .aw-form select { min-height: 44px; }
.aw-form input[readonly] { background: var(--canvas-alt); }
.aw-stop { margin-top: 10px; }
.aw-source { margin-top: 12px; }
#aw-status:empty { display: none; }
@media (max-width: 1180px) {
  .aw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .aw-summary { grid-template-columns: minmax(0, 1fr); }
  .aw-grid { grid-template-columns: minmax(0, 1fr); }
  .aw-day { display: grid; grid-template-columns: minmax(0, 1fr); }
  .aw-today-row { grid-template-columns: 28px minmax(0, 1fr); }
  .aw-today-act { grid-column: 1 / -1; justify-content: flex-start; }
  .aw-item-name { font-size: 14.5px; }
  .aw-item-meta { font-size: 13px; }
  .aw-day h3 { font-size: 15px; }
}
