/* === Vars === */
:root {
  --vanilla: #f8ebd8;
  --strawberry: #f8b5c2;
  --chocolate: #6b4e3d;
  --neon-pink: #ff2daa;
  --ink: #2b1e16;
  --space-1: clamp(0.5rem, 1vw, 0.75rem);
  --space-2: clamp(0.75rem, 1.25vw, 1rem);
  --space-3: clamp(1rem, 2vw, 1.5rem);
  --space-4: clamp(1.5rem, 3vw, 2.5rem);
  --blur: 24px;
  --radius: 22px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --border-soft: 2px solid rgba(0, 0, 0, 0.06);
  --white: #fff;
}

/* === Reset & base === */
* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

body {
  margin: 0;
  font-family:
    "Fredoka",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Ubuntu,
    Cantarell,
    Noto Sans,
    sans-serif;
  color: var(--ink);
  background: var(--vanilla);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  opacity: 0;
  animation: fadeIn 900ms ease-out forwards;
}

/* --- fundo com bolhas --- */
.bg-bubble {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.bubble {
  position: absolute;
  filter: blur(var(--blur));
  opacity: 0.6;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.bubble.strawberry {
  background: radial-gradient(circle at 30% 30%, #ffd3e0, var(--strawberry));
}

.bubble.chocolate {
  background: radial-gradient(circle at 30% 30%, #b8957f, var(--chocolate));
}

/* --- layout principal --- */
.container {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: var(--space-3) var(--space-2);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vmin, 2rem);
  text-align: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow);
  width: min(96vw, 720px);
}

.title {
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.5px;
  margin: 0;
}

.small {
  font-size: 0.95rem;
  opacity: 0.85;
}

.actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
}

/* --- botões --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: clamp(0.55rem, 1.4vmin, 0.8rem) clamp(0.9rem, 2vmin, 1.1rem);
  font-weight: 600;
  font-size: clamp(0.95rem, 2.2vmin, 1.05rem);
  color: var(--chocolate);
  background: var(--white);
  border: var(--border-soft);
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 6px rgba(255, 45, 170, 0.12);
  color: var(--ink);
  outline: none;
}

.btn.pink {
  background: #fff;
  border-color: rgba(255, 45, 170, 0.18);
}

.btn.pink:hover {
  box-shadow: 0 0 0 6px rgba(255, 45, 170, 0.18);
}

/* --- inputs e labels --- */
form.card input,
form.card select,
form.card button[type="submit"],
form.card textarea {
  width: min(92vw, 420px);
}

input,
select,
textarea {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--neon-pink);
  box-shadow: 0 0 0 6px rgba(255, 45, 170, 0.12);
}

/* --- header / navegação --- */
header {
  display: grid;
  place-items: center;
  margin: var(--space-2) 0;
}

header .nav {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  width: fit-content;
  animation: fadeIn 0.7s ease 0.05s both;
}

.btn.active {
  color: var(--ink);
  border-color: rgba(255, 45, 170, 0.28);
  box-shadow: 0 0 0 6px rgba(255, 45, 170, 0.16);
}

/* --- calculadora --- */
.calc-wrap {
  width: 100%;
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.calc-title {
  margin: 0;
  font-size: clamp(1.15rem, 2.6vmin, 1.35rem);
  font-weight: 800;
}

.calc-form {
  display: grid;
  gap: var(--space-2);
  width: 100%;
  place-items: center;
}

.calc-grid {
  width: 100%;
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-2);
  align-items: center;
  justify-items: center;
  margin-inline: auto;
}

.calc-field {
  display: grid;
  gap: 8px;
  max-width: 18rem;
  width: 100%;
}

.calc-field span {
  font-weight: 600;
  font-size: 0.95rem;
}

.calc-field input,
.calc-field select,
.calc-field textarea {
  width: 100%;
}

.calc-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.calc-results {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: var(--space-2);
  box-shadow: var(--shadow);
  border: var(--border-soft);
}

.result-item {
  display: grid;
  gap: 6px;
  text-align: center;
}

.result-label {
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0.9;
}

.calc-results output {
  display: inline-block;
  font-weight: 800;
  font-size: clamp(1.15rem, 4.2vmin, 1.6rem);
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  width: 100%;
  min-width: 0;
}

/* --- tabela (painel) --- */
.table-wrap {
  width: min(96vw, 1100px);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  padding: var(--space-3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.table-title .date {
  font-weight: 700;
  font-size: 1.05rem;
}

.table-title .arrows {
  display: flex;
  gap: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

thead th {
  text-align: left;
  font-weight: 700;
  padding: 10px 8px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* pular para data */
.date-jump form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-jump input[type="date"] {
  width: auto;
  min-width: 160px;
}

/* --- ações na tabela --- */
.table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: var(--border-soft);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.18s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.icon-btn.edit {
  color: #2a78ff;
}

.icon-btn.trash {
  color: #ff3b30;
}

/* --- resumo do dia --- */
.summary-wrap {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.summary-header h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 800;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-2);
}

.summary-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  border: var(--border-soft);
  padding: var(--space-3);
  box-shadow: var(--shadow);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);

  min-height: 130px;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
}

/* --- receitas --- */
.recipes-page {
  place-items: start center;
  padding-block: clamp(1rem, 3vw, 2.5rem);
}

.recipes-wrap {
  width: min(96vw, 1180px);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.recipe-editor-wrap {
  width: min(96vw, 980px);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.recipes-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.recipes-hero.compact {
  margin-bottom: var(--space-3);
}

.recipes-heading {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  margin: 0;
}

.recipes-subtitle {
  margin: 8px 0 0;
  max-width: 46rem;
}

.recipes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding: 12px;
  background: rgba(255, 255, 255, 0.56);
  border: var(--border-soft);
  border-radius: 16px;
}

.recipe-search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.recipe-search input[type="search"] {
  flex: 1;
  min-width: min(100%, 260px);
  max-width: 560px;
}

.recipes-count {
  flex: 0 0 auto;
  padding-inline: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.recipes-alert {
  width: 100%;
  margin-bottom: var(--space-2);
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: var(--border-soft);
}

.recipes-alert.success {
  color: #167a2e;
}

.recipes-alert.error {
  color: #b00020;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: var(--space-3);
}

.recipe-form {
  display: grid;
  gap: var(--space-3);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: var(--border-soft);
  box-shadow: 0 12px 34px rgba(72, 42, 31, 0.08);
}

.recipe-editor-form {
  width: 100%;
}

.recipe-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.recipe-field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.recipe-field label {
  font-weight: 700;
  opacity: 0.9;
}

.recipe-title-field input {
  width: 100%;
  min-height: 48px;
}

.recipe-form input,
.recipe-form textarea {
  width: 100%;
}

.recipe-form textarea {
  min-height: 250px;
  line-height: 1.5;
  resize: vertical;
}

.recipe-form-actions {
  justify-content: flex-end;
  padding-top: var(--space-1);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.recipe-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: var(--border-soft);
  border-top: 4px solid rgba(255, 45, 170, 0.3);
  box-shadow: 0 10px 28px rgba(72, 42, 31, 0.08);
  min-height: 260px;
  align-content: start;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
}

.recipe-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.recipe-card h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  line-height: 1.2;
}

.recipe-card-body {
  display: grid;
  gap: var(--space-2);
}

.recipe-section {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.recipe-section h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
}

.recipe-section p {
  margin: 0;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

.recipe-empty {
  min-height: 240px;
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  border: var(--border-soft);
  text-align: center;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
}

.recipe-empty strong {
  font-size: 1.2rem;
}

.recipe-empty .btn {
  margin-top: 8px;
}

/* --- alimentos e diario novo --- */
.foods-page,
.diary-page {
  place-items: start center;
  padding-block: clamp(1rem, 3vw, 2.5rem);
}

.foods-wrap,
.meal-form {
  width: min(96vw, 1120px);
}

.food-editor-wrap {
  width: min(96vw, 880px);
}

.foods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--space-2);
}

.food-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: var(--border-soft);
  box-shadow: 0 10px 26px rgba(72, 42, 31, 0.08);
}

.food-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.food-card h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.food-card form {
  margin: 0;
}

.food-macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
}

.food-macros div {
  display: grid;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.food-macros dt {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.72;
}

.food-macros dd {
  margin: 0;
  font-weight: 800;
}

.food-notes {
  margin: 0;
  line-height: 1.45;
}

.food-form-grid,
.meal-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.food-form textarea {
  min-height: 120px;
}

.meal-form {
  display: grid;
  gap: var(--space-3);
}

.meal-builder {
  display: grid;
  gap: var(--space-2);
}

.meal-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.meal-builder-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

.meal-mode-toggle {
  grid-column: 1 / -1;
  display: inline-flex;
  gap: 8px;
  justify-self: start;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: var(--border-soft);
}

.meal-mode-toggle .btn {
  min-height: 36px;
  padding: 8px 14px;
}

.add-food-row {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
}

.meal-items {
  display: grid;
  gap: 10px;
}

.meal-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 138px) minmax(94px, 128px) 40px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  border: var(--border-soft);
}

.custom-item-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(82px, 1fr));
  gap: 10px;
  padding-top: 2px;
}

.custom-item-fields[hidden] {
  display: none !important;
}

.food-picker,
.amount-field,
.measure-field {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  font-weight: 700;
}

.food-picker input,
.amount-field input,
.measure-field select,
.custom-item-fields input,
.meal-top-grid input,
.meal-top-grid select {
  width: 100%;
}

.food-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  border: var(--border-soft);
  box-shadow: 0 16px 40px rgba(72, 42, 31, 0.18);
}

.food-result,
.food-result-empty {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
}

.food-result:hover,
.food-result:focus-visible {
  background: rgba(248, 181, 194, 0.28);
  outline: none;
}

.food-result span,
.food-result-empty {
  font-size: 0.88rem;
  opacity: 0.72;
}

.meal-live-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.meal-live-summary div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: var(--border-soft);
  text-align: center;
}

.meal-live-summary span {
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0.72;
}

.meal-live-summary strong {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
}

.meal-table-scroll {
  overflow: auto;
  border-radius: var(--radius);
}

.summary-info {
  display: grid;
  gap: 6px;
}

.summary-label {
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.9;
}

.summary-value {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 800;
}

.summary-goal {
  font-size: 0.9rem;
  opacity: 0.72;
}

/* --- círculo macro --- */
.macro-ring {
  --size: 78px;

  width: var(--size);
  height: var(--size);

  border-radius: 999px;

  position: relative;

  flex-shrink: 0;

  background: conic-gradient(
    var(--ring-color) calc(var(--progress) * 1%),
    rgba(0, 0, 0, 0.08) 0
  );

  display: grid;
  place-items: center;

  transition:
    background 0.4s ease,
    transform 0.2s ease;
}

.macro-ring:hover {
  transform: scale(1.04);
}

.macro-ring-inner {
  width: 58px;
  height: 58px;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.95);

  border: 2px solid rgba(255, 255, 255, 0.7);

  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.04),
    0 2px 10px rgba(0, 0, 0, 0.06);
}

/* --- footer --- */
.app-footer {
  position: relative;
  justify-self: center;
  width: fit-content;
  white-space: nowrap;
  text-align: center;
  margin: var(--space-2) 0;
  font-size: clamp(0.85rem, 1.8vmin, 0.95rem);
  opacity: 0.7;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: var(--space-1) var(--space-3);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.app-footer p {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: inherit;
}

[hidden] {
  display: none !important;
}

/* --- animações --- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.card,
.table-wrap,
.summary-card,
.recipe-card,
.recipe-form {
  opacity: 0;
  animation: fadeIn 0.8s ease 0.12s forwards;
}

/* --- responsivo --- */
@media (max-width: 720px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: unset;
  }

  .recipes-hero {
    display: grid;
    align-items: start;
  }

  .recipe-search {
    justify-content: flex-start;
    width: 100%;
  }

  .recipe-search input[type="search"] {
    flex: 1;
    min-width: 180px;
    max-width: none;
  }

  .recipe-editor-grid {
    grid-template-columns: 1fr;
  }

  .food-form-grid,
  .meal-top-grid {
    grid-template-columns: 1fr;
  }

  .meal-live-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .recipes-toolbar {
    display: grid;
  }

  .recipes-count {
    grid-row: 1;
    padding-inline: 2px;
  }
}

@media (max-width: 520px) {
  header .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: min(94vw, 460px);
    padding: 14px;
    border-radius: 34px;
  }

  header .nav .btn {
    min-width: 120px;
    justify-content: center;
  }

  .table-title {
    align-items: flex-start;
  }

  .date-jump form {
    width: 100%;
  }

  .date-jump input[type="date"] {
    flex: 1;
    min-width: 0;
  }

  .calc-grid {
    grid-template-columns: 1fr;
  }

  .calc-results {
    grid-template-columns: 1fr;
  }

  .summary-card {
    flex-direction: row;
    align-items: center;
  }

  .recipe-card-head {
    display: grid;
  }

  .recipes-wrap,
  .recipe-editor-wrap {
    width: min(94vw, 520px);
    padding: var(--space-2);
  }

  .recipe-editor-form {
    padding: var(--space-2);
  }

  .recipes-hero .btn,
  .recipe-search .btn {
    width: 100%;
  }

  .recipe-search input[type="search"] {
    width: 100%;
    min-width: 0;
  }

  .recipe-form-actions {
    display: grid;
  }

  .recipe-form-actions .btn {
    width: 100%;
  }

  .food-card-head {
    display: grid;
  }

  .food-macros {
    grid-template-columns: repeat(2, 1fr);
  }

  .meal-item-row {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 1fr) 40px;
    gap: 8px;
    padding: 10px;
  }

  .meal-item-row .food-picker {
    grid-column: 1 / -1;
  }

  .meal-item-row .amount-field {
    grid-column: 1 / 2;
  }

  .meal-item-row .measure-field {
    grid-column: 2 / 3;
  }

  .meal-mode-toggle {
    width: 100%;
    justify-self: stretch;
  }

  .meal-mode-toggle .btn {
    flex: 1;
  }

  .custom-item-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custom-item-fields .recipe-field:first-child {
    grid-column: 1 / -1;
  }

  .meal-live-summary {
    gap: 8px;
  }

  .meal-live-summary div {
    padding: 12px 8px;
  }

  .meal-table-scroll table {
    min-width: 620px;
  }

  .macro-ring {
    --size: 72px;
  }

  .macro-ring-inner {
    width: 54px;
    height: 54px;
  }
}

/* --- acessibilidade --- */
@media (prefers-reduced-motion: reduce) {
  body,
  .card,
  .table-wrap,
  .summary-card,
  .recipe-card,
  .recipe-form {
    animation: none;
    opacity: 1;
  }
}
