:root {
  --bg: #f7f8f4;
  --ink: #273b33;
  --green: #285b47;
  --muted: #778078;
  --line: #e1e6dc;
  --lime: #e6edc9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 11px 16px;
}
button:hover {
  background: #edf1e7;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.small {
  padding: 7px 10px;
  font-size: 13px;
}
aside {
  position: fixed;
  width: 239px;
  inset: 0 auto 0 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 38px 25px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-family: Manrope, sans-serif;
  font-size: 45px;
  letter-spacing: -4px;
  font-weight: 800;
  text-decoration: none;
  color: var(--green);
}
.brand span {
  display: inline-block;
}
.brand .dot {
  font-size: 13px;
  color: #a4b97c;
  margin-left: 7px;
  letter-spacing: 0;
}
.brand-note {
  font-size: 8px;
  letter-spacing: 2px;
  margin-top: 5px;
  color: var(--muted);
}
nav {
  margin-top: 53px;
  display: grid;
  gap: 9px;
}
nav button {
  border: 0;
  text-align: left;
  background: transparent;
  color: #727b73;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 17px;
}
nav button.active {
  background: #eaf0e2;
  color: var(--green);
  font-weight: 700;
}
nav .icon {
  font-size: 21px;
  width: 23px;
  text-align: center;
}
.side-bottom {
  margin-top: auto;
}
.private {
  font-size: 11px;
  color: var(--muted);
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
#profile {
  margin-top: 16px;
  border: 0;
  padding: 9px 0;
  font-size: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
main {
  max-width: 1550px;
  margin-left: 239px;
  padding: 28px 48px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
header > span {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}
header button {
  background: transparent;
  font-size: 12px;
}
h1,
h2,
h3 {
  font-family: Manrope, sans-serif;
}
h1 {
  font-size: 36px;
  letter-spacing: -1.4px;
  margin: 10px 0;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin: 0;
}
h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.intro p {
  margin: 8px 0;
  color: var(--muted);
}
.date-pill {
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 11px 15px;
  border-radius: 25px;
}
.hero {
  background: #e9efdd;
  border: 1px solid #dce5cc;
  border-radius: 15px;
  padding: 27px 30px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.hero h2 {
  font-size: 26px;
  margin: 10px 0;
}
.hero p {
  font-size: 14px;
  margin: 8px 0 19px;
  max-width: 530px;
}
.hero-art {
  width: 170px;
  min-width: 130px;
  display: grid;
  place-items: center;
  font-size: 78px;
  color: #718d58;
  transform: rotate(-15deg);
  border: 1px solid #b7c89b;
  border-radius: 90px 90px 15px 90px;
  margin-right: 20px;
  background: #dce6c9;
}
.pill {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.3px;
  padding: 5px 9px;
  border-radius: 5px;
  background: #f0f2e9;
  color: #68735d;
}
.pill.green {
  background: #e8f0e1;
  color: #3d6b43;
}
.pill.amber {
  background: #fbf1dc;
  color: #9a7431;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 23px 0 30px;
}
.stat {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 19px 21px;
}
.stat .value {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 27px;
  font-weight: 700;
  margin: 9px 0;
}
.stat .value small {
  font: 400 13px system-ui;
  color: var(--muted);
}
.stat p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 27px 0 16px;
}
.section-head button {
  font-size: 12px;
  background: transparent;
  border: 0;
}
.columns {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 25px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 23px;
  margin-bottom: 15px;
}
.activity {
  display: flex;
  gap: 17px;
  align-items: flex-start;
}
.activity-icon {
  width: 47px;
  height: 47px;
  border-radius: 12px;
  background: #eff2e8;
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}
.activity-body {
  flex: 1;
}
.activity h3 {
  margin: 3px 0 6px;
}
.activity p {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0 16px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.meal-row {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  display: flex;
  gap: 14px;
}
.meal-row:first-of-type {
  margin-top: 15px;
}
.meal-row:last-child {
  padding-bottom: 0;
}
.meal-icon {
  font-size: 23px;
  color: #a2a88a;
}
.meal-row p {
  font-size: 12px;
  margin: 4px 0 8px;
  color: var(--muted);
}
.meal-row button {
  margin-left: auto;
  align-self: center;
}
.note {
  background: #f1f3e9;
  border-radius: 11px;
  padding: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: #737c64;
}
.note strong {
  color: var(--ink);
}
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.day {
  background: white;
  border: 1px solid var(--line);
  padding: 14px 6px;
  border-radius: 10px;
  text-align: center;
  font-size: 11px;
}
.day.selected {
  background: #e9efdd;
  border-color: #8ca772;
}
.day strong {
  display: block;
  font-size: 19px;
  margin: 9px;
}
.day span {
  display: block;
  line-height: 1.7;
}
.exercise {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 13px 0 7px;
}
input,
select,
textarea {
  background: #fff;
  border: 1px solid #d6ddcf;
  border-radius: 7px;
  padding: 10px;
  width: 100%;
  color: var(--ink);
  min-height: 42px;
}
textarea {
  min-height: 82px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.danger {
  color: #a04537;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  width: min(650px, 94vw);
  max-height: 90vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #1d322e66;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: white;
  padding: 13px 22px;
  border-radius: 10px;
  display: none;
  z-index: 20;
}
footer {
  font-size: 10px;
  color: #92998c;
  text-align: center;
  margin: 40px 0 12px;
}
details {
  margin: 14px 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
  line-height: 1.6;
}
a {
  color: var(--green);
}
.empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--muted);
}
.history {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.history p {
  font-size: 12px;
  margin: 6px 0;
}
.bar {
  height: 7px;
  background: #edf0e7;
  border-radius: 8px;
  margin: 12px 0;
  overflow: hidden;
}
.bar i {
  display: block;
  background: #73955c;
  height: 100%;
}
.ingredient-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 8px;
  margin: 9px 0;
}
.set-row {
  display: grid;
  grid-template-columns: 45px 1fr 1fr;
  gap: 8px;
  align-items: center;
}
.badge {
  font-size: 11px;
  color: var(--muted);
}
@media (min-width: 1450px) {
  main {
    padding: 28px 65px;
  }
}
@media (max-width: 1050px) {
  aside {
    width: 190px;
    padding: 28px 18px;
  }
  main {
    margin-left: 190px;
    padding: 25px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .hero-art {
    width: 120px;
    font-size: 60px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
}
@media (max-width: 650px) {
  aside {
    inset: auto 0 0 0;
    width: 100%;
    height: 73px;
    padding: 0;
    z-index: 5;
    border-top: 1px solid var(--line);
    border-right: 0;
  }
  .brand,
  .brand-note,
  .side-bottom {
    display: none;
  }
  nav {
    display: flex;
    margin: 0;
    height: 100%;
    justify-content: space-around;
    gap: 0;
  }
  nav button {
    flex: 1;
    padding: 9px 2px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    border-radius: 0;
  }
  nav .icon {
    font-size: 21px;
  }
  main {
    margin: 0;
    padding: 18px 17px 85px;
  }
  header {
    padding-bottom: 15px;
  }
  header > span {
    font-size: 8px;
  }
  h1 {
    font-size: 30px;
  }
  .intro {
    margin: 26px 0 20px;
  }
  .intro p {
    font-size: 13px;
  }
  .date-pill {
    font-size: 10px;
    padding: 8px;
  }
  .hero {
    padding: 22px;
  }
  .hero h2 {
    font-size: 23px;
  }
  .hero-art {
    display: none;
  }
  .stats {
    gap: 7px;
    margin: 16px 0 24px;
  }
  .stat {
    padding: 13px 10px;
  }
  .stat .value {
    font-size: 23px;
  }
  .stat .eyebrow {
    font-size: 8px;
    letter-spacing: 0.6px;
  }
  .stat p {
    font-size: 9px;
  }
  .card {
    padding: 18px;
  }
  .columns {
    gap: 0;
  }
  .week {
    gap: 4px;
  }
  .day {
    font-size: 9px;
    padding: 10px 2px;
  }
  .day strong {
    font-size: 16px;
    margin: 6px 0;
  }
  .ingredient-row {
    grid-template-columns: 1.5fr 0.8fr 1fr;
    gap: 5px;
  }
  .ingredient-row select:last-child {
    grid-column: 1/-1;
  }
  .grid3 {
    grid-template-columns: 1fr;
  }
  .grid2 {
    gap: 10px;
  }
  .row button {
    flex-shrink: 0;
  }
  footer {
    line-height: 1.7;
  }
  .section-head h2 {
    font-size: 18px;
  }
}
#cloud-status {
  font-size: 11px;
  color: #62755e;
  padding: 9px 0;
  line-height: 1.5;
}
#cloud-status.error {
  background: #fff0e8;
  border: 1px solid #dabbb0;
  color: #914736;
  padding: 12px;
  border-radius: 8px;
  position: sticky;
  top: 0;
  z-index: 4;
}
.signed-out aside,
.signed-out header,
.signed-out footer {
  display: none;
}
.signed-out main {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login {
  max-width: 470px;
  width: 100%;
  padding: 32px;
}
.login .brand {
  display: block;
  margin-bottom: 25px;
}
.login h1 {
  font-size: 30px;
}
.login p {
  font-size: 14px;
}
.login button {
  margin-top: 15px;
  width: 100%;
}
#auth-message {
  min-height: 1.5em;
}
.private-label {
  font-size: 11px;
  color: var(--muted);
}
#logout {
  margin-top: 10px;
  font-size: 12px;
}
.quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.quick-actions button {
  font-size: 12px;
}
#app {
  min-width: 0;
}
.ingredient-filter {
  margin-bottom: 15px;
}
.ingredient-list {
  max-height: 320px;
  overflow: auto;
  padding-right: 8px;
}
[hidden] {
  display: none !important;
}
#save-recovery {
  padding: 10px 0 15px;
}
#save-recovery button {
  font-size: 12px;
}
.signed-out #cloud-status,
.signed-out #save-recovery {
  display: none !important;
}
#mobile-logout {
  font-size: 12px;
}
@media (max-width: 650px) {
  header .row {
    gap: 4px;
  }
  header button {
    padding: 9px;
    font-size: 11px;
  }
  .section-head {
    gap: 10px;
    flex-wrap: wrap;
  }
  .meal-row p {
    line-height: 1.7;
  }
}
.food-card .meal-content {
  width: 100%;
}
.dish-title {
  font-size: 19px;
  margin: 8px 0 14px;
}
.food-items {
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
}
.food-items li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.food-items small {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 11px;
}
.food-actions {
  margin-top: 15px;
}
.cooking-tip {
  font-size: 13px;
  color: #66745f;
  line-height: 1.7;
  background: #f3f5ed;
  padding: 14px;
  border-radius: 9px;
}
.meal-details {
  margin-top: 20px;
  font-size: 12px;
}
.meal-details button {
  margin: 10px 0;
}
.menu-toolbar {
  margin: 15px 0 22px;
}
.meal-date {
  margin: 18px 0;
}
.meal-date label {
  margin: 0;
  font-size: 11px;
}
.meal-date input {
  width: 155px;
  margin-top: 5px;
}
.shopping-category h2 {
  margin-bottom: 18px;
}
.shopping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.shopping-item h3 {
  margin: 0 0 6px;
}
.shopping-item .help {
  margin: 5px 0 0;
}
.shopping-item.is-ready > div:first-child {
  opacity: 0.55;
}
.shopping-item.is-ready h3 {
  text-decoration: line-through;
}
.food-card .primary:disabled {
  cursor: default;
  opacity: 0.55;
}
.meal-row .meal-content {
  width: 100%;
}
.meal-row .dish-title {
  font-size: 15px;
}
.meal-row .food-items {
  font-size: 12px;
}
.meal-row .food-items li {
  font-size: 12px;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
@media (max-width: 650px) {
  .shopping-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .shopping-item > .row {
    justify-content: flex-start;
    gap: 24px;
  }
  .dish-title {
    font-size: 18px;
  }
  .food-items li {
    font-size: 13px;
  }
  .meal-date {
    gap: 12px;
  }
  .meal-date strong {
    font-size: 14px;
  }
}
.food-nav {
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.preference-grid,
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
}
.recipe-art {
  font-size: 48px;
  background: #e8efe6;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  color: #34795a;
}
.weight-reminder {
  border: 2px solid #34795a;
  background: #eef5e9;
}
.food-card .pill {
  margin: 8px 0;
}
.card svg {
  width: 100%;
  height: auto;
}
.card progress {
  width: 100%;
  accent-color: #34795a;
}
#menu-print {
  display: none;
}
@media print {
  body > * {
    display: none !important;
  }
  body > #menu-print {
    display: block !important;
    color: #111;
    font: 11pt Arial;
    background: white;
    margin: 0;
    padding: 10mm;
  }
  #menu-print p {
    margin: 0 0 6pt;
    break-inside: avoid;
  }
  @page {
    size: A4;
    margin: 12mm;
  }
}
