@font-face {
  font-family: "Caprasimo";
  src: url("fonts/caprasimo-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --cream: #fbf5ea;
  --card: #fffdf8;
  --tomato: #e2483d;
  --tomato-dark: #b8342b;
  --basil: #2f7a4f;
  --basil-tint: #e1efe4;
  --mustard: #f2b134;
  --ink: #2b2421;
  --muted: #6f6259;
  --line: #ecdfcb;
  --display: "Caprasimo", "Cooper Black", Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Demo bar */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 14px; padding: 2px 14px; background: var(--ink); color: var(--cream); font-size: 14px; }
.demo-bar__note { margin: 0; display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.demo-bar__note strong { padding: 0 10px; border-radius: 999px; background: var(--mustard); color: var(--ink); font-weight: 700; }
.demo-bar__actions { display: flex; gap: 4px; margin-left: auto; }
.demo-bar__reset, .demo-bar__made { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--cream); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.demo-bar__made { color: var(--mustard); }

.shell { max-width: 1140px; margin: 0 auto; padding: 22px 16px 48px; }

.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.top__kicker { margin: 0; font-weight: 700; color: var(--basil); letter-spacing: 0.02em; }
.top h1 {
  margin: 2px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, 13vw, 92px);
  line-height: 0.95;
  color: var(--tomato);
  text-decoration: underline;
  text-decoration-color: var(--mustard);
  text-decoration-thickness: 6px;
  text-underline-offset: 10px;
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 700; font-size: 15px; transition: transform 0.1s ease; }
.btn:active { transform: translateY(1px); }
.btn--tomato { border-color: var(--tomato); background: var(--tomato); color: #fff; }
.btn--tomato:hover { background: var(--tomato-dark); border-color: var(--tomato-dark); }
.btn--small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 2px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }

/* Tonight */
.tonight {
  display: grid;
  gap: 0;
  margin-bottom: 20px;
  border: 2px solid var(--ink);
  border-radius: 28px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 6px 0 var(--ink);
}
.tonight .plate--lg {
  display: block;
  width: 100%;
  height: 210px;
  padding: 18px 0;
  background-color: #fff;
  background-image:
    linear-gradient(90deg, rgb(226 72 61 / 0.55) 50%, transparent 50%),
    linear-gradient(rgb(226 72 61 / 0.55) 50%, transparent 50%);
  background-size: 34px 34px;
  border-bottom: 2px solid var(--ink);
  filter: drop-shadow(0 0 0 transparent);
}
.tonight__text { padding: 18px 18px 20px; }
.tonight__kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--mustard); font-weight: 700; font-size: 14px; }
.tonight h2 { margin: 8px 0 6px; font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1.05; }
.tonight__needs { margin: -4px 0 14px; color: var(--muted); }
.tonight__needs strong { color: var(--ink); }
.tonight__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 14px; color: var(--muted); font-weight: 500; }
.tonight__meta span { display: inline-flex; align-items: center; gap: 6px; }
.tag { padding: 1px 10px; border-radius: 999px; background: var(--basil-tint); color: var(--basil); font-size: 13px; font-weight: 700; }

/* Cards */
.layout { display: grid; gap: 18px; }
.card { min-width: 0; padding: 18px; border: 2px solid var(--ink); border-radius: 24px; background: var(--card); }
.card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; }
.card__head h2 { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; }
.card__head h2 .icon { color: var(--tomato); }

/* Week */
.days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.days li { display: grid; grid-template-columns: 40px 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); }
.days__when { display: grid; justify-items: center; line-height: 1.05; }
.days__when strong { font-weight: 800; text-transform: uppercase; font-size: 13px; color: var(--tomato); }
.days__when small { font-family: var(--display); font-size: 20px; }
.plate--sm { width: 46px; height: 46px; }
.days__text { display: grid; min-width: 0; }
.days__text strong { font-weight: 700; line-height: 1.2; }
.days__text small { color: var(--muted); font-size: 13px; }
.overdue { margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: #fff4dc; }
.overdue__label { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-weight: 700; color: #9a6b0c; }
.overdue ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.overdue li { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 12px; border-radius: 999px; background: #fff; font-weight: 600; }
.overdue small { color: var(--muted); font-weight: 500; }

/* Shopping list */
.list__left { margin: 0; color: var(--muted); }
.list__left strong { font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--basil); }
.list__bar { height: 10px; margin: -4px 0 12px; border-radius: 999px; background: #efe7d8; overflow: hidden; }
.list__bar span { display: block; height: 100%; background: var(--basil); border-radius: 999px; }
.aisle + .aisle { margin-top: 14px; }
.aisle h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.aisle h3 .icon { color: var(--basil); }
.aisle ul { list-style: none; margin: 0; padding: 0; display: grid; }
.item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px; border-bottom: 1.5px dashed var(--line); cursor: pointer; }
.aisle li:last-child .item { border-bottom: 0; }
.item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.item__box { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 2px solid var(--ink); border-radius: 7px; color: transparent; background: #fff; }
.item--got .item__box { background: var(--basil); border-color: var(--basil); color: #fff; }
.item input:focus-visible + .item__box { outline: 3px solid var(--mustard); outline-offset: 2px; }
.item__text { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.item__text strong { font-weight: 600; }
.item__text small { color: var(--muted); font-size: 12.5px; }
.item__amount { font-weight: 700; color: var(--muted); white-space: nowrap; }
.item--got .item__text strong, .item--got .item__amount { color: #a99b8f; text-decoration: line-through; }
.add { display: flex; gap: 8px; margin-top: 10px; }
.add input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font-size: 16px; }
.add input:focus { outline: none; border-color: var(--ink); }
.list__staples { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding-top: 12px; border-top: 1.5px solid var(--line); color: var(--muted); font-size: 14px; }

/* Make your own */
.own { margin-top: 30px; padding: 20px; border: 2px dashed var(--tomato); border-radius: 24px; background: #fff; }
.own__label { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tomato); }
.own__words { margin: 8px 0; font-family: var(--display); font-size: 22px; line-height: 1.3; }
.own__note { margin: 0; font-size: 14px; color: var(--muted); }

/* Dialog */
.dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 2px solid var(--ink); border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 6px 0 var(--ink); }
.dialog::backdrop { background: rgb(43 36 33 / 0.5); }
.dialog__body { padding: 18px 18px 22px; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dialog__title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.dialog__close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 2px solid var(--line); border-radius: 50%; background: #fff; }
.dialog__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.swap { display: grid; gap: 12px; }
.swap__search { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; }
.swap__search input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; outline: none; font-size: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-weight: 700; font-size: 14px; }
.field select { width: 100%; min-height: 48px; padding: 0 12px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-size: 16px; }
.swap__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.swap__option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; text-align: left; }
.swap__option:hover { border-color: var(--ink); background: #fffaf0; }
.swap__option span { display: grid; min-width: 0; }
.swap__option small { color: var(--muted); font-size: 13px; }
.swap__none { padding: 10px; color: var(--muted); }

.toast-region { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 20; display: grid; justify-items: center; pointer-events: none; }
.toast { margin: 0 16px; padding: 12px 18px; border: 2px solid var(--ink); border-radius: 999px; background: var(--mustard); color: var(--ink); font-weight: 700; box-shadow: 0 4px 0 var(--ink); animation: toast-in 0.25s ease; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (min-width: 720px) {
  .tonight { grid-template-columns: 320px minmax(0, 1fr); align-items: stretch; }
  .tonight .plate--lg { height: 100%; min-height: 0; max-height: 320px; padding: 34px; border-bottom: 0; border-right: 2px solid var(--ink); }
  .tonight__text { align-self: center; padding: 26px 30px; }
  .tonight h2 { font-size: 46px; }
}

@media (min-width: 1000px) {
  .shell { padding: 32px 28px 64px; }
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 22px; align-items: start; }
  .card { padding: 22px; }
}

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