:root {
  color-scheme: dark;
  --bg: #101010;
  --surface: #1b1b1b;
  --ink: #f5eee4;
  --muted: #c5bcb1;
  --gold: #e5aa52;
  --line: #36312a;
  --accent: linear-gradient(145deg, #f6be62, #dda045);
  font:
    15px/1.5 system-ui,
    sans-serif;
  background: #0a0a0a;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0 auto;
  max-width: 640px;
  min-height: 100dvh;
  background: linear-gradient(#080808, var(--bg) 190px);
}
body:has(#nav:not([hidden])) {
  padding-bottom: calc(75px + env(safe-area-inset-bottom));
}
[hidden] {
  display: none !important;
}
#brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 18px 12px;
}
#brand strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.2;
}
#brand small {
  display: block;
  font-size: 0.68rem;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #f5c478;
  font:
    italic bold 1.55rem Georgia,
    serif;
}
.wordmark img {
  width: 26px;
  height: 26px;
}
main {
  padding: 0 14px 18px;
}
h1,
h2,
h3,
p {
  margin: 0;
  overflow-wrap: anywhere;
}
h1 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}
h2 {
  font-size: 1.08rem;
}
h3 {
  font-size: 1.02rem;
}
p {
  margin-block: 8px;
}
small {
  color: var(--muted);
}
svg {
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  flex: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
input:not([type="checkbox"]),
select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #202020;
  min-height: 44px;
}
button {
  cursor: pointer;
  padding: 5px 10px;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
:focus-visible {
  outline: 2px solid #ffd591;
  outline-offset: 2px;
}
input:not([type="checkbox"]),
select {
  max-width: 100%;
  min-width: 0;
  padding: 5px 9px;
}
input[type="checkbox"] {
  accent-color: var(--gold);
  width: 19px;
  height: 19px;
  flex: none;
}
label {
  cursor: pointer;
}
article,
.summary,
.shopping-progress {
  background: linear-gradient(145deg, #1b1b1b, #131313);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 12px;
  margin-bottom: 9px;
}
.gold,
.active,
.selected,
.cook-launch {
  background: var(--accent);
  color: #211508;
  border-color: #ca9441;
  font-weight: 650;
}
#nav {
  position: fixed;
  z-index: 5;
  margin-inline: auto;
  inset: auto 0 0;
  width: min(100%, 640px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  padding: 5px 7px calc(5px + env(safe-area-inset-bottom));
}
#nav button {
  border-color: transparent;
  background: transparent;
  min-width: 0;
  padding: 4px 0;
  font-size: 0.69rem;
  min-height: 53px;
}
#nav button.active {
  position: relative;
  background: #251e16;
  color: #f0bd73;
}
#nav button.active::before {
  content: "";
  position: absolute;
  inset: 2px 0 auto;
  width: 15px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--gold);
}
#nav svg {
  display: block;
  margin: 0 auto 3px;
  width: 18px;
  height: 18px;
}
.quicklinks,
.week-nav,
.meal-actions,
.metrics {
  display: flex;
  align-items: center;
  gap: 6px;
}
.quicklinks,
.week-nav {
  margin-bottom: 8px;
}
.quicklinks > *,
.week-nav > * {
  flex: 1;
}
.quicklinks button,
.week-nav button {
  font-size: 0.83rem;
}
.date-bar {
  display: flex;
  margin-bottom: 8px;
}
.summary {
  border-color: #705637;
  background: radial-gradient(ellipse at 25% 0%, #372a19, #191611 70%);
}
.summary strong {
  display: block;
  font-size: 1.65rem;
  color: #f4be64;
  line-height: 1.22;
  font-variant-numeric: tabular-nums;
}
.daily {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  overflow: hidden;
}
.daily > div {
  padding: 9px 11px;
}
.daily .photo {
  width: 37%;
  align-self: stretch;
  min-height: 92px;
  border: 0;
  border-radius: 0;
}
.metrics {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.metrics span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 20px;
  background: #30271a;
  padding: 2px 6px;
  font-size: 0.7rem;
  color: #fae3bd;
  white-space: nowrap;
}
.photo {
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  background: radial-gradient(ellipse at 60% 75%, #42301d, #171412 75%);
  color: #d7a45d;
  border: 1px solid #47392b;
  border-radius: 11px;
}
.photo > svg {
  width: 31%;
  height: auto;
  max-width: 40px;
}
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1a1713;
}
.meal {
  display: grid;
  grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
  gap: 5px 10px;
  padding: 7px;
  align-items: center;
}
.meal > .photo {
  align-self: stretch;
  min-height: 79px;
  grid-row: span 2;
}
.meal h2 {
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 4px;
}
.meal small {
  font-size: 0.72rem;
}
.meal-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.meal-actions label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.76rem;
}
.meal-actions button {
  font-size: 0.8rem;
  min-width: 65px;
}
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 10px;
  text-align: center;
}
.days button {
  font-size: 0.73rem;
  line-height: 1.25;
  padding: 2px 0;
}
.days b {
  display: block;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #201f1e;
  border: 1px solid #504940;
  padding-inline: 10px;
  border-radius: 12px;
}
.search-wrap input {
  width: 100%;
  border: 0;
  background: transparent;
}
.recipe-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin: 9px 0 12px;
}
.recipe-filters button {
  padding: 3px 0;
  font-size: 0.72rem;
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.gallery-card {
  background: #181818;
  border-radius: 15px;
  overflow: hidden;
  padding: 0;
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.gallery-card .photo {
  width: 100%;
  aspect-ratio: 1.65;
  border-radius: 0;
  border: 0;
}
.gallery-card .gallery-title {
  display: block;
  padding: 0 8px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.gallery-card .metrics {
  margin: auto 7px 8px;
  justify-content: flex-start;
  gap: 3px;
}
#app[data-view="recipe"],
#app[data-view="cook"] {
  padding-top: 0;
}
.hero {
  position: relative;
  margin: 0 -14px;
}
.hero .photo {
  width: 100%;
  aspect-ratio: 1.85;
  border: 0;
  border-radius: 0;
}
.hero.tall .photo {
  aspect-ratio: 3;
}
.back-recipe {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: max(10px, env(safe-area-inset-top));
  background: #111e;
  border-radius: 50%;
  width: 44px;
}
.recipe-detail,
.cook-stage {
  padding: 12px 0;
  border: 0;
  background: none;
}
.recipe-detail h1 {
  text-align: center;
}
.recipe-detail .metrics {
  justify-content: center;
  margin-bottom: 14px;
}
.recipe-body h3 {
  color: #efbf75;
  border-bottom: 1px solid var(--line);
  padding-block: 9px 5px;
}
.recipe-body > p {
  line-height: 1.8;
}
.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-block: 7px;
}
.recipe-check,
.step {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 7px;
  background: #181818;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-block: 4px;
}
.recipe-check input,
.step input {
  margin: 2px 0;
}
.ingredient {
  position: relative;
  margin: 0;
  flex-direction: column;
  min-height: 80px;
  font-size: 0.81rem;
  overflow-wrap: anywhere;
}
.ingredient .photo {
  width: 100%;
  aspect-ratio: 1.6;
}
.step-number {
  color: #f0bb67;
  font-weight: 700;
}
.step span:nth-child(2) {
  flex: 1;
}
.cook-dock {
  position: sticky;
  bottom: 0;
  padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
  background: #101010f5;
}
.cook-launch {
  width: 100%;
  min-height: 47px;
}
.progress,
.cook-progress {
  background: #46413b;
  border-radius: 10px;
  overflow: hidden;
  height: 5px;
  margin: 6px 0;
}
.progress span,
.cook-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.cook-timer {
  margin-block: 14px;
  background: #1b1b1b;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
}
#cook-clock {
  display: block;
  font-size: 2rem;
  color: #f8c876;
  font-variant-numeric: tabular-nums;
}
.timer-input {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.timer-input input {
  width: 69px;
}
.shopping-row,
.stock-row,
.budget-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 53px;
  border-bottom: 1px solid var(--line);
  padding-block: 5px;
}
.shopping-row:last-child,
.stock-row:last-child,
.budget-row:last-child {
  border-bottom: 0;
}
.shopping-row .photo,
.stock-row .photo {
  width: 52px;
  height: 40px;
  flex: none;
}
.shopping-row .photo {
  margin-inline-start: auto;
}
.stock-row input,
.budget-row input {
  margin-inline-start: auto;
  width: 77px;
  text-align: center;
}
#priceLogin {
  display: grid;
  gap: 6px;
  margin-block: 9px;
}
#app[data-tab="6"] article {
  display: grid;
  gap: 6px;
}
.cook-ingredients {
  background: #1b1814;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  margin-block: 8px;
}
.cook-ingredients h2 {
  color: #f4be75;
  font-size: 0.87rem;
}
.cook-ingredients ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin-block: 4px 0;
  padding-inline-start: 17px;
}
.cook-ingredients li {
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}
.cook-ingredients li:only-child {
  grid-column: 1 / -1;
}
.timer-presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}
.timer-presets button {
  padding: 3px 0;
  font-size: 0.72rem;
}
.ingredient span:not(.photo) {
  min-width: 0;
}
.ingredient input {
  margin-top: auto;
}
.gallery-card .metrics {
  font-size: 0.72rem;
}

.ingredient-translation {
  color: var(--muted);
  white-space: nowrap;
}
#ingredient {
  width: 100%;
}
.profile-period {
  display: block;
  margin-bottom: 8px;
}
.budget-period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.budget-period .week-nav {
  margin: 0;
  direction: rtl;
}
.budget-period button {
  padding-inline: 7px;
  font-size: 0.73rem;
}
.budget-summary {
  padding: 12px 14px;
}
.budget-summary strong {
  font-size: 2.05rem;
  overflow-wrap: anywhere;
}
.budget-summary .progress {
  margin-block: 9px;
}
.budget-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.budget-figures div + div {
  border-inline-start: 1px solid #705637;
  padding-inline-start: 10px;
}
.budget-figures dt {
  color: var(--muted);
  font-size: 0.79rem;
}
.budget-figures dd {
  margin: 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.budget-fields {
  padding-block: 4px;
}
.budget-estimate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
}
.budget-estimate strong {
  color: #f0bd73;
}
.budget-estimate small {
  grid-column: 1 / -1;
}
.profile-actions button {
  text-align: start;
}
.profile-actions svg {
  color: var(--gold);
  margin-inline-end: 4px;
}
