:root {
  color-scheme: light dark;
  --bg: #0b0c10;
  --panel: #141622;
  --panel-2: #10121a;
  --text: #eef0ff;
  --muted: rgba(238, 240, 255, 0.7);
  --border: rgba(238, 240, 255, 0.14);
  --accent: #7c5cff;
  --accent-2: #2dd4bf;
  --danger: #ff4d6d;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --panel-2: #fafaff;
    --text: #12131a;
    --muted: rgba(18, 19, 26, 0.65);
    --border: rgba(18, 19, 26, 0.12);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }
}
body[data-scheme="light"] {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #fafaff;
  --text: #12131a;
  --muted: rgba(18, 19, 26, 0.65);
  --border: rgba(18, 19, 26, 0.1);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}
body[data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0b0c10;
  --panel: #141622;
  --panel-2: #10121a;
  --text: #eef0ff;
  --muted: rgba(238, 240, 255, 0.7);
  --border: rgba(238, 240, 255, 0.14);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  position: relative;
  isolation: isolate;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      1200px 700px at 20% 0%,
      rgba(124, 92, 255, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 90% 20%,
      rgba(45, 212, 191, 0.14),
      transparent 55%
    );
  background-repeat: no-repeat;
}
header {
  padding: 18px 18px 8px;
  width: 100%;
}
.appnav {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
  position: relative;
}

.appnav__desktop {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.appnav__mobile {
  display: none;
}

.appnav a,
.appnav span,
.appnav__summary {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
}

.appnav__summary {
  cursor: pointer;
  list-style: none;
  gap: 8px;
}

.appnav__summary::-webkit-details-marker {
  display: none;
}

.appnav__summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 140ms ease;
}

.appnav__mobile[open] .appnav__summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.appnav span[aria-current="page"] {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 26%, var(--border));
}

.appnav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08)),
    color-mix(in srgb, var(--panel) 94%, white);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  z-index: 15;
}

.appnav__menu a,
.appnav__menu span {
  justify-content: space-between;
}
.topbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.title {
  display: grid;
  gap: 4px;
}
h1 {
  font-size: 18px;
  margin: 0;
  letter-spacing: 0.2px;
}
.subtitle {
  font-size: 13px;
  color: var(--muted);
}
.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.weekactions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.weekactions__group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.weekactions__divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  opacity: 0.65;
}
button.primary {
  border-color: color-mix(in oklab, var(--accent) 55%, var(--border));
  background: var(--accent);
  color: #fff;
}
@supports not (color: color-mix(in oklab, white, black)) {
  button.primary {
    border-color: rgba(124, 92, 255, 0.7);
  }
}
button.primary:hover {
  border-color: var(--accent);
  filter: brightness(1.05);
}
button.primary:active {
  filter: brightness(0.98);
}
.weekactions button {
  padding: 9px 11px;
}
.weekactions #fillRemaining {
  flex: 1 1 260px;
  justify-content: flex-start;
}
@media (max-width: 560px) {
  .weekactions {
    gap: 8px;
  }
  .weekactions__divider {
    display: none;
  }
  .weekactions button {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }
  .weekactions #fillRemaining {
    flex: 1 1 100%;
    justify-content: center;
  }
}
button {
  appearance: none;
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0)
  );
  color: var(--text);
  padding: 9px 11px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
button:hover {
  border-color: rgba(124, 92, 255, 0.45);
}
button:active {
  transform: translateY(1px);
}
.weeklabel {
  padding: 9px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.04);
}
.themecontrol {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}
.themelabel {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
select {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 9px 30px 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  line-height: 1;
  font-size: 12px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(238, 240, 255, 0.75) 50%),
    linear-gradient(135deg, rgba(238, 240, 255, 0.75) 50%, transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%,
    0 0;
  background-size:
    5px 5px,
    5px 5px,
    100% 100%;
  background-repeat: no-repeat;
}
@media (prefers-color-scheme: light) {
  select {
    background-image:
      linear-gradient(45deg, transparent 50%, rgba(18, 19, 26, 0.7) 50%),
      linear-gradient(135deg, rgba(18, 19, 26, 0.7) 50%, transparent 50%),
      linear-gradient(180deg, rgba(18, 19, 26, 0.06), rgba(18, 19, 26, 0));
  }
}
body[data-scheme="light"] select {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(18, 19, 26, 0.7) 50%),
    linear-gradient(135deg, rgba(18, 19, 26, 0.7) 50%, transparent 50%),
    linear-gradient(180deg, rgba(18, 19, 26, 0.06), rgba(18, 19, 26, 0));
}
body[data-scheme="dark"] select {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(238, 240, 255, 0.75) 50%),
    linear-gradient(135deg, rgba(238, 240, 255, 0.75) 50%, transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}
select:hover {
  border-color: rgba(124, 92, 255, 0.45);
}
select:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.45);
  outline-offset: 2px;
}

#toggleFavOnly[aria-pressed="true"] {
  border-color: rgba(255, 204, 77, 0.6);
  background: rgba(255, 204, 77, 0.1);
  color: rgba(255, 229, 153, 0.98);
}
@media (prefers-color-scheme: light) {
  #toggleFavOnly[aria-pressed="true"] {
    border-color: rgba(255, 167, 38, 0.45);
    background: rgba(255, 167, 38, 0.12);
    color: rgba(121, 63, 0, 0.95);
  }
}
body[data-scheme="light"] #toggleFavOnly[aria-pressed="true"] {
  border-color: rgba(255, 167, 38, 0.45);
  background: rgba(255, 167, 38, 0.12);
  color: rgba(121, 63, 0, 0.95);
}
body[data-scheme="dark"] #toggleFavOnly[aria-pressed="true"] {
  border-color: rgba(255, 204, 77, 0.6);
  background: rgba(255, 204, 77, 0.1);
  color: rgba(255, 229, 153, 0.98);
}

body[data-theme="refined"] {
  --border: rgba(238, 240, 255, 0.1);
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
@media (prefers-color-scheme: light) {
  body[data-theme="refined"] {
    --border: rgba(18, 19, 26, 0.1);
    --shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  }
}
body[data-scheme="light"][data-theme="refined"] {
  --border: rgba(18, 19, 26, 0.1);
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}
body[data-scheme="dark"][data-theme="refined"] {
  --border: rgba(238, 240, 255, 0.1);
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
body[data-theme="refined"] .panel {
  background: var(--panel);
}
body[data-theme="refined"] .panel header {
  padding: 12px 12px 8px;
}
body[data-theme="refined"] .panel .body {
  padding: 10px 12px 12px;
}
body[data-theme="refined"] .list {
  gap: 6px;
}
body[data-theme="refined"] .meal {
  padding: 10px;
  border-left-width: 4px;
}
body[data-theme="refined"] .day {
  background: rgba(255, 255, 255, 0.02);
}
body[data-theme="refined"] .dayhead {
  padding: 10px 10px 8px;
  background: rgba(255, 255, 255, 0.02);
}
body[data-theme="refined"] .daybody {
  padding: 10px;
  gap: 8px;
}
body[data-theme="refined"] .inginline {
  gap: 6px;
}
body[data-theme="refined"] .ingtoken {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 22px 4px 10px;
}
body[data-theme="refined"] .ingx {
  right: 5px;
  width: 16px;
  height: 16px;
  font-size: 13px;
}
body[data-theme="refined"] .colorpick {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}
body[data-theme="refined"] .colorpick::-webkit-color-swatch,
body[data-theme="refined"] .colorpick::-moz-color-swatch {
  border-radius: 8px;
}

body[data-theme="outlined"] {
  --border: rgba(238, 240, 255, 0.2);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}
@media (prefers-color-scheme: light) {
  body[data-theme="outlined"] {
    --border: rgba(18, 19, 26, 0.18);
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
  }
}
body[data-scheme="light"][data-theme="outlined"] {
  --border: rgba(18, 19, 26, 0.18);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
}
body[data-scheme="dark"][data-theme="outlined"] {
  --border: rgba(238, 240, 255, 0.2);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}
body[data-theme="outlined"] .panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    var(--panel);
}
body[data-theme="outlined"] .calendar {
  padding: 16px;
}
body[data-theme="outlined"] .day {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}
body[data-theme="outlined"] .dayhead {
  background: rgba(0, 0, 0, 0.12);
  border-bottom-color: var(--border);
}
@media (prefers-color-scheme: light) {
  body[data-theme="outlined"] .dayhead {
    background: rgba(18, 19, 26, 0.04);
  }
}
body[data-scheme="light"][data-theme="outlined"] .dayhead {
  background: rgba(18, 19, 26, 0.04);
}
body[data-scheme="dark"][data-theme="outlined"] .dayhead {
  background: rgba(0, 0, 0, 0.12);
}
body[data-theme="outlined"] .weekactions {
  border-top: 0;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
body[data-theme="outlined"] .meal {
  border-color: rgba(238, 240, 255, 0.18);
  border-left-width: 8px;
  background: var(--panel-2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
@media (prefers-color-scheme: light) {
  body[data-theme="outlined"] .meal {
    border-color: rgba(18, 19, 26, 0.14);
    border-left-width: 8px;
    background: var(--panel-2);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
  }
}
body[data-scheme="light"][data-theme="outlined"] .meal {
  border-color: rgba(18, 19, 26, 0.14);
  border-left-width: 8px;
  background: var(--panel-2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}
body[data-scheme="dark"][data-theme="outlined"] .meal {
  border-color: rgba(238, 240, 255, 0.18);
  border-left-width: 8px;
  background: var(--panel-2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
@supports (color: color-mix(in oklab, white, black)) {
  body[data-theme="outlined"] .meal {
    background:
      linear-gradient(
        90deg,
        color-mix(in oklab, var(--meal-color, var(--accent)) 28%, transparent),
        transparent 62%
      ),
      var(--panel-2);
  }
}
body[data-theme="outlined"] .mealrow .btns {
  gap: 10px;
}
body[data-theme="outlined"] .mealcontrols {
  gap: 10px;
}
body[data-theme="outlined"] .ingtoken {
  border-color: rgba(238, 240, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
}
main {
  width: 100%;
  padding: 10px 18px 22px;
}
.syncstatus {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 193, 7, 0.08);
  color: var(--text);
  box-shadow: var(--shadow);
}
.syncstatus[data-tone="error"] {
  border-color: rgba(255, 77, 109, 0.45);
  background: rgba(255, 77, 109, 0.08);
}
.syncstatus[data-tone="warning"] {
  border-color: rgba(255, 193, 7, 0.42);
  background: rgba(255, 193, 7, 0.08);
}
.syncstatus[data-tone="info"] {
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(45, 212, 191, 0.08);
}
.layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 14px;
}
.layout.is-sidebar-collapsed {
  grid-template-columns: 1fr;
}
.layout.is-sidebar-collapsed .sidebar {
  display: none;
}
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
}
.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel header {
  padding: 14px 14px 10px;
  margin: 0;
}
.paneltitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel h2 {
  font-size: 14px;
  margin: 0;
  letter-spacing: 0.2px;
}
.panel .body {
  padding: 12px 14px 14px;
}
.hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.add {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-bottom: 10px;
}
input[type="text"] {
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}
input[type="text"]::placeholder {
  color: rgba(238, 240, 255, 0.55);
}
@media (prefers-color-scheme: light) {
  input[type="text"]::placeholder {
    color: rgba(18, 19, 26, 0.45);
  }
}
body[data-scheme="light"] input[type="text"]::placeholder {
  color: rgba(18, 19, 26, 0.45);
}
body[data-scheme="dark"] input[type="text"]::placeholder {
  color: rgba(238, 240, 255, 0.55);
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  min-height: 46px;
}
.dropzone {
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(124, 92, 255, 0.35);
  background: rgba(124, 92, 255, 0.06);
}
.dropzone.dragover {
  border-color: rgba(45, 212, 191, 0.65);
  background: rgba(45, 212, 191, 0.08);
}
.day .dropzone {
  padding: 0;
  border: 0;
  background: transparent;
}
.day .dropzone.dragover {
  padding: 10px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.tabswrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.tabswrap .tabs {
  flex: 1;
  margin-bottom: 0;
}
.tabs .tab {
  flex: 1;
  justify-content: center;
  padding: 8px 10px;
}
.tabs .tab[aria-selected="true"] {
  border-color: rgba(124, 92, 255, 0.55);
  background: rgba(124, 92, 255, 0.08);
}

.recipeshead {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

#ideasZone,
#libraryZone {
  max-height: min(52vh, 540px);
  overflow: auto;
  scrollbar-gutter: stable;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: stretch;
}
.modal[hidden] {
  display: none;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.modal__panel {
  position: relative;
  margin: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    var(--panel);
  border: 0;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 14px;
  overflow: hidden;
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.modal__title {
  font-size: 14px;
  letter-spacing: 0.2px;
  color: var(--text);
}
.modal__body {
  padding-top: 12px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body.modal-open {
  overflow: hidden;
}

.modal #recipesPane {
  height: auto;
}
.modal .recipeshead {
  position: sticky;
  top: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    var(--panel);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.modal #ideasZone,
.modal #libraryZone {
  max-height: none;
  height: auto;
  overflow: visible;
}

.searchbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin: 10px 0 6px;
}
.searchmeta {
  min-height: 18px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.searchresults {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.searchresults.is-open {
  display: block;
}
.searchresults li + li {
  border-top: 1px solid var(--border);
}
.searchresults button {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 10px 10px;
  background: transparent;
  box-shadow: none;
  justify-content: space-between;
}
.searchresults button:hover {
  background: rgba(124, 92, 255, 0.06);
}
.srch-title {
  font-size: 13px;
  text-align: left;
}
.srch-ing {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-left: 12px;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meal {
  display: grid;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-left: 6px solid var(--meal-color, var(--accent));
  background: var(--panel-2);
}
@supports (color: color-mix(in oklab, white, black)) {
  .meal {
    background:
      linear-gradient(
        90deg,
        color-mix(in oklab, var(--meal-color, var(--accent)) 18%, transparent),
        transparent 55%
      ),
      var(--panel-2);
  }
}
.meal[draggable="true"] {
  cursor: default;
}
.mealrow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.mealrow.controls {
  grid-template-columns: 1fr auto auto;
  align-items: center;
  min-width: 0;
}
.mealcontrols {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Recept link (onder ingrediënten), zichtbaar bij hover */
.recipelink {
  margin-top: 0;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 160ms ease,
    opacity 160ms ease,
    transform 160ms ease,
    margin-top 160ms ease;
}
.meal:hover .recipelink,
.meal:focus-within .recipelink {
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: none;
  max-height: 80px;
  overflow: visible;
}
.recipelink a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 10px;
  max-width: 100%;
  text-decoration: none;
  pointer-events: auto;
}
.recipelink a:hover,
.recipelink a:focus-visible {
  color: var(--text);
  border-color: rgba(124, 92, 255, 0.45);
}
.recipelink__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (hover: none) {
  .recipelink {
    margin-top: 8px;
    opacity: 1;
    transform: none;
    pointer-events: none;
    max-height: none;
    overflow: visible;
  }
}
@media (prefers-reduced-motion: reduce) {
  .recipelink {
    transition: none;
    transform: none;
  }
}

/* Receptenpaneel (links + fullscreen): tekst volledig breed, opties schuiven onderuit bij hover */
#recipesPane li.meal .mealrow.controls {
  grid-template-columns: 1fr;
  align-items: flex-start;
}
#recipesPane li.meal .mealrow.controls .mealtoolsrow {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  margin-top: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    max-height 180ms ease,
    opacity 160ms ease,
    transform 160ms ease,
    margin-top 160ms ease;
}
#recipesPane li.meal:hover .mealrow.controls .mealtoolsrow,
#recipesPane li.meal:focus-within .mealrow.controls .mealtoolsrow {
  max-height: 60px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 8px;
  overflow: visible;
  pointer-events: auto;
}
@media (hover: none) {
  #recipesPane li.meal .mealrow.controls .mealtoolsrow {
    max-height: 100px;
    opacity: 1;
    transform: none;
    margin-top: 8px;
    overflow: visible;
    pointer-events: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  #recipesPane li.meal .mealrow.controls .mealtoolsrow {
    transition: none;
    transform: none;
  }
}
.mealrow .btns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mealrow.simple {
  grid-template-columns: 1fr;
}
.mealrow.recipe {
  grid-template-columns: 1fr auto;
}
.meal[draggable="true"] .mealrow {
  cursor: grab;
}
.meal[draggable="true"] .mealrow:active {
  cursor: grabbing;
}
.meal .text {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

/* In de week (day items): toon opties pas bij hover */
.calendar {
  --week-meal-height: 150px;
}
.calendar li.meal[data-kind="item"] .text {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.18;
}
.calendar li.meal[data-kind="item"] .mealrow {
  grid-template-columns: 1fr;
  align-items: flex-start;
  position: relative;
  padding-right: 0;
}
.calendar li.meal[data-kind="item"] .mealrow .text {
  padding-right: 0;
  transition: padding-right 160ms ease;
}
.calendar li.meal[data-kind="item"] .mealcontrols {
  position: absolute;
  top: 0;
  right: 0;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}
.calendar li.meal[data-kind="item"]:hover .mealcontrols,
.calendar li.meal[data-kind="item"]:focus-within .mealcontrols {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.calendar li.meal[data-kind="item"]:hover .mealrow .text,
.calendar li.meal[data-kind="item"]:focus-within .mealrow .text {
  padding-right: 200px;
}
@media (hover: none) {
  .calendar li.meal[data-kind="item"] .mealcontrols {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .calendar li.meal[data-kind="item"] .mealcontrols,
  .calendar li.meal[data-kind="item"] .mealrow .text {
    transition: none;
    transform: none;
  }
}

/* In de week (day items): gelijke hoogte voor alle gerechten */
@media (hover: hover) {
  .calendar li.meal[data-kind="item"] {
    min-height: var(--week-meal-height);
    height: var(--week-meal-height);
    display: flex;
    flex-direction: column;
  }
  .calendar li.meal[data-kind="item"]:hover,
  .calendar li.meal[data-kind="item"]:focus-within {
    /* Keep equal-height cards by default, but expand while interacting
       so link + ingredient form can both stay usable. */
    height: auto;
  }
  .calendar li.meal[data-kind="item"] .ingopen {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(#000 0%, #000 78%, transparent 100%);
    mask-image: linear-gradient(#000 0%, #000 78%, transparent 100%);
  }
  .calendar li.meal[data-kind="item"]:hover .ingopen,
  .calendar li.meal[data-kind="item"]:focus-within .ingopen {
    overflow: auto;
    scrollbar-width: thin;
    overscroll-behavior: contain;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* In de week (day items): ingredient toevoegen pas bij hover */
.calendar li.meal[data-kind="item"] .ingadd {
  display: none;
}
.calendar li.meal[data-kind="item"]:hover .ingadd,
.calendar li.meal[data-kind="item"]:focus-within .ingadd {
  display: grid;
}
@media (hover: none) {
  .calendar li.meal[data-kind="item"] .ingadd {
    display: grid;
  }
}

/* In het weekoverzicht: grotere ingredient-tags */
.calendar li.meal[data-kind="item"] .ingtoken {
  height: 30px;
  padding: 0 26px 0 10px;
}
.calendar li.meal[data-kind="item"] .ingname {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ingredients {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 8px;
}
.inglist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.ingitem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 2px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  font-size: 12px;
}
.ingitem:first-child {
  border-top: 0;
  padding-top: 0;
}
.ingitem .iconbtn {
  border-color: transparent;
  background: transparent;
  padding: 4px 6px;
}
.ingitem .iconbtn:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}
.ingadd {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.ingadd .iconbtn {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.04);
}
.ingadd .iconbtn:hover {
  border-color: var(--border);
}
.ingadd input[type="text"] {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.ingopen {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 8px;
}

body.hide-left-ingredients #recipesPane .ingredients,
body.hide-left-ingredients #recipesPane .ingopen {
  display: none !important;
}

body.hide-week-ingredients .calendar .ingopen {
  display: none !important;
}
.inginline {
  font-size: 12px;
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.ingtoken {
  display: inline-flex;
  align-items: center;
  position: relative;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 5px 26px 5px 10px;
  border-radius: 999px;
}
.ingname {
  opacity: 0.95;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ingx {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  font-size: 14px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
  pointer-events: auto;
}
.ingx:hover,
.ingx:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.ingtitle {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.03);
}
.iconbtn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
}
.iconbtn.is-muted {
  opacity: 0.62;
}
.iconbtn.is-muted:hover,
.iconbtn.is-muted:focus-visible {
  opacity: 1;
}
.iconbtn.is-fav {
  border-color: rgba(255, 204, 77, 0.6);
  background: rgba(255, 204, 77, 0.1);
  color: rgba(255, 229, 153, 0.98);
}
@media (prefers-color-scheme: light) {
  .iconbtn.is-fav {
    border-color: rgba(255, 167, 38, 0.45);
    background: rgba(255, 167, 38, 0.12);
    color: rgba(121, 63, 0, 0.95);
  }
}
.colorpick {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.colorpick::-webkit-color-swatch-wrapper {
  padding: 0;
}
.colorpick::-webkit-color-swatch {
  border: 1px solid var(--border);
  border-radius: 10px;
}
.colorpick::-moz-color-swatch {
  border: 1px solid var(--border);
  border-radius: 10px;
}
.iconbtn.danger:hover {
  border-color: rgba(255, 77, 109, 0.55);
}
.trash {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 77, 109, 0.45);
  background: rgba(255, 77, 109, 0.06);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.trash.dragover {
  border-color: rgba(255, 77, 109, 0.9);
  background: rgba(255, 77, 109, 0.12);
  color: var(--text);
}
.actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.actions #resetAll {
  grid-column: 1 / -1;
}
.actions > button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  min-height: 44px;
}
@media (max-width: 420px) {
  .actions {
    grid-template-columns: 1fr;
  }
}
.calendar {
  padding: 14px;
}
.pinboard {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.pincol {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.pinhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pintitle {
  font-size: 13px;
  font-weight: 650;
}
.pinadd {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.pinadd input[type="text"] {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.pinlist {
  min-height: 18px;
}
.stash {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
  min-width: 0;
}
.stashhead {
  display: grid;
  gap: 2px;
}
.stashhead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.stash .subtitle {
  margin: 0;
  font-size: 12px;
}
.stash.is-ingredients-collapsed .ingopen {
  display: none;
}
.stash .dropzone {
  background: rgba(124, 92, 255, 0.03);
}
.stash .dropzone .empty[data-empty="stash"] {
  text-align: center;
  padding: 14px 10px;
}
#stashZone {
  max-height: min(38vh, 360px);
  overflow: auto;
  scrollbar-gutter: stable;
}
.ingtoken.is-plain {
  padding-right: 10px;
}
.pinboard .ingtoken {
  border-color: rgba(238, 240, 255, 0.18);
  border-left: 8px solid var(--pin-color, var(--accent));
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  padding-top: 6px;
  padding-bottom: 6px;
}
@supports (color: color-mix(in oklab, white, black)) {
  .pinboard .ingtoken {
    border-color: color-mix(
      in oklab,
      var(--pin-color, var(--accent)) 40%,
      var(--border)
    );
    background: color-mix(
      in oklab,
      var(--pin-color, var(--accent)) 18%,
      var(--panel-2)
    );
  }
  .pinboard .ingtoken:hover {
    background: color-mix(
      in oklab,
      var(--pin-color, var(--accent)) 24%,
      var(--panel-2)
    );
  }
}
@media (prefers-color-scheme: light) {
  .pinboard .ingtoken {
    border-color: rgba(18, 19, 26, 0.14);
    background: rgba(18, 19, 26, 0.02);
  }
}
body[data-scheme="light"] .pinboard .ingtoken {
  border-color: rgba(18, 19, 26, 0.14);
  background: rgba(18, 19, 26, 0.02);
}
body[data-scheme="dark"] .pinboard .ingtoken {
  border-color: rgba(238, 240, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
}
@media (max-width: 960px) {
  .pinboard {
    grid-template-columns: 1fr;
  }
}
.weekrows {
  display: grid;
  gap: 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(120px, 1fr));
  gap: 10px;
  overflow: auto;
  padding-bottom: 6px;
}
.grid.grid4 {
  --cols: 4;
}
.grid.grid3 {
  --cols: 3;
}
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(var(--cols), minmax(170px, 1fr));
  }
}
.day {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 220px;
}
.day.is-today {
  border-color: rgba(124, 92, 255, 0.85);
  box-shadow:
    0 0 0 2px rgba(124, 92, 255, 0.22),
    var(--shadow);
}
.day.is-today .dayhead {
  background: rgba(124, 92, 255, 0.1);
}
@media (prefers-color-scheme: light) {
  .day.is-today {
    border-color: rgba(124, 92, 255, 0.72);
    box-shadow:
      0 0 0 2px rgba(124, 92, 255, 0.16),
      var(--shadow);
  }
  .day.is-today .dayhead {
    background: rgba(124, 92, 255, 0.08);
  }
}
.dayhead {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
}
.dayleft {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.daytools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.daytools button {
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}
.day:hover .daytools button,
.day:focus-within .daytools button {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.day.is-empty .daytools .dicebtn,
.day .daytools .notebtn.has-note {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (hover: none) {
  .daytools button {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .daytools button {
    transition: none;
    transform: none;
  }
}
.notebtn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 10px;
  width: 34px;
  height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.notebtn:hover {
  color: var(--text);
  border-color: rgba(124, 92, 255, 0.45);
}
.notebtn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.notebtn.has-note {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.08);
}
.copybtn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 10px;
  width: 34px;
  height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.copybtn:hover {
  color: var(--text);
  border-color: rgba(124, 92, 255, 0.45);
}
.copybtn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.dicebtn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 10px;
  width: 34px;
  height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.dicebtn:hover {
  color: var(--text);
  border-color: rgba(124, 92, 255, 0.45);
}
.dicebtn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.day.is-empty .dicebtn {
  color: var(--text);
}
.dow {
  font-size: 13px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dow__name {
  min-width: 0;
}
.todaybadge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.35);
  background: rgba(124, 92, 255, 0.12);
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1px;
  white-space: nowrap;
}
.daynoteview {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-height: 28px;
}
.daynoteview.is-empty {
  visibility: hidden;
}
.daynote {
  width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  min-height: 28px;
}
.date {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  height: 30px;
  white-space: nowrap;
}
.daybody {
  padding: 10px;
  display: grid;
  gap: 10px;
}
.dayadd {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.dayadd.is-collapsed {
  grid-template-columns: auto;
  justify-content: flex-end;
}
.dayadd.is-collapsed input[type="text"] {
  display: none;
}
.dayadd input[type="text"] {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.empty {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 2px 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
a {
  color: inherit;
}

.ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.9;
}

@media (max-width: 960px) {
  header {
    padding: 14px 14px 6px;
  }
  main {
    padding: 8px 14px 18px;
  }
  .syncstatus {
    margin-bottom: 10px;
    padding: 11px 12px;
  }
  .layout > .calendar {
    order: 1;
  }
  .layout > .sidebar {
    order: 2;
  }
  .controls {
    width: 100%;
  }
  .controls .weeklabel {
    flex: 1 1 100%;
    text-align: center;
  }
  .controls > button,
  .controls > .themecontrol {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
  .themecontrol {
    justify-content: space-between;
  }
  .themecontrol select {
    flex: 1 1 auto;
    min-width: 0;
  }
  #ideasZone,
  #libraryZone,
  #stashZone {
    max-height: none;
  }
  .weekactions {
    gap: 8px;
  }
  .weekactions__group {
    width: 100%;
  }
  .weekactions__group button {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow: visible;
  }
  .day {
    min-height: 0;
  }
  .calendar li.meal[data-kind="item"] {
    min-height: 0;
    height: auto;
  }
  .calendar li.meal[data-kind="item"] .ingopen {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 680px) {
  .appnav__desktop {
    display: none;
  }
  .appnav__mobile {
    display: block;
  }
  header {
    padding: 12px 12px 6px;
  }
  main {
    padding: 8px 12px 16px;
  }
  .topbar {
    gap: 10px;
  }
  .title,
  .controls {
    width: 100%;
  }
  .controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }
  .controls > * {
    min-width: 0;
  }
  .controls .weeklabel,
  .controls #toggleSidebar {
    grid-column: 1 / -1;
  }
  .controls button,
  .controls .themecontrol,
  .controls select {
    width: 100%;
  }
  .themecontrol {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
  }
  .weekactions,
  .weekactions__group {
    display: grid;
    grid-template-columns: 1fr;
  }
  .weekactions__group button,
  .weekactions #fillRemaining {
    width: 100%;
    flex: auto;
    justify-content: flex-start;
  }
  .weekactions__divider {
    display: none;
  }
  .grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .dayhead {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left date"
      "tools tools";
    gap: 8px;
    align-items: start;
  }
  .dayleft {
    grid-area: left;
  }
  .date {
    grid-area: date;
    justify-self: end;
    align-self: start;
    height: auto;
  }
  .daytools {
    grid-area: tools;
    margin-left: 0;
    justify-self: end;
    flex-wrap: wrap;
  }
  .calendar li.meal[data-kind="item"] .mealrow {
    gap: 8px;
  }
  .calendar li.meal[data-kind="item"] .mealcontrols {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    flex-wrap: wrap;
  }
  .calendar li.meal[data-kind="item"] .mealrow .text,
  .calendar li.meal[data-kind="item"]:hover .mealrow .text,
  .calendar li.meal[data-kind="item"]:focus-within .mealrow .text {
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .panel header {
    padding: 12px 12px 8px;
  }
  .panel .body,
  .calendar {
    padding: 10px 12px 12px;
  }
  .add {
    grid-template-columns: 1fr auto;
  }
  .add input[type="text"] {
    grid-column: 1 / -1;
  }
  .searchbar {
    grid-template-columns: 1fr auto auto;
  }
  .searchbar input[type="text"] {
    grid-column: 1 / -1;
  }
  .tabswrap {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .tabs {
    min-width: 0;
  }
  .tabs .tab {
    font-size: 12px;
    padding-inline: 8px;
  }
  .dayhead {
    padding: 9px 9px 8px;
  }
  .daybody {
    padding: 8px;
    gap: 8px;
  }
  .dayadd {
    grid-template-columns: 1fr;
  }
  .dayadd.is-collapsed {
    justify-content: stretch;
  }
  .dayadd.is-collapsed button,
  .dayadd button {
    width: 100%;
  }
  .meal {
    padding: 9px;
  }
  .mealcontrols {
    gap: 6px;
  }
  .calendar li.meal[data-kind="item"] .text {
    font-size: 14px;
  }
  .calendar li.meal[data-kind="item"] .ingtoken {
    height: auto;
    min-height: 30px;
  }
  .trash {
    padding: 10px 8px;
    align-items: flex-start;
  }
}
