:root {
  color-scheme: light;
  --bg: #fff7ed;
  --bg-soft: #fffbf5;
  --card: #ffffff;
  --card-warm: #fff3df;

  --text: #2a2118;
  --muted: #7c6f64;
  --muted-2: #a49486;

  --accent: #f97316;
  --accent-dark: #ea580c;
  --accent-soft: #fed7aa;

  --green: #22c55e;
  --green-soft: #dcfce7;

  --red: #ef4444;
  --red-soft: #fee2e2;

  --yellow: #facc15;
  --yellow-soft: #fef9c3;

  --border: rgba(124, 111, 100, 0.16);
  --shadow: 0 14px 40px rgba(154, 94, 38, 0.12);
  --shadow-soft: 0 8px 24px rgba(154, 94, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 320px),
    linear-gradient(180deg, #fff7ed 0%, #fffbf5 45%, #fff7ed 100%);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 34px;
  font-weight: 900;
  line-height: 0.98;
}

h2 {
  margin-bottom: 8px;
  font-size: 25px;
  line-height: 1.08;
}

h3 {
  font-size: 18px;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.app-shell {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 96px;
}

.app-shell:has(.recipe-page-shell) {
  max-width: 680px;
  padding-bottom: 132px;
}

.hero-card {
  display: grid;
  gap: 20px;
  margin-top: 10px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 0%, rgba(250, 204, 21, 0.38), transparent 160px),
    linear-gradient(145deg, #ffffff 0%, #fff3df 100%);
  box-shadow: var(--shadow);
  padding: 24px;
  overflow: hidden;
}

.hero-card p {
  margin-bottom: 0;
  font-size: 17px;
}

.hero-badge,
.soft-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-dark);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.plate-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 20px;
  background: var(--card-warm);
  font-size: 30px;
}

.hero-preview strong,
.hero-preview span {
  display: block;
}

.hero-preview span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.feature-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.feature-card > span {
  font-size: 24px;
}

.feature-card strong {
  font-size: 17px;
}

.feature-card p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.38;
}

.pwa-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.pwa-hint p {
  margin: 0;
}

.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.app-footer a {
  color: inherit;
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--accent-dark);
}

.android-teaser {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.android-teaser h2 {
  margin: 12px 0 6px;
  font-size: 24px;
}

.android-teaser p {
  margin-bottom: 0;
}

.android-hero {
  min-height: auto;
}

.steps-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--text);
  font-weight: 750;
  line-height: 1.45;
}

.btn {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  padding: 0 18px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary,
.primary-action {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.btn-secondary,
.secondary-action {
  border: 1px solid var(--accent-soft);
  background: #ffffff;
  color: var(--accent-dark);
}

.btn-ghost {
  min-height: 48px;
  background: transparent;
  color: var(--muted);
}

.primary-action,
.secondary-action,
button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  padding: 0 18px;
  font-weight: 800;
}

.section-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.form-hero,
.page-head {
  margin-bottom: 18px;
}

.warm-head {
  border: 1px solid rgba(249, 115, 22, 0.16);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 243, 223, 0.88));
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.warm-head h1 {
  margin-top: 12px;
}

.hint-card,
.note-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.hint-card strong,
.hint-card span,
.note-card strong,
.note-card p {
  display: block;
}

.hint-card span,
.note-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-card,
.day-card,
.macro-card,
.shopping-card,
.admin-panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.card-title,
.shopping-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.card-title > span,
.shopping-head > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  background: var(--card-warm);
  font-size: 22px;
}

.card-title h2,
.shopping-head h2 {
  margin-bottom: 3px;
  font-size: 22px;
}

.card-title p,
.shopping-head p {
  margin-bottom: 0;
  font-size: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.input,
input,
select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  padding: 14px 16px;
  font-size: 16px;
  outline: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

textarea.input {
  min-height: 220px;
  line-height: 1.5;
  resize: vertical;
}

.audit-textarea {
  white-space: pre-wrap;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pill-grid {
  display: grid;
  gap: 10px;
}

.pill-option {
  color: var(--text);
}

.pill-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pill-option span {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 850;
}

.pill-option input:checked + span {
  border-color: var(--accent-soft);
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.12);
}

.quiet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quiet-tags span,
.day-targets span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--card-warm);
  color: var(--accent-dark);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
}

.usage-card {
  margin-top: 14px;
}

.usage-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.usage-list li::marker {
  color: var(--accent-dark);
}

.sticky-cta {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 251, 245, 0.88);
  backdrop-filter: blur(14px);
  padding: 10px;
}

.sticky-cta .btn {
  width: 100%;
}

.result-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.18), transparent 180px),
    rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}

.success-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--green-soft);
  color: #15803d;
  font-size: 30px;
  font-weight: 900;
}

.result-hero p {
  margin-bottom: 0;
}

.preview-hero {
  border-color: rgba(249, 115, 22, 0.18);
  background:
    radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.16), transparent 180px),
    rgba(255, 255, 255, 0.86);
}

.macro-card {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.selected-plan-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(254, 215, 170, 0.35), transparent 150px),
    rgba(255, 255, 255, 0.92);
}

.macro-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.macro-main span,
.day-kicker,
.meal-body span,
.admin-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.macro-main strong {
  font-size: 30px;
  line-height: 1;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.plan-summary-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-summary-lines span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(254, 215, 170, 0.56);
  color: var(--accent-dark);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.macro-grid div {
  display: grid;
  justify-items: center;
  border-radius: 18px;
  background: var(--card-warm);
  padding: 12px 8px;
}

.macro-grid b {
  font-size: 18px;
}

.macro-grid span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.macro-note {
  margin-bottom: 0;
  font-size: 13px;
}

.preview-stats {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mini-stat-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.mini-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.mini-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
}

.mini-stat-card p {
  margin: 8px 0 0;
  font-size: 14px;
}

.preview-day {
  margin-top: 14px;
}

.day-list,
.shopping-list,
.table-list,
.admin-card-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.admin-grid {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.admin-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.admin-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.day-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.day-header h2 {
  margin: 3px 0 0;
}

.day-kcal,
.meal-kcal {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
}

.day-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

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

.meal-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  padding: 12px;
}

.meal-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  background: var(--bg);
  font-size: 22px;
}

.meal-body {
  min-width: 0;
}

.meal-body strong,
.meal-body small {
  display: block;
}

.meal-body strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.meal-title-link {
  color: inherit;
  text-decoration: none;
}

.meal-title-link:hover {
  text-decoration: underline;
}

.recipe-inline-link {
  color: var(--primary);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 800;
  margin-top: 0.2rem;
  text-decoration: none;
}

.meal-actions-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 0.25rem;
}

.meal-kind-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.2;
}

.recipe-inline-link:hover {
  text-decoration: underline;
}

.meal-body small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.meal-kcal {
  min-width: 44px;
  text-align: center;
}

.meal-details {
  margin: -4px 0 6px 54px;
  border-left: 2px solid var(--accent-soft);
  padding-left: 12px;
}

.composition {
  color: var(--muted);
  font-size: 14px;
}

.composition strong {
  color: var(--text);
}

.composition ul {
  margin: 7px 0 0;
  padding-left: 18px;
  line-height: 1.45;
}

.composition li + li {
  margin-top: 3px;
}

.note,
.warning {
  margin: 8px 0 0;
  color: var(--accent-dark);
  font-size: 14px;
}

.note-card {
  margin-top: 14px;
}

.shopping-card {
  margin-top: 14px;
}

.shopping-groups {
  display: grid;
  gap: 14px;
}

.shopping-group {
  display: grid;
  gap: 8px;
}

.shopping-group h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 16px;
}

.shopping-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-radius: 18px;
  background: var(--card-warm);
  padding: 14px 16px;
}

.shopping-total span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.shopping-total strong {
  color: var(--accent-dark);
  font-size: 24px;
  white-space: nowrap;
}

.shopping-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.category-totals {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  padding: 12px;
}

.category-totals > strong {
  font-size: 15px;
}

.category-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.category-total-row b {
  color: var(--accent-dark);
}

.shopping-reset {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
}

.shopping-item,
.shopping-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  padding: 12px 14px;
}

.shopping-item input,
.shopping-row input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--accent);
}

.shopping-item span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 750;
}

.shopping-item strong {
  color: var(--accent-dark);
}

.result-shopping .shopping-item {
  grid-template-columns: 1fr auto;
}

.shopping-check-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  padding: 12px 14px;
  cursor: pointer;
}

.shopping-check-input {
  width: 22px;
  min-height: 22px;
  margin-top: 4px;
  accent-color: var(--accent);
}

.shopping-check-content {
  min-width: 0;
}

.shopping-check-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.shopping-check-title {
  min-width: 0;
  color: var(--text);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.shopping-check-price {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-weight: 850;
  white-space: nowrap;
}

.shopping-check-meta,
.shopping-check-buy {
  overflow-wrap: normal;
  word-break: normal;
}

.shopping-check-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.shopping-check-buy {
  margin-top: 6px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.shopping-check-card.is-checked .shopping-check-content {
  opacity: 0.58;
}

.shopping-check-card.is-checked .shopping-check-title {
  text-decoration: line-through;
}

.form-note {
  margin: 12px 0 0;
  font-size: 13px;
}

.result-tabs {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.main-tabs,
.day-tabs {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 251, 245, 0.88);
  box-shadow: var(--shadow-soft);
  padding: 8px;
}

.main-tabs {
  position: sticky;
  top: 8px;
  z-index: 4;
  grid-template-columns: repeat(3, 1fr);
  backdrop-filter: blur(14px);
}

.day-tabs {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow-x: auto;
}

.tab-button,
.day-tab,
.composition-toggle,
.accordion-toggle {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.tab-button,
.day-tab {
  min-height: 44px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.tab-button.is-active,
.day-tab.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.22);
}

.tab-panel {
  display: grid;
  gap: 14px;
}

.tab-panel[hidden],
.result-day[hidden],
.meal-details[hidden],
.shopping-list[hidden] {
  display: none;
}

.compact-day-list {
  margin-top: 0;
}

.meal-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  padding: 12px;
}

.meal-card .meal-row {
  border: 0;
  border-radius: 0;
  padding: 0;
}

.composition-toggle {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-soft);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--accent-dark);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 850;
}

.composition-toggle::after {
  content: "↓";
  margin-left: 8px;
}

.composition-toggle[aria-expanded="true"]::after {
  content: "↑";
}

.meal-card .meal-details {
  margin: 0;
  border-left: 2px solid var(--accent-soft);
  padding-left: 12px;
}

.accordion-group {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  padding: 10px;
}

.accordion-toggle {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  border-radius: 14px;
  background: var(--card-warm);
  color: var(--text);
  padding: 0 12px;
  font-weight: 900;
}

.accordion-toggle b {
  display: inline-flex;
  min-width: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 13px;
}

.accordion-toggle::after {
  content: "↓";
  color: var(--accent-dark);
  margin-left: 8px;
}

.accordion-toggle[aria-expanded="true"]::after {
  content: "↑";
}

.accordion-group .shopping-list {
  margin-top: 10px;
}

.recipe-search {
  align-items: end;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.recipe-group {
  margin-top: 1.2rem;
}

.recipe-group h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.recipe-card-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.recipe-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: inherit;
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  text-decoration: none;
}

.recipe-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.recipe-card span,
.recipe-card small {
  color: var(--muted);
}

.recipe-card strong {
  overflow-wrap: anywhere;
}

.recipe-page-shell {
  display: grid;
  gap: 1rem;
  margin: 0 auto;
  max-width: 680px;
  width: 100%;
}

.recipe-page-shell .macro-card,
.recipe-page-shell .result-hero {
  margin-top: 0;
}

.recipe-detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  width: 100%;
}

.recipe-panel {
  min-width: 0;
}

.recipe-list,
.recipe-steps {
  margin: 0.8rem 0 0;
}

.recipe-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  padding-left: 0;
}

.recipe-list li {
  align-items: start;
  border-bottom: 1px solid rgba(124, 112, 97, 0.16);
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) max-content;
  padding: 0.45rem 0;
}

.recipe-list li:last-child {
  border-bottom: 0;
}

.recipe-list span {
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: break-word;
}

.recipe-list b {
  color: var(--text);
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.recipe-steps {
  line-height: 1.6;
  padding-left: 1.45rem;
}

.recipe-steps li {
  margin: 0.55rem 0;
  padding-left: 0.25rem;
}

.recipe-page-shell .bottom-actions {
  margin-bottom: 1rem;
}

.bottom-actions {
  position: sticky;
  bottom: 12px;
  z-index: 6;
  display: grid;
  gap: 8px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 251, 245, 0.88);
  backdrop-filter: blur(14px);
  padding: 10px;
}

.app-shell:has(.preview-payment-actions) {
  padding-bottom: 132px;
}

.preview-payment-actions {
  gap: 10px;
  margin-top: 20px;
  padding: 12px;
}

.payment-cta {
  min-height: 60px;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.payment-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
}

.preview-payment-actions .btn-ghost {
  margin-top: 2px;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: rgba(255, 251, 245, 0.92);
  box-shadow: 0 -10px 30px rgba(154, 94, 38, 0.1);
  backdrop-filter: blur(14px);
}

.bottom-nav a {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.bottom-nav span {
  font-size: 18px;
}

.admin-shell {
  max-width: 860px;
  padding-bottom: 42px;
}

.admin-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.admin-nav a,
.status,
.status-pill,
.source-badge,
.plan-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: var(--card-warm);
  color: var(--accent-dark);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.admin-nav a {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

.admin-recipe-card,
.table-row,
.match-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.admin-recipe-card {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.admin-recipe-card strong,
.table-row strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
}

.dashboard-grid,
.quick-links,
.filter-bar {
  display: grid;
  gap: 12px;
}

.quick-links {
  margin-top: 14px;
}

.filter-bar {
  margin-bottom: 14px;
}

.match-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.why-box,
.macro-details {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.why-box summary,
.macro-details summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 850;
}

.status-approved,
.status-ok,
.status-ready {
  background: var(--green-soft);
  color: #15803d;
}

.status-draft,
.status-warning,
.status-needs_attention {
  background: var(--yellow-soft);
  color: #854d0e;
}

.status-archived,
.status-bad,
.status-needs_review {
  background: var(--red-soft);
  color: #b91c1c;
}

@media (max-width: 719px) {
  .recipe-search,
  .recipe-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 720px) {
  .app-shell {
    padding-top: 34px;
  }

  .admin-shell {
    max-width: 920px;
  }

  .dashboard-grid,
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  h1 {
    font-size: 32px;
  }

  .hero-card,
  .form-card,
  .day-card,
  .macro-card,
  .shopping-card {
    padding: 16px;
  }
}

@media (max-width: 380px) {
  .shopping-check-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}
