/* Burns Family Meals — original kitchen planner UI */
:root {
  --bg: #eef6f2;
  --bg-deep: #dceee6;
  --ink: #173042;
  --ink-soft: #3d5566;
  --teal: #0f6e6e;
  --teal-deep: #0a5555;
  --teal-soft: #d4efef;
  --coral: #d4572a;
  --coral-deep: #b9441c;
  --coral-soft: #ffe3d6;
  --gold: #d9a441;
  --white: #fffaf4;
  --shadow: 0 8px 22px rgba(23, 48, 66, 0.12);
  --radius: 16px;
  --font: "Nunito", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(15, 110, 110, 0.16), transparent 38%),
    radial-gradient(circle at 95% 12%, rgba(212, 87, 42, 0.12), transparent 34%),
    linear-gradient(180deg, #f4faf7 0%, var(--bg) 42%, #f8f1e8 100%);
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    radial-gradient(rgba(23, 48, 66, 0.045) 0.9px, transparent 0.9px);
  background-size: 16px 16px;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 3.5rem;
}

/* Header */
.site-header {
  text-align: center;
  padding: 0.35rem 0 0.85rem;
  animation: rise-in 0.55s ease both;
}

.brand-kicker {
  margin: 0 0 0.2rem;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.05;
}

.week-label-wrap {
  display: flex;
  justify-content: center;
  margin: 0.8rem 0 0.35rem;
}

.week-label {
  width: min(100%, 320px);
  border: 2px solid var(--teal);
  background: var(--white);
  color: var(--coral-deep);
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: center;
  border-radius: 14px;
  padding: 0.55rem 1rem;
  box-shadow: 0 4px 0 rgba(15, 110, 110, 0.16);
}

.week-label:focus {
  outline: 3px solid rgba(212, 87, 42, 0.35);
  outline-offset: 2px;
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-weight: 650;
  max-width: 34rem;
  margin-inline: auto;
}

.budget-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.budget-pill,
.estimate-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  padding: 0.45rem 0.85rem;
  border-radius: 12px;
  border: 2px solid transparent;
}

.budget-pill {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-color: rgba(15, 110, 110, 0.22);
  font: inherit;
  font-weight: 800;
  min-height: 44px;
  cursor: pointer;
}

.budget-pill.is-set { background: var(--white); border-color: var(--teal); }
.budget-pill.is-off { background: #eef1f3; color: #7a8a96; border-color: #d5dde2; font-weight: 700; }

.estimate-pill {
  background: var(--coral-soft);
  color: var(--coral-deep);
  border-color: rgba(212, 87, 42, 0.22);
}

.plan-note {
  margin: 0.75rem auto 0;
  max-width: 36rem;
  padding: 0.65rem 0.85rem;
  background: var(--white);
  border: 2px solid rgba(15, 110, 110, 0.3);
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--teal-deep);
}

/* House rules: normal block, scrolls away with the page */
.rules-banner {
  margin: 0.35rem 0 1rem;
  padding: 0.65rem 0.8rem;
  background: linear-gradient(135deg, #124f4f, var(--teal));
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise-in 0.6s ease both;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rules-banner h2 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.rules-banner ul {
  margin: 0;
  padding-left: 1.05rem;
  font-weight: 650;
  font-size: 0.8rem;
  line-height: 1.35;
}

.rules-banner li + li {
  margin-top: 0.22rem;
}

.rules-banner strong {
  font-weight: 800;
}

/* Templates */
.templates {
  margin-bottom: 1rem;
  animation: rise-in 0.65s ease both;
}

.template-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.template-btn {
  appearance: none;
  border: 3px solid transparent;
  border-radius: var(--radius);
  min-height: 64px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.template-btn:hover {
  transform: translateY(-2px);
}

.template-btn:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

.template-btn[aria-pressed="true"] {
  background: linear-gradient(160deg, var(--teal), var(--teal-deep));
  color: white;
  border-color: var(--gold);
}

.template-id {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
}

.template-btn small {
  display: block;
  font-weight: 650;
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.2rem;
}

/* Share / howto */
.howto {
  background: var(--white);
  border: 2px dashed rgba(212, 87, 42, 0.55);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  animation: rise-in 0.7s ease both;
}

.howto h2 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  color: var(--coral-deep);
}

.howto ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  font-weight: 650;
}

.howto li + li {
  margin-top: 0.3rem;
}

.sync-note {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  background: var(--coral-soft);
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 1rem 0;
}

.btn[hidden],
button[hidden],
[hidden] {
  display: none !important;
}
.btn {
  appearance: none;
  border: none;
  border-radius: 14px;
  min-height: 52px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(160deg, var(--coral), var(--coral-deep));
  color: white;
  box-shadow: 0 5px 0 rgba(185, 68, 28, 0.3);
}

.btn-secondary {
  background: linear-gradient(160deg, var(--teal), var(--teal-deep));
  color: white;
  box-shadow: 0 5px 0 rgba(10, 85, 85, 0.3);
}

.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border: 2px solid rgba(23, 48, 66, 0.12);
  box-shadow: 0 3px 0 rgba(23, 48, 66, 0.08);
}

.btn-ghost[aria-pressed="true"] {
  background: var(--gold);
  border-color: rgba(23, 48, 66, 0.18);
  color: #1a1a1a;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: white;
  font-weight: 700;
  padding: 0.75rem 1.1rem;
  border-radius: 14px;
  z-index: 50;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-width: min(92vw, 420px);
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Week calendar */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

.section-title h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.4rem;
}

.section-title span {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.88rem;
}

.week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.day-card {
  width: 100%;
  text-align: left;
  border: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: pop-in 0.45s ease both;
}

.day-card:nth-child(1) { animation-delay: 0.02s; }
.day-card:nth-child(2) { animation-delay: 0.06s; }
.day-card:nth-child(3) { animation-delay: 0.1s; }
.day-card:nth-child(4) { animation-delay: 0.14s; }
.day-card:nth-child(5) { animation-delay: 0.18s; }
.day-card:nth-child(6) { animation-delay: 0.22s; }
.day-card:nth-child(7) { animation-delay: 0.26s; }

.day-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(23, 48, 66, 0.16);
}

.day-card:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: white;
  padding: 0.7rem 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.day-head-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.swap-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: white;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  border-radius: 0;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
  transition: opacity 0.15s ease;
}

.swap-btn:hover,
.swap-btn:focus-visible {
  background: transparent;
  outline: none;
  transform: none;
  opacity: 0.85;
}

.swap-link {
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 0;
  padding: 0 0.15rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}
.swap-link .ico { stroke: #fff; width: 18px; height: 18px; }
.swap-link:hover,
.swap-link:focus-visible {
  opacity: 0.88;
  outline: none;
}

.day-head .emoji {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.day-body {
  padding: 0.9rem 1rem 1rem;
}

.day-body-btn {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.9rem 1rem 1rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.day-body-btn:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: -3px;
}

.day-card-swapped .day-head {
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
}

.day-swap-badge {
  margin: 0.35rem 0 0;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--coral-deep);
  background: var(--coral-soft);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
}

.meal-emoji {
  font-size: 2.3rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  display: block;
  animation: floaty 3.2s ease-in-out infinite;
}

.day-dinner {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.day-lunch {
  margin: 0.45rem 0 0;
  color: var(--coral-deep);
  font-weight: 700;
  font-size: 0.95rem;
}

.day-lunch-muted {
  color: var(--ink-soft);
  font-weight: 650;
}

.day-ted {
  margin: 0.4rem 0 0;
  padding: 0.4rem 0.55rem;
  background: var(--coral-soft);
  border-radius: 10px;
  color: var(--coral-deep);
  font-weight: 800;
  font-size: 0.9rem;
}

.day-card-fish {
  box-shadow: 0 10px 24px rgba(212, 87, 42, 0.16);
}

.recipe-ted {
  border-left-color: var(--coral) !important;
  background: var(--coral-soft) !important;
}

.tucker-note {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.85rem;
  background: var(--teal-soft);
  border-radius: 12px;
  border-left: 5px solid var(--teal);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.estimate-bar {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  background: var(--coral-soft);
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.estimate-bar span {
  color: var(--ink-soft);
  font-weight: 650;
}

.category-tucker {
  color: var(--coral-deep);
}

.tap-hint {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Grocery */
.grocery-panel {
  background: var(--white);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.grocery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.grocery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.chip {
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-weight: 750;
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
}

.chip-btn {
  appearance: none;
  border: 2px solid rgba(15, 110, 110, 0.28);
  background: var(--bg);
  color: var(--teal-deep);
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  min-height: 40px;
}

.chip-btn.is-on {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-deep);
}

.chip-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.chip-btn:focus-visible {
  outline: 3px solid rgba(212, 87, 42, 0.3);
}

.category {
  margin: 0.9rem 0 0.4rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--bg-deep);
  color: var(--teal-deep);
  font-size: 1.05rem;
}

.aisle-fold {
  margin: 0.45rem 0 0.15rem;
  border: none;
  padding: 0;
}
.aisle-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 0.15rem 0.4rem;
  border-bottom: 2px solid var(--bg-deep);
  color: var(--teal-deep);
  font-size: 1.05rem;
  font-weight: 800;
  min-height: 44px;
  user-select: none;
}
.aisle-fold > summary::-webkit-details-marker { display: none; }
.aisle-fold > summary::marker { content: ""; }
.aisle-fold .aisle-sum-lab { flex: 1; min-width: 0; }
.aisle-fold .aisle-chev {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: transform 0.15s ease;
}
.aisle-fold[open] > summary .aisle-chev { transform: rotate(180deg); }
.aisle-fold.category-tucker > summary {
  color: var(--coral-deep);
}

.meta-chip.del-custom {
  padding: 0.2rem;
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.meta-chip.del-custom .ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}
.custom-add #custom-new-cat {
  grid-column: 1 / -1;
}
.custom-add #del-custom-cat {
  grid-column: 1 / -1;
  justify-self: start;
}
.aisle-fold .aisle-cat-del {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px;
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.aisle-fold .aisle-cat-del .ico { width: 16px; height: 16px; stroke: currentColor; }
.aisle-fold .aisle-cat-del:hover { color: var(--coral-deep); }

.grocery-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 0.65rem;
}
.grocery-search {
  flex: 1 1 12rem;
  min-height: 44px;
  border: 2px solid rgba(15, 110, 110, 0.28);
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 700;
  background: var(--white);
  color: var(--ink);
}
.share-list-link {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--teal-deep);
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.share-list-link .ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  display: block;
}


.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.7rem 0.35rem;
  border-bottom: 1px dashed rgba(23, 48, 66, 0.12);
  min-height: 52px;
}

.item:last-child {
  border-bottom: none;
}

.item input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.2rem;
  accent-color: var(--teal);
  cursor: pointer;
}

.item-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: start;
}

.item-copy {
  min-width: 0;
}

.item label {
  cursor: pointer;
  font-weight: 700;
}

.item.checked .item-copy > label {
  text-decoration: line-through;
  color: var(--ink-soft);
  opacity: 0.75;
}

.item.have-it {
  opacity: 0.72;
  background: rgba(15, 110, 110, 0.05);
  border-radius: 12px;
}

.item .hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--teal-deep);
}

.item-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.meta-chip {
  appearance: none;
  border: 1.5px solid rgba(15, 110, 110, 0.28);
  background: var(--bg);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-chip.is-on,
.have-chip.is-on {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-deep);
}

.meta-chip:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 1px;
}

.meta-edit {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  margin-top: 0.45rem;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 10px;
}

.meta-edit[hidden] {
  display: none !important;
}

.meta-input {
  width: 100%;
  min-height: 42px;
  border: 2px solid rgba(15, 110, 110, 0.28);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-weight: 650;
  background: var(--white);
  color: var(--ink);
}

.meta-input:focus {
  outline: 3px solid rgba(212, 87, 42, 0.25);
  border-color: var(--coral);
}

.meta-save {
  min-height: 42px;
}

.grocery-empty {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

.price-field {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background: var(--bg);
  border: 2px solid rgba(15, 110, 110, 0.28);
  border-radius: 10px;
  padding: 0.25rem 0.4rem;
  font-weight: 800;
  color: var(--ink-soft);
  text-decoration: none !important;
  opacity: 1 !important;
}

.price-input {
  width: 4.2rem;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 750;
  color: var(--ink);
  padding: 0.2rem 0;
}

.price-input:focus {
  outline: none;
}

.price-field:focus-within {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(212, 87, 42, 0.18);
}

.custom-add {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 2px solid var(--bg-deep);
}

.custom-add select,
.custom-add input[type="text"],
.custom-add input[type="number"] {
  width: 100%;
  min-height: 48px;
  border: 2px solid rgba(15, 110, 110, 0.35);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-weight: 650;
  background: var(--bg);
  color: var(--ink);
}

.custom-add select:focus,
.custom-add input[type="text"]:focus,
.custom-add input[type="number"]:focus {
  outline: 3px solid rgba(212, 87, 42, 0.3);
  border-color: var(--coral);
}

/* Shop mode — large taps, checked sink visually */
body.shop-mode .item {
  min-height: 72px;
  padding: 0.95rem 0.4rem;
  gap: 0.9rem;
}

body.shop-mode .item input[type="checkbox"] {
  width: 1.85rem;
  height: 1.85rem;
  margin-top: 0.35rem;
}

body.shop-mode .item label {
  font-size: 1.08rem;
}

body.shop-mode .item.checked {
  opacity: 0.72;
  background: rgba(23, 48, 66, 0.03);
  border-radius: 12px;
}

body.shop-mode .grocery-panel {
  border: 3px solid rgba(15, 110, 110, 0.25);
}

body.shop-mode .price-input {
  width: 4.8rem;
  font-size: 1.05rem;
}

.shop-mode-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
}
.shop-mode-wrap #shop-mode {
  flex: 1 1 auto;
}
.tip-i {
  appearance: none;
  border: 2px solid rgba(15, 110, 110, 0.28);
  background: var(--white, #fffaf4);
  color: var(--teal-deep, #0a5555);
  border-radius: 12px;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.tip-i .ico {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.tip-pop {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  background: var(--ink, #173042);
  color: #fff;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  text-align: left;
}
.tip-pop[hidden] {
  display: none !important;
}
.tip-i:hover + .tip-pop,
.tip-i:focus-visible + .tip-pop,
.shop-mode-wrap:focus-within .tip-pop.is-open,
.tip-pop.is-open {
  display: block !important;
}
html[data-theme="dark"] .tip-i {
  background: var(--card, #1e293b);
  border-color: rgba(45, 212, 191, 0.35);
  color: var(--ink, #f1f5f9);
}
html[data-theme="dark"] .tip-pop {
  background: #0b1220;
  border: 1px solid rgba(45, 212, 191, 0.35);
}

/* Swap picker */
.swap-current {
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.swap-section-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
  color: var(--teal-deep);
}

.swap-options {
  display: grid;
  gap: 0.5rem;
}

.swap-options-scroll {
  max-height: min(42vh, 320px);
  overflow: auto;
  padding-right: 0.15rem;
}

.swap-option {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 2px solid rgba(15, 110, 110, 0.22);
  background: var(--bg);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.swap-option:hover:not(:disabled),
.swap-option:focus-visible:not(:disabled) {
  border-color: var(--teal);
  outline: none;
  transform: translateY(-1px);
}

.swap-option.is-on {
  background: var(--teal-soft);
  border-color: var(--teal);
}

.swap-option:disabled {
  opacity: 0.45;
  cursor: default;
}

.swap-option-title {
  display: block;
  font-weight: 800;
  color: var(--ink);
}

.swap-option-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.swap-footnote {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.modal-swap {
  max-height: min(88vh, 720px);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 48, 66, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  z-index: 40;
}

.modal-backdrop.open {
  display: flex;
  animation: fade-in 0.2s ease;
}

.modal {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: var(--white);
  border-radius: 22px 22px 16px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  padding: 1.1rem 1.15rem 1.75rem;
  animation: slide-up 0.28s ease;
  -webkit-overflow-scrolling: touch;
}

.modal-settings {
  padding-bottom: 2rem;
}

#settings-body {
  padding-bottom: 0.75rem;
}

#settings-body #set-save {
  margin-bottom: 0.5rem;
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.modal h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.2;
}

.modal .day-sub {
  margin: 0.25rem 0 0;
  color: var(--coral-deep);
  font-weight: 750;
}

.close-btn {
  appearance: none;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-deep);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.close-btn:focus-visible {
  outline: 3px solid var(--teal);
}

.recipe-block {
  margin-top: 0.85rem;
  padding: 0.8rem 0.85rem;
  background: var(--bg);
  border-radius: 14px;
  border-left: 5px solid var(--teal);
}

.recipe-block h4 {
  margin: 0 0 0.35rem;
  color: var(--teal-deep);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recipe-block p,
.recipe-block li {
  margin: 0;
  font-weight: 650;
  color: var(--ink-soft);
}

.recipe-block ul {
  margin: 0;
  padding-left: 1.15rem;
}

.recipe-block li + li {
  margin-top: 0.25rem;
}

.footer-note {
  text-align: center;
  color: var(--ink-soft);
  font-weight: 650;
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (min-width: 640px) {
  .actions {
    grid-template-columns: 1fr 1fr;
  }

  .template-grid {
    grid-template-columns: 1fr 1fr;
  }

  .custom-add {
    grid-template-columns: 140px 1fr 88px auto;
    align-items: center;
  }

  .week-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-backdrop {
    align-items: center;
  }

  .modal {
    border-radius: 22px;
  }
}

@media (min-width: 960px) {
  .week-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .template-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== v3: receipt, week calendar, budget editor, week customizer, store prices ===== */
.rcpt-top { display: flex; justify-content: center; margin: 0 0 0.6rem; }
.rcpt-btn {
  appearance: none; border: none; border-radius: 999px; min-height: 46px; padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, var(--coral), var(--coral-deep)); color: #fff;
  font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 0 rgba(185, 68, 28, 0.3);
}
.week-label-wrap { align-items: center; gap: 0.5rem; }
.week-label { width: min(calc(100% - 58px), 300px); }
.cal-btn {
  width: 50px; height: 50px; flex-shrink: 0; border-radius: 14px; border: 2px solid var(--teal);
  background: var(--white); font-size: 1.4rem; cursor: pointer; box-shadow: 0 4px 0 rgba(15, 110, 110, 0.16);
}
.cal-btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.bcmp { margin: 0.55rem auto 0; max-width: 26rem; border-radius: 12px; padding: 0.5rem 0.8rem; font-weight: 800; font-size: 0.92rem; }
.bcmp small { display: block; font-weight: 700; font-size: 0.8rem; }
.bcmp.under { background: #d1fae5; color: #065f46; }
.bcmp.over { background: #fee2e2; color: #991b1b; }
.lp-tip { text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); margin: 0.5rem 0 0; }
.lp { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.template-btn { position: relative; }
.edited-badge {
  position: absolute; top: 0.45rem; right: 0.55rem; background: var(--coral); color: #fff; border-radius: 999px;
  padding: 0.1rem 0.5rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.sheet-bg { position: fixed; inset: 0; background: rgba(23, 48, 66, 0.55); display: none; align-items: flex-end; justify-content: center; z-index: 60; padding: 0.6rem; }
.sheet-bg.open { display: flex; animation: fade-in 0.2s ease; }
.sheet {
  width: min(460px, 100%); max-height: 88vh; overflow: auto; background: var(--white); color: var(--ink);
  border-radius: 22px 22px 16px 16px; padding: 0.9rem 0.9rem 1.1rem; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); animation: slide-up 0.25s ease;
}
.sh-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.sh-top h3 { margin: 0; font-family: var(--display); font-size: 1.3rem; }
.sh-x { width: 44px; height: 44px; border: none; border-radius: 12px; background: var(--bg-deep); color: var(--ink); font-size: 1.25rem; font-weight: 800; cursor: pointer; flex-shrink: 0; }
.cal-sel { margin: 0 0 0.4rem; font-weight: 800; color: var(--coral-deep); font-size: 0.9rem; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 0.25rem 0 0.4rem; }
.cal-nav b { font-size: 1.12rem; }
.cal-nav button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; border: none; border-radius: 0; background: transparent; box-shadow: none; font-size: 1.25rem; font-weight: 800; color: var(--teal-deep); cursor: pointer; padding: 0; }
.cal-dow, .cal-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow span { text-align: center; font-size: 0.75rem; font-weight: 800; color: var(--ink-soft); padding: 0.25rem 0; text-transform: uppercase; }
.cal-row { border-radius: 12px; padding: 2px 0; margin: 1px 0; }
.cal-row.sel { background: var(--teal-soft); box-shadow: inset 0 0 0 2px var(--teal); }
.cal-d { height: 46px; border: none; background: transparent; border-radius: 10px; font: inherit; font-weight: 800; font-size: 1rem; color: var(--ink); cursor: pointer; }
.cal-d.out { color: #a0afb9; font-weight: 650; }
.cal-d.today { background: var(--coral-soft); color: var(--coral-deep); box-shadow: inset 0 0 0 2px var(--coral); }
.cal-d:active { background: var(--teal); color: #fff; }
.cal-foot { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.4rem; margin-top: 0.6rem; }
.cal-foot button, .sh-btn { min-height: 48px; border-radius: 12px; border: 2px solid rgba(15, 110, 110, 0.3); background: var(--white, #fff); font: inherit; font-weight: 800; font-size: 0.9rem; color: var(--teal-deep); cursor: pointer; }
.cal-foot .now, .sh-btn.p { background: linear-gradient(160deg, var(--teal), var(--teal-deep)); color: #fff; border-color: transparent; }
.sh-btn.wide { width: 100%; }
.sh-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.75rem; }
.muted2 { font-size: 0.78rem; color: var(--ink-soft); font-weight: 650; margin: 0.5rem 0 0; }
.sw { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; background: var(--bg); border-radius: 14px; padding: 0.6rem 0.75rem; margin: 0.25rem 0 0.75rem; cursor: pointer; font-weight: 800; }
.sw .tg { width: 58px; height: 34px; border-radius: 999px; background: #c5d0d6; position: relative; flex-shrink: 0; transition: background 0.15s; }
.sw .tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: left 0.15s; }
.sw[aria-checked="true"] .tg { background: var(--teal); }
.sw[aria-checked="true"] .tg::after { left: 27px; }
.fld { display: block; font-weight: 800; font-size: 0.88rem; margin: 0.5rem 0 0.25rem; color: var(--ink-soft); }
.inp { width: 100%; font: inherit; font-size: 1.25rem; font-weight: 800; border: 2px solid rgba(15, 110, 110, 0.35); border-radius: 12px; padding: 0.6rem 0.75rem; background: var(--white, #fff); color: var(--ink); }
.dchips { display: flex; gap: 0.4rem; margin: 0.5rem 0 0.25rem; }
.dchips button { flex: 1; min-height: 44px; border-radius: 12px; border: 2px solid rgba(15, 110, 110, 0.3); background: #fff; font: inherit; font-weight: 800; color: var(--teal-deep); cursor: pointer; }
.dchips button.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.cz { border: 2px solid rgba(23, 48, 66, 0.1); border-radius: 14px; padding: 0.5rem 0.6rem; margin: 0 0 0.5rem; background: #fff; }
.cz.ch { border-color: var(--teal); }
.cz.mv { border-color: var(--coral); background: #fff5ef; }
.cz-h { display: flex; justify-content: space-between; font-weight: 800; font-size: 0.8rem; color: var(--teal-deep); text-transform: uppercase; letter-spacing: 0.03em; }
.cz-d { font-weight: 800; font-size: 0.95rem; margin: 0.1rem 0 0.1rem; }
.cz-l { font-size: 0.78rem; font-weight: 650; color: var(--ink-soft); margin: 0 0 0.35rem; }
.cz-o { display: flex; flex-wrap: wrap; gap: 4px; }
.cz-o button { min-height: 40px; border-radius: 10px; border: 2px solid rgba(15, 110, 110, 0.28); background: var(--bg); font: inherit; font-weight: 800; font-size: 0.78rem; color: var(--ink); padding: 0 0.45rem; cursor: pointer; }
.cz-o button.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.cz-o button.mvb.on { background: var(--coral); border-color: var(--coral); }
.cz-list { display: flex; flex-direction: column; gap: 4px; margin-top: 0.4rem; max-height: 260px; overflow: auto; }
.cz-list button { text-align: left; min-height: 42px; border-radius: 10px; border: 2px solid rgba(15, 110, 110, 0.2); background: #fff; font: inherit; font-weight: 800; font-size: 0.85rem; padding: 0.3rem 0.6rem; cursor: pointer; }
.cz-list small { display: block; font-weight: 650; color: var(--ink-soft); }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0.5rem 0; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 2px solid rgba(15, 110, 110, 0.4); }
.shr-msg { font-size: 0.85rem; font-weight: 700; margin: 0.4rem 0 0; }
.emo-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.35rem; }
.emo-row .meal-emoji { margin-bottom: 0; }
.pc { display: inline-flex; flex-direction: column; gap: 1px; font-size: 0.74rem; font-weight: 800; color: var(--ink-soft); background: transparent; border-radius: 0; padding: 0; line-height: 1.25; text-align: left; }
/* store totals */
.tot { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.4rem; margin: 0 0 0.5rem; }
.tot button { appearance: none; border: 2px solid transparent; background: var(--bg); border-radius: 12px; padding: 0.45rem 0.3rem; text-align: center; font: inherit; font-weight: 800; font-size: 0.8rem; color: var(--ink-soft); cursor: pointer; min-height: 72px; }
.tot button b { display: block; font-size: 1.15rem; color: var(--ink); }
.tot button small { display: block; font-size: 0.72rem; font-weight: 700; }
.tot button.best { background: var(--teal-soft); color: var(--teal-deep); }
.tot button[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217, 164, 65, 0.35); }
.gnote { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); background: var(--coral-soft); border-radius: 12px; padding: 0.5rem 0.65rem; margin: 0 0 0.45rem; }
.gnote.rc { background: #fff3c4; }
.pchk { font-size: 0.78rem; font-weight: 800; color: var(--teal-deep); margin: 0 0 0.45rem; }
.pr { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 0.35rem; font-size: 0.74rem; font-weight: 800; }
.pr span { white-space: nowrap; padding: 2px 6px; border-radius: 8px; background: var(--bg); color: var(--ink-soft); }
.pr span.win { background: #d1fae5; color: #065f46; }
.pr span.stale { opacity: 0.45; text-decoration: line-through dotted; }
.pr span.src-l { background: #eef1f3; font-size: 0.7rem; }
.pr span.qty-l { background: transparent; padding-left: 0; }
.price-foot { font-size: 0.78rem; font-weight: 650; color: var(--ink-soft); margin: 0.8rem 0 0; line-height: 1.45; }
.price-foot a { color: var(--teal); }
/* ratings — bare emojis matching day-head .emoji (1.25rem), no pills */
.rate-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.85rem 0.8rem;
  flex-wrap: nowrap;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink-soft);
}
.rate-row button[data-rate] {
  appearance: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transform: none;
}
.rate-row button[data-rate][aria-pressed="true"] {
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 1;
  font-size: 1.35rem;
}
.rate-row button[data-rate]:hover,
.rate-row button[data-rate]:focus-visible {
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
  opacity: 0.85;
}
.rate-row .rate-del,
.rate-row button.rate-del {
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--coral-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.rate-row .rate-del:hover,
.rate-row .rate-del:focus-visible {
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0.8;
  outline: none;
}
.rate-row .rate-del .ico { stroke: currentColor; width: 20px; height: 20px; }
.rate-row-del-only { justify-content: flex-end; }

/* Bare emojis project-wide — no pill/chip/bg around emoji glyphs */
.fav-badge {
  display: inline;
  font-size: 1.25rem;
  font-weight: 800;
  background: none;
  color: inherit;
  border-radius: 0;
  padding: 0;
  margin-right: 0.25rem;
  vertical-align: middle;
  letter-spacing: 0;
}
.pc {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink-soft);
  background: transparent;
  border-radius: 0;
  padding: 0;
  line-height: 1.25;
  text-align: left;
}
.day-swap-badge {
  margin: 0.35rem 0 0;
  display: inline;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--coral-deep);
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.edited-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  background: transparent;
  color: var(--coral-deep);
  border-radius: 0;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cal-badge,
.pc.cal-badge {
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.day-tag {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  padding: 0;
}
.hol-mark,
.month-opt .hol-mark {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.meal-log .log-chip {
  /* text-only chips may keep style — only strip if they are emoji-led; leave text chips */
}
.ratings-panel { background: var(--white); border-radius: 20px; box-shadow: var(--shadow); padding: 0.9rem 1rem; margin: 1rem 0; }
.ratings-panel h3 { margin: 0.6rem 0 0.3rem; font-size: 0.95rem; color: var(--teal-deep); }
.ratings-panel ul { list-style: none; margin: 0; padding: 0; }
.ratings-panel li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px dashed rgba(23, 48, 66, 0.12); font-weight: 700; }
.ratings-panel li span { flex: 1; }
.ratings-panel li small { color: var(--ink-soft); font-weight: 650; }

/* v4: delete beside Swap, undo toast, photo after copy */
.del-btn { font-size: 0.95rem; padding-left: 0.55rem; padding-right: 0.55rem; letter-spacing: 0; }
.sh-btn.danger { background: #b9441c; color: #fff; border-color: transparent; }
.sh-btn:disabled { opacity: 0.45; cursor: default; }
.toast .toast-undo { margin-left: 0.7rem; background: #fff; color: var(--teal-deep); border: 0; border-radius: 10px; padding: 0.45rem 0.85rem; font: inherit; font-weight: 900; cursor: pointer; }
.copy-photo { background: var(--white); border: 2px dashed rgba(15, 110, 110, 0.35); border-radius: 16px; padding: 0.8rem 1rem; margin: 0 0 1rem; box-shadow: var(--shadow); }
.cph-t { margin: 0 0 0.5rem; font-weight: 800; color: var(--teal-deep); }
.cph-btn { width: 100%; }
.cph-th img { width: 100% !important; height: auto !important; max-height: 240px; object-fit: cover; }

/* ===== CRITICAL: monochrome line SVG icons (prevents black filled blobs) ===== */
.ico {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  fill: none !important;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
  pointer-events: none;
}
.ico * {
  fill: none !important;
  stroke: inherit;
  stroke-width: inherit;
  stroke-linecap: inherit;
  stroke-linejoin: inherit;
}
/* filled dots on cart icon only — keep stroke circles */
.ico circle[r="1.5"] {
  fill: currentColor !important;
  stroke: none;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.rcpt-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  position: relative;
}
.back-link {
  appearance: none;
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  border-radius: 0;
  padding: 0 0.45rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.back-link .ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}
.back-link:hover,
.back-link:focus-visible {
  opacity: 0.85;
  outline: none;
}
.back-link[hidden] { display: none !important; }

/* Suggested sides on day cards — plain text taps, no emoji-in-chip */
.sides-block {
  padding: 0 0.85rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.sides-block .sides-lbl {
  display: block;
  margin: 0.35rem 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.sides-block .sides-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
}
.sides-block .side-add {
  appearance: none;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0.35rem 0.15rem;
  min-height: 44px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.sides-block .side-add:hover,
.sides-block .side-add:focus-visible {
  opacity: 0.85;
  outline: none;
}
.sides-block .side-add.is-on {
  color: var(--ink);
  text-decoration: none;
  cursor: default;
}
.sides-block .side-add.is-on::after {
  content: " ✓";
  font-weight: 800;
  color: var(--teal);
}
.sides-block .sides-added {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.rcpt-btn.icon-btn {
  color: #fff;
}
.rcpt-btn .ico {
  stroke: #fff;
  width: 20px;
  height: 20px;
}
.gear-btn {
  appearance: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--teal-deep);
  cursor: pointer;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gear-btn:hover,
.gear-btn:focus-visible {
  opacity: 0.85;
  outline: none;
}
.gear-btn .ico { width: 20px; height: 20px; stroke: currentColor; }

.cal-btn.icon-btn,
.repeat-btn.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 2px solid var(--teal);
  border-radius: 14px;
  background: var(--white);
  color: var(--teal-deep);
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(15, 110, 110, 0.16);
  font-size: 0; /* hide any leftover glyph */
}
.cal-btn .ico,
.repeat-btn .ico {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.cal-btn:focus-visible,
.repeat-btn:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

.month-arrow.icon-btn {
  appearance: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--teal-deep);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.month-arrow .ico {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.month-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
}
.month-name-btn {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 800;
  color: var(--teal-deep);
  cursor: pointer;
  min-height: 40px;
  padding: 0.25rem 0.45rem;
}
.month-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 8;
  background: #fff;
  border: 2px solid rgba(15, 110, 110, 0.25);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 12rem;
  padding: 0.25rem;
}
.month-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-align: left;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}
.month-menu .ico { stroke: currentColor; }

.btn.icon-btn .ico {
  stroke: currentColor;
  width: 18px;
  height: 18px;
}
.btn-primary.icon-btn .ico { stroke: #fff; }

.cart-btn.icon-btn {
  appearance: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
.cart-btn .ico { stroke: #fff; width: 20px; height: 20px; }

.hero-card {
  text-align: center;
  padding: 1rem 1rem 1.1rem;
  margin: 0 0 1rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 110, 110, 0.18), transparent 42%),
    radial-gradient(circle at 90% 20%, rgba(212, 87, 42, 0.14), transparent 40%),
    linear-gradient(165deg, #fffaf4 0%, #e7f4ef 55%, #f7efe4 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 110, 110, 0.12);
}
.week-label-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* First-visit welcome overlay — teal/coral Burns look */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 18% 12%, rgba(15, 110, 110, 0.28), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(212, 87, 42, 0.22), transparent 40%),
    rgba(23, 48, 66, 0.58);
  backdrop-filter: blur(2px);
}
.welcome-overlay[hidden] {
  display: none !important;
}
.welcome-card {
  width: min(100%, 420px);
  max-height: min(88vh, 640px);
  overflow: auto;
  padding: 1.15rem 1.1rem 1.25rem;
  border-radius: 20px;
  background:
    linear-gradient(165deg, #fffaf4 0%, #e8f5f0 55%, #fff4ea 100%);
  border: 2px solid rgba(15, 110, 110, 0.22);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.welcome-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.welcome-hello {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: clamp(1.65rem, 5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
  line-height: 1.1;
}
.welcome-sub,
.welcome-q {
  margin: 0 0 0.85rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.welcome-q {
  color: var(--ink);
  font-size: 1.05rem;
}
.welcome-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}
.welcome-opt {
  appearance: none;
  border: 2px solid rgba(15, 110, 110, 0.28);
  background: var(--white);
  color: var(--teal-deep);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  min-height: 44px;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: none;
}
.welcome-opt:hover,
.welcome-opt:focus-visible {
  border-color: var(--teal);
  outline: none;
}
.welcome-opt.on,
.welcome-opt.primary {
  background: linear-gradient(160deg, var(--teal), var(--teal-deep));
  color: #fff;
  border-color: transparent;
}
.welcome-opt.primary {
  width: 100%;
  margin-top: 0.35rem;
}
.welcome-mic,
.welcome-mute {
  color: var(--teal-deep);
  text-decoration: none;
  border: 2px solid rgba(15, 110, 110, 0.22);
  border-radius: 12px;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.75);
}
.welcome-mic .ico,
.welcome-mute .ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}
.welcome-mic:hover,
.welcome-mute:hover,
.welcome-mic:focus-visible,
.welcome-mute:focus-visible {
  border-color: var(--coral);
  opacity: 1;
}

/* More swap batches */
.swap-more-wrap {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.5rem;
}
.swap-more-btn {
  appearance: none;
  width: 100%;
  min-height: 48px;
  border: 2px solid rgba(15, 110, 110, 0.3);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--teal-deep);
  cursor: pointer;
}
.swap-more-btn:hover,
.swap-more-btn:focus-visible {
  border-color: var(--teal);
  outline: none;
}
.swap-more-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Local food autocomplete — plain list, no pills */
.food-ac-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.custom-add .food-ac-wrap {
  flex: 1 1 12rem;
  min-width: 10rem;
}
.food-ac-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 30;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 2px solid rgba(15, 110, 110, 0.28);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.food-ac-list[hidden] {
  display: none !important;
}
.food-ac-item {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.55rem 0.75rem;
  min-height: 40px;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  cursor: pointer;
}
.food-ac-item:hover,
.food-ac-item:focus-visible,
.food-ac-item.is-active {
  background: var(--teal-soft);
  color: var(--teal-deep);
  outline: none;
}
.food-ac-empty {
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ink-soft);
}

/* Quiet per-day list jump — plain text like Swap/Back */
.list-link {
  appearance: none;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  border-radius: 0;
  padding: 0 0.35rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.85;
}
.list-link .ico { width: 14px; height: 14px; stroke: currentColor; }
.list-link:hover, .list-link:focus-visible { opacity: 1; outline: none; }

.sides-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
.side-tile {
  appearance: none;
  border: 2px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 4px;
  width: 76px;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  box-shadow: none;
}
.side-tile img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 10px;
  display: block; margin: 0 auto 4px;
  border: 2px solid rgba(15, 110, 110, 0.2); background: var(--bg, #eef6f2);
}
.side-tile .emo-fb { font-size: 28px; line-height: 64px; height: 64px; display: block; margin: 0 auto 4px; }
.side-tile .sn { display: block; font-size: 0.68rem; font-weight: 800; line-height: 1.2; color: var(--ink); }
.side-tile.is-on { border-color: var(--teal); }
.side-tile.is-on img { outline: 2px solid var(--teal); outline-offset: 1px; }
.side-tile.is-on .sn::after { content: " ✓"; color: var(--teal); }
.side-credits { font-size: 0.65rem; font-weight: 650; color: var(--ink-soft); margin: 0.25rem 0 0; padding: 0 0.85rem; }
.month-hol-strip { display: none !important; }

/* Shuffle — plain text link + line ico (not a pill) */
.shuffle-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0.35rem 0 0;
}
.shuffle-link {
  appearance: none;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0.35rem 0.25rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--teal-deep, #0f6e6e);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.shuffle-link .ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}
.shuffle-link:hover, .shuffle-link:focus-visible { opacity: 0.9; outline: none; }

.week-actions-row { align-items: center; gap: 0.5rem; }
.week-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; margin-left: auto; }
.week-text-link, .shuffle-link {
  appearance: none; border: none; background: transparent; box-shadow: none; border-radius: 0;
  padding: 0.35rem 0.15rem; min-height: 44px; display: inline-flex; align-items: center; gap: 0.3rem;
  cursor: pointer; font: inherit; font-size: 0.85rem; font-weight: 800;
  color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px;
}
.week-text-link .ico, .shuffle-link .ico { width: 16px; height: 16px; stroke: currentColor; }

/* Month plan — compact nav + hold hint */
.templates {
  padding-top: 0.35rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}
.month-plan-head {
  margin: 0 0 0.25rem;
}
.month-title-row {
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  min-height: 0;
}
.month-ctrl {
  gap: 0;
  margin: 0;
}
.month-name-btn {
  min-height: 44px;
  padding: 0.15rem 0.25rem;
}
.month-hold-hint {
  margin: 0.1rem 0 0.35rem;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.2;
}
.month-grid {
  margin-top: 0.15rem;
  gap: 0.45rem;
}

/* Items 41–42 stock photos */
.stock-panel{margin:1.25rem 0 1.5rem}
.stock-panel .section-title{margin-bottom:.5rem}
.stock-photos.photos,.photos.stock-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin:0}
.ph-sec{position:relative;border:2px dashed rgba(15,110,110,.35);border-radius:14px;padding:10px 8px 8px;display:flex;flex-direction:column;gap:6px;min-height:140px;text-align:center;background:var(--card,#fffaf4)}
.ph-sec.done{border-color:var(--teal,#0f6e6e)}
.ph-sec-lab{font-size:13px;font-weight:800;color:var(--ink,#173042);line-height:1.2}
.ph-sec-lab .big{display:block;font-size:28px;margin-bottom:2px}
.ph-thumbs{display:flex;flex-wrap:wrap;gap:5px;justify-content:center;align-items:center}
.ph-thumb{position:relative;width:56px;height:56px;border-radius:8px;overflow:hidden;border:2px solid rgba(15,110,110,.3);flex-shrink:0}
.ph-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.ph-thumb .ph-x{position:absolute;top:0;right:0;width:28px;height:28px;border:0;border-radius:0;background:transparent;box-shadow:none;color:#000;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;line-height:0}
.ph-thumb .ph-x .ico{width:14px;height:14px;stroke:#000}
.ph-add{appearance:none;border:2px solid rgba(15,110,110,.4);background:var(--white,#fffaf4);color:var(--ink,#173042);width:36px;height:36px;min-height:36px;min-width:36px;border-radius:50%;padding:0;margin:0;font:inherit;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:none;gap:0}
.ph-add .ico{width:18px;height:18px;stroke:currentColor;display:block}
.ph-add-sec{appearance:none;border:2px dashed rgba(15,110,110,.35);border-radius:14px;background:transparent;color:var(--muted,#5b6b7a);min-height:140px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;cursor:pointer;font:inherit;font-weight:800;font-size:13px}
.ph-add-sec .ico{width:22px;height:22px;stroke:currentColor}
.ph-sec-del{appearance:none;position:absolute;top:4px;right:4px;width:24px;height:24px;border:0;border-radius:50%;background:rgba(15,23,42,.7);color:#fff;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer}
.ph-new-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px;align-items:center}
.ph-new-row input{flex:1 1 140px;min-height:44px;border-radius:12px;border:2px solid rgba(15,110,110,.28);background:#fff;color:inherit;padding:10px;font:inherit;font-weight:700}


/* Theme dark (default via html data-theme) */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --card: #152033;
  --ink: #e8eef6;
  --muted: #9aa8b8;
  --teal: #2dd4bf;
  --teal-deep: #5eead4;
  --teal-soft: rgba(45,212,191,.16);
  --cream: #152033;
  --line: rgba(255,255,255,.1);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .day-card,
html[data-theme="dark"] .gpanel,
html[data-theme="dark"] .week-review-panel,
html[data-theme="dark"] .ratings-panel,
html[data-theme="dark"] .grocery-panel,
html[data-theme="dark"] .stock-panel,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .sheet,
html[data-theme="dark"] .month-opt { background: var(--card); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .brand { color: var(--ink); }
html[data-theme="dark"] .muted2, html[data-theme="dark"] .tagline, html[data-theme="dark"] .footer-note { color: var(--muted); }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea {
  background: #0b1220; color: var(--ink); border-color: rgba(45,212,191,.35);
}
html[data-theme="light"] { color-scheme: light; }

.wst-row{display:flex;flex-wrap:wrap;gap:.6rem;margin:.4rem 0 .75rem}
.wst-row > div{flex:1 1 90px;background:rgba(15,110,110,.08);border-radius:12px;padding:.55rem .65rem;text-align:center}
.wst-row b{display:block;font-size:1.05rem}
.wst-row small{display:block;font-size:.72rem;font-weight:700;opacity:.75}
.wr-hi{margin:.25rem 0 .75rem;padding-left:1.1rem}
html[data-theme="dark"] .wst-row > div{background:rgba(45,212,191,.12)}

#del-custom-cat[hidden], .aisle-cat-del[hidden] { display: none !important; }

/* === Urgent dark contrast pass (Light mode unchanged) === */
html[data-theme="dark"] {
  --white: #152033;
  --bg-deep: #0f1a2a;
  --ink-soft: #9aa8b8;
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .howto,
html[data-theme="dark"] .plan-note,
html[data-theme="dark"] .month-grid .month-opt,
html[data-theme="dark"] .month-opt,
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .day-card,
html[data-theme="dark"] .grocery-panel,
html[data-theme="dark"] .stock-panel,
html[data-theme="dark"] .week-review-panel,
html[data-theme="dark"] .ratings-panel,
html[data-theme="dark"] .sheet .panel,
html[data-theme="dark"] .sheet-bg .panel,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .custom-add {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .howto h2,
html[data-theme="dark"] .month-opt,
html[data-theme="dark"] .month-opt strong,
html[data-theme="dark"] .month-opt b,
html[data-theme="dark"] .brand,
html[data-theme="dark"] .day-card .dinner,
html[data-theme="dark"] label {
  color: var(--ink);
}
html[data-theme="dark"] .howto .sync-note,
html[data-theme="dark"] .muted2,
html[data-theme="dark"] .footer-note,
html[data-theme="dark"] .plan-note {
  color: var(--muted);
}
html[data-theme="dark"] .chip-btn,
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .sh-btn,
html[data-theme="dark"] .cal-foot button,
html[data-theme="dark"] .meta-chip,
html[data-theme="dark"] .dchips button {
  background: #0b1220;
  color: var(--ink);
  border-color: rgba(45, 212, 191, 0.35);
}
html[data-theme="dark"] .chip-btn.is-on,
html[data-theme="dark"] .sh-btn.p,
html[data-theme="dark"] .btn-ghost[aria-pressed="true"],
html[data-theme="dark"] .dchips button.on {
  background: var(--teal);
  color: #041016;
  border-color: transparent;
}
html[data-theme="dark"] .sh-btn:not(.p) {
  color: var(--teal-deep);
}
html[data-theme="dark"] .inp,
html[data-theme="dark"] .grocery-search,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="search"] {
  background: #0b1220;
  color: var(--ink);
  border-color: rgba(45, 212, 191, 0.35);
}
html[data-theme="dark"] .item,
html[data-theme="dark"] .item-list li {
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .aisle-fold > summary {
  color: var(--teal-deep);
  border-bottom-color: rgba(45, 212, 191, 0.25);
}
html[data-theme="dark"] .tot .best,
html[data-theme="dark"] .tot div {
  background: rgba(45, 212, 191, 0.12);
  color: var(--ink);
}
html[data-theme="dark"] .tot b { color: var(--ink); }
html[data-theme="dark"] .share-list-link,
html[data-theme="dark"] .share-app-link { color: var(--teal-deep); }
html[data-theme="dark"] .set-block { border-bottom-color: rgba(255,255,255,.12); }
html[data-theme="dark"] .set-block h4 { color: var(--ink); }
html[data-theme="dark"] .sw { background: #0b1220; color: var(--ink); }
html[data-theme="dark"] .fld { color: var(--muted); }
html[data-theme="dark"] #grocery-sms[hidden] { display: none !important; }
html[data-theme="dark"] .month-opt .hol-mark { color: var(--muted); }
html[data-theme="dark"] .budget-pill.is-off { background: #0b1220; color: var(--muted); border-color: var(--line); }

html[data-theme="dark"] #shop-mode,
html[data-theme="dark"] #reset-checks,
html[data-theme="dark"] .btn-ghost {
  background: #0b1220;
  color: #e8eef6;
  border-color: rgba(45,212,191,.4);
}
html[data-theme="dark"] .btn-ghost[aria-pressed="true"] {
  background: var(--teal);
  color: #041016;
  border-color: transparent;
}
html[data-theme="dark"] .sh-btn:not(.p):not(.danger) {
  background: #0b1220;
  color: #5eead4;
  border-color: rgba(45,212,191,.4);
}
html[data-theme="dark"] .settings-modal,
html[data-theme="dark"] #settings-modal,
html[data-theme="dark"] .modal-card {
  background: var(--card);
  color: var(--ink);
}
html[data-theme="dark"] .month-opt.is-on {
  outline: 2px solid var(--teal);
}
html[data-theme="dark"] .month-opt .meal-line,
html[data-theme="dark"] .month-opt {
  color: #e8eef6;
}

html[data-theme="dark"] .modal-settings,
html[data-theme="dark"] .modal {
  background: var(--card);
  color: var(--ink);
}
html[data-theme="dark"] .modal h3,
html[data-theme="dark"] .modal .day-sub { color: var(--ink); }
html[data-theme="dark"] .modal .day-sub { color: var(--teal-deep); }
html[data-theme="dark"] .close-btn { background: #0b1220; color: var(--ink); }

/* fix-round: tot full-width + sync-note dark */
.store-totals .tot,
.gpanel .tot,
.tot {
  grid-template-columns: 1fr;
}
.store-totals .tot .best,
.tot .best {
  text-align: left;
  padding: 0.65rem 0.9rem;
  min-height: auto;
}
html[data-theme="dark"] .sync-note,
html[data-theme="dark"] .howto .sync-note {
  background: rgba(251, 146, 60, 0.18);
  color: #ffe8cc;
  border: 1px solid rgba(251, 146, 60, 0.4);
}
html[data-theme="dark"] {
  --coral-soft: rgba(251, 146, 60, 0.18);
}
