@import url("/fonts.css");
:root {
  --bg: #faf7f2;
  --paper: #fffdf9;
  --ink: #24221f;
  --muted: #756f67;
  --line: #d7cfc4;
  --red: #bc3026;
  --soft: #f2e9d9;
  --green: #526e35;
  --yellow: #f5e9c8;
  --shadow: 0 24px 90px #221a1628;
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button,
a,
input,
select {
  outline-offset: 5px;
}
button {
  color: inherit;
}
a {
  color: inherit;
}
button {
  border: 0;
  background: none;
}
header {
  max-width: 1480px;
  margin: auto;
  padding: 22px 42px;
  display: flex;
  align-items: center;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.7px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.brand svg,
.dot {
  color: var(--red);
}
nav {
  display: flex;
  align-self: stretch;
  gap: 30px;
  margin-left: 32px;
}
nav button {
  position: relative;
  font-size: 15px;
  padding: 10px 0;
  color: var(--muted);
  white-space: nowrap;
}
nav button.active {
  color: var(--ink);
  font-weight: 700;
}
nav button.active:after {
  content: "";
  position: absolute;
  bottom: -23px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
  border-radius: 3px;
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 18px;
  align-items: center;
}
.icon-button {
  font-size: 27px;
  width: 40px;
  height: 40px;
}
.avatar {
  border: 1px solid var(--line);
  background: var(--soft);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 16px;
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 40px 42px 50px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 34px;
  gap: 20px;
}
.eyebrow {
  font-weight: 750;
  font-size: 12px;
  letter-spacing: 1.3px;
  color: var(--red);
  margin: 0 0 14px;
}
h1,
h2,
h3,
.serif {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -1.2px;
}
h1 {
  font-size: clamp(36px, 4.1vw, 66px);
  line-height: 1.05;
  margin: 0 0 12px;
  font-weight: 700;
}
.subtitle {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
}
.outline {
  border: 1.5px solid var(--red);
  border-radius: 8px;
  color: var(--red);
  padding: 14px 18px;
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 12px;
}
.outline:hover {
  background: var(--red);
  color: white;
}
.workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.pantry {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  background: var(--paper);
}
.pantry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.pantry h2 {
  font-size: 27px;
  margin: 0 0 20px;
}
.muted {
  color: var(--muted);
}
.count {
  font-size: 12px;
  color: var(--muted);
}
input,
select {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  width: 100%;
  min-width: 0;
}
input::placeholder {
  color: var(--muted);
}
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0 7px;
}
.search {
  position: relative;
}
.search input {
  padding-left: 34px;
}
.search:before {
  content: "⌕";
  position: absolute;
  left: 11px;
  top: 7px;
  font-size: 24px;
  color: var(--muted);
}
.suggestions {
  max-height: 220px;
  overflow: auto;
  margin: 6px 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}
.suggestions button {
  display: block;
  padding: 12px;
  text-align: left;
  width: 100%;
  border-bottom: 1px solid var(--line);
}
.suggestions button:hover {
  background: var(--soft);
}
.ingredient {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.ingredient-emoji {
  font-size: 24px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--soft);
  border-radius: 7px;
  flex-shrink: 0;
}
.ingredient-edit {
  flex: 1;
  text-align: left;
  padding: 0;
  font-size: 14px;
}
.ingredient-edit strong {
  display: block;
}
.ingredient small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: var(--muted);
}
.ingredient .expiring {
  color: #a34a15;
}
.remove {
  font-size: 19px;
  color: var(--muted);
  padding: 6px;
}
.remove:hover {
  color: var(--red);
}
.helper {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.pantry-bottom {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.pantry-bottom h3 {
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0;
  margin: 0 0 12px;
}
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  font-size: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  white-space: nowrap;
}
.pill.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.primary {
  background: var(--red);
  color: #fff;
  border-radius: 7px;
  padding: 13px 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.primary:hover {
  filter: brightness(0.9);
}
.wide {
  width: 100%;
}
.pantry-bottom .primary {
  margin-top: 18px;
}
.tagline {
  text-align: center;
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
  margin: 14px 0 0;
}
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.results-head h2 {
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 8px;
}
.results-head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.results-head .pills {
  flex-shrink: 0;
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.recipe-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px #2222220b;
}
.food {
  background-image: url("/images/recipes.webp");
  background-repeat: no-repeat;
  background-size: 300% 100%;
  background-position: 0 50%;
  aspect-ratio: 1.04;
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
}
.food-1 {
  background-position: 50% 50%;
}
.food-2 {
  background-position: 100% 50%;
}
.favorite {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fffdf9e8;
  color: #24221f;
  font-size: 25px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px #0001;
}
.favorite[aria-pressed="true"] {
  color: var(--red);
}
.card-body {
  padding: 16px;
}
.availability {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 8px;
}
.availability.missing {
  color: #a94a20;
}
.recipe-card h3 {
  font-size: 23px;
  line-height: 1.12;
  margin: 0 0 10px;
  letter-spacing: -0.6px;
}
.recipe-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 17px;
}
.text-link {
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
}
.antiwaste {
  margin-top: 25px;
  padding: 24px 28px;
  background: var(--yellow);
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.antiwaste h3 {
  font-size: 29px;
  margin: 0 0 8px;
}
.antiwaste .eyebrow {
  font-size: 10px;
  margin-bottom: 10px;
}
.antiwaste p:not(.eyebrow) {
  font-size: 13px;
  margin: 0 0 16px;
}
.tomatoes {
  font-size: 68px;
  transform: rotate(-12deg);
  padding-right: 16px;
}
.more {
  display: flex;
  justify-content: center;
  padding: 24px;
}
.secondary {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 16px;
  background: var(--paper);
  font-weight: 600;
  font-size: 13px;
}
.secondary:hover {
  background: var(--soft);
}
.empty {
  padding: 55px 24px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
}
.empty h2 {
  font-size: 30px;
}
.empty p {
  line-height: 1.6;
  color: var(--muted);
}
.page-heading {
  font-size: 38px;
  margin: 0 0 10px;
}
.page-subtitle {
  color: var(--muted);
  margin-bottom: 30px;
}
.shopping {
  max-width: 760px;
}
.shopping form {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}
.grocery {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.grocery input {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
}
.grocery label {
  flex: 1;
}
.grocery.checked label {
  text-decoration: line-through;
  color: var(--muted);
}
.shopping-tools {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
footer {
  border-top: 1px solid var(--line);
  max-width: 1396px;
  margin: 0 auto;
  padding: 25px 0 35px;
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 12px;
  color: var(--muted);
}
footer span:last-child {
  margin-left: auto;
}
.brand.small {
  font-size: 24px;
  color: var(--ink);
}
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(650px, calc(100% - 32px));
  max-height: 90dvh;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #15100ccc;
  backdrop-filter: blur(4px);
}
.dialog-inner {
  padding: 30px;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.dialog-header h2 {
  font-size: 32px;
  line-height: 1.05;
  margin: 0;
}
.close {
  font-size: 27px;
  padding: 0 4px;
}
.auth-intro {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.auth-tabs button {
  flex: 1;
}
.auth-submit {
  margin: 22px 0 12px;
}
.auth-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.error {
  color: var(--red);
  font-size: 13px;
  line-height: 1.4;
  min-height: 18px;
  margin-top: 14px;
}
.dialog-food {
  aspect-ratio: 2.2;
}
.detail-meta {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.detail h3 {
  font-size: 23px;
  margin: 24px 0 14px;
}
.ingredient-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.ingredient-line.missing {
  color: #a94a20;
}
.step {
  display: flex;
  gap: 14px;
  line-height: 1.6;
  font-size: 14px;
  margin: 18px 0;
}
.step-number {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: bold;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}
.cook-step {
  font-size: 20px;
  line-height: 1.6;
  min-height: 180px;
}
.progress {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--red);
  font-weight: bold;
}
.timer {
  background: var(--soft);
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.timer output {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}
.timer select {
  width: auto;
}
.timer button {
  font-size: 13px;
}
.account-info {
  line-height: 1.8;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--bg);
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: calc(100% - 24px);
  font-size: 14px;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.skip {
  position: absolute;
  top: -100px;
  left: 15px;
  background: var(--ink);
  color: var(--bg);
  padding: 12px;
  z-index: 20;
}
.skip:focus {
  top: 10px;
}
.welcome {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 35px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}
.welcome-text {
  padding: 40px;
}
.welcome h2 {
  font-size: 42px;
  margin: 0 0 20px;
  line-height: 1.1;
}
.welcome p {
  line-height: 1.7;
  color: var(--muted);
}
.welcome .food {
  aspect-ratio: 1;
}
.welcome .primary {
  margin-top: 15px;
}
.welcome-points {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  margin-top: 22px;
}
.info-line {
  padding: 10px 14px;
  background: var(--soft);
  font-size: 12px;
  line-height: 1.5;
  border-radius: 7px;
  margin-top: 16px;
}
[data-theme="dark"] {
  --bg: #171816;
  --paper: #20211e;
  --ink: #f5f1e8;
  --muted: #b3b1a7;
  --line: #44463f;
  --red: #f47562;
  --soft: #2e3029;
  --green: #b3cf82;
  --yellow: #353123;
  color-scheme: dark;
}
[data-theme="dark"] .primary {
  background: #bd392c;
  color: white;
}
[data-theme="dark"] .availability.missing,
[data-theme="dark"] .ingredient-line.missing,
[data-theme="dark"] .ingredient .expiring {
  color: #f2b283;
}
[data-theme="dark"] .favorite {
  background: #20211ee8;
  color: #f5f1e8;
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: 315px minmax(0, 1fr);
  }
  .recipe-card h3 {
    font-size: 26px;
  }
}
@media (max-width: 1100px) {
  header {
    gap: 20px;
    padding: 20px 25px;
  }
  nav {
    margin-left: 10px;
    gap: 20px;
  }
  main {
    padding: 32px 25px;
  }
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
  }
  .results-head {
    align-items: start;
    flex-direction: column;
  }
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .results-head h2 {
    font-size: 30px;
  }
  .recipe-card h3 {
    font-size: 24px;
  }
  footer {
    margin: 0 25px;
  }
  .pantry {
    padding: 18px;
  }
  .pantry h2 {
    font-size: 24px;
  }
  .pill {
    padding: 9px;
  }
  .intro {
    margin-bottom: 28px;
  }
  .outline {
    padding: 12px;
  }
  .recipe-grid .recipe-card:nth-child(3) {
    display: block;
  }
}
@media (max-width: 720px) {
  header {
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 15px;
  }
  .brand {
    font-size: 28px;
  }
  .brand svg {
    height: 30px;
    width: 24px;
  }
  .header-actions {
    gap: 8px;
  }
  nav {
    order: 3;
    width: 100%;
    margin: 0;
    justify-content: space-between;
    gap: 12px;
  }
  nav button {
    font-size: 13px;
  }
  nav button.active:after {
    bottom: -16px;
  }
  main {
    padding: 28px 18px;
  }
  .intro {
    align-items: start;
    flex-direction: column;
    gap: 20px;
  }
  h1 {
    font-size: 43px;
  }
  .subtitle {
    font-size: 16px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .outline {
    font-size: 13px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .pantry h2 {
    font-size: 28px;
  }
  .pantry-bottom {
    margin-top: 16px;
  }
  .pantry .ingredient {
    padding: 8px 0;
  }
  .pantry .ingredient-emoji {
    width: 32px;
    height: 32px;
    font-size: 22px;
  }
  .results-head h2 {
    font-size: 33px;
  }
  .recipe-grid {
    gap: 12px;
  }
  .card-body {
    padding: 12px;
  }
  .recipe-card h3 {
    font-size: 22px;
  }
  .recipe-meta {
    font-size: 11px;
  }
  .availability {
    font-size: 10px;
  }
  .food {
    aspect-ratio: 0.95;
  }
  .antiwaste {
    padding: 22px 18px;
  }
  .antiwaste h3 {
    font-size: 27px;
  }
  .tomatoes {
    display: none;
  }
  footer {
    flex-wrap: wrap;
    margin: 0 18px;
    gap: 12px;
  }
  footer p {
    margin: 0;
  }
  footer span:last-child {
    margin: 0;
    width: 100%;
  }
  .welcome {
    grid-template-columns: 1fr;
  }
  .welcome-text {
    padding: 25px;
  }
  .welcome .food {
    aspect-ratio: 1.8;
    order: -1;
  }
  .welcome h2 {
    font-size: 34px;
  }
  .dialog-inner {
    padding: 24px;
  }
  .dialog-header h2 {
    font-size: 28px;
  }
  .cook-step {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
