:root {
  --bg: #111b21;
  --bg-elevated: #1f2c34;
  --surface: #111b21;
  --surface-solid: #111b21;
  --surface-hover: #182229;
  --border: rgba(134, 150, 160, 0.18);
  --border-strong: rgba(134, 150, 160, 0.28);
  --text: #e9edef;
  --muted: #8696a0;
  --accent: #00a884;
  --accent-soft: rgba(0, 168, 132, 0.14);
  --accent-hover: #008f72;
  --danger: #ea4335;
  --danger-soft: rgba(234, 67, 53, 0.12);
  --success: #34a853;
  --success-soft: rgba(52, 168, 83, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-full: 999px;
  --nav-inner-h: 3.5rem;
  --nav-spacer-h: max(0.75rem, env(safe-area-inset-bottom, 0px));
  --nav-total-h: calc(var(--nav-inner-h) + var(--nav-spacer-h));
  --top-bar-h: 3.5rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  height: 100%;
  background: var(--bg);
  overscroll-behavior: none;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-total-h) + 0.5rem);
  line-height: 1.45;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body.no-bottom-nav {
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

.pwa-offline-banner {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fde68a;
  background: #422006;
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}

.pwa-offline-banner[hidden] {
  display: none;
}

.page {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0 0 1rem;
}

.page-header {
  margin-bottom: 1.25rem;
}

.page-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-header p,
.page-subtitle {
  margin: 0;
  padding: 0.75rem 1rem 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.page > .card:not(.recipe-detail) {
  margin-left: 1rem;
  margin-right: 1rem;
}

.page-header--recipes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.recipe-count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.messages {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.messages li {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  background: var(--success-soft);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: #a7f3d0;
}

.card {
  background: var(--surface-solid);
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 1rem;
  margin-bottom: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:active {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-danger {
  background: var(--danger-soft);
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.35);
}

.btn-row {
  display: grid;
  gap: 0.625rem;
  margin-top: 1.125rem;
}

.btn-row--2 {
  grid-template-columns: 1fr 1fr;
}

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.55;
}

.field {
  margin-bottom: 1.125rem;
}

.errorlist {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  color: #fecaca;
  font-size: 0.85rem;
}

.recipe-description {
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 1rem;
  color: #cbd5e1;
}

.recipe-detail-form {
  margin: 0;
  padding: 1.25rem 0 1rem;
}

.recipe-detail-title {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0 0 0.75rem;
  padding: 0 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.375rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.3;
}

.recipe-detail-title:focus {
  outline: none;
}

.recipe-detail-title::placeholder {
  color: var(--muted);
}

.recipe-detail-body {
  display: block;
  width: 100%;
  min-height: 10rem;
  margin: 0;
  padding: 0 1rem 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  font-family: inherit;
  line-height: 1.65;
  resize: none;
  white-space: pre-wrap;
}

.recipe-detail-body::placeholder {
  color: var(--muted);
}

.recipe-detail-body:focus {
  outline: none;
}

.recipe-detail-errors {
  margin: 0 0 0.75rem;
  padding: 0 1rem;
}

.recipe-ingredients {
  margin: 0 0 1.25rem;
}

.recipe-ingredients .shop-section-label {
  padding-top: 0;
}

.recipe-ingredient-marker {
  grid-column: 1;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: var(--radius-full);
  background: var(--muted);
  justify-self: center;
}

.recipe-ingredient-marker--compose {
  opacity: 0.35;
}

.recipe-ingredient-select {
  grid-column: 1;
}

.recipe-section-label {
  margin: 0 0 0.5rem;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.recipe-detail .empty {
  margin: 0;
  padding: 0;
  text-align: left;
  color: var(--muted);
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.top-bar-inner {
  display: grid;
  grid-template-columns: 2.75rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--top-bar-h);
  max-width: 28rem;
  margin: 0 auto;
  padding: 0 1rem 0 0.5rem;
}

.top-bar-inner--no-back {
  grid-template-columns: 1fr auto;
  padding: 0 1rem;
}

.top-bar--with-search {
  --top-bar-h: 4rem;
}

.top-bar-inner--search {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem 0.625rem 1rem;
  min-height: var(--top-bar-h);
}

.top-bar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  height: 2.75rem;
  padding: 0 0.75rem 0 0.875rem;
  border-radius: var(--radius-full);
  background: var(--surface-hover);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.top-bar-search:focus-within {
  background: var(--bg);
  border-color: var(--border-strong);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.top-bar-search-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--muted);
}

.top-bar-search-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.top-bar-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.3;
  padding: 0;
  outline: none;
}

.top-bar-search-input::placeholder {
  color: var(--muted);
}

.top-bar-search-input::-webkit-search-cancel-button,
.top-bar-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.top-bar-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.top-bar-search-clear[hidden] {
  display: none;
}

.top-bar-search-clear svg {
  width: 1rem;
  height: 1rem;
}

.top-bar-search-clear:active {
  background: rgba(134, 150, 160, 0.16);
}

.top-bar-inner--recipe-detail {
  grid-template-columns: 2.75rem 1fr auto;
  padding: 0 1rem 0 0.5rem;
}

.top-bar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
}

.top-bar-back svg {
  width: 1.25rem;
  height: 1.25rem;
}

.top-bar-back:active {
  opacity: 0.7;
}

.top-bar-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.top-bar-spacer {
  min-width: 0;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.top-bar-menu {
  position: relative;
  flex-shrink: 0;
}

.top-bar-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: 0.125rem;
  padding: 0;
  border-radius: var(--radius-full);
  color: var(--muted);
  background: transparent;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
}

.top-bar-menu-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.top-bar-menu-btn.is-open,
.top-bar-menu-btn:active {
  color: var(--text);
}

.top-bar-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  min-width: 10rem;
  padding: 0.25rem 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  z-index: 100;
}

.top-bar-menu-dropdown[hidden] {
  display: none;
}

.top-bar-menu-item {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  text-align: left;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 400;
  font-family: inherit;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.top-bar-menu-form {
  margin: 0;
}

.top-bar-menu-item:active {
  background: var(--surface-hover);
}

.top-bar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  color: var(--accent);
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.top-bar-action:active {
  opacity: 0.75;
}

.top-bar-action:disabled {
  opacity: 0.45;
  cursor: default;
}

.top-bar-action--danger {
  color: var(--danger);
}

.top-bar-action--sm {
  min-height: 2rem;
  padding: 0 0.65rem;
  font-size: 0.875rem;
}

.top-bar-action--cta {
  color: #fff;
  background: var(--accent);
}

.top-bar-action--cta:active {
  background: var(--accent-hover);
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-main {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-weight: 500;
  font-size: 0.9375rem;
}

.recipe-stack {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface-solid);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.recipe-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  min-height: 3.25rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.recipe-row:last-child {
  border-bottom: none;
}

.recipe-row:active {
  background: var(--surface-hover);
}

.recipe-row-body {
  flex: 1;
  min-width: 0;
}

.recipe-row-title {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
}

.recipe-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.recipe-health {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.recipe-health-icon {
  width: 1.75rem;
  height: 1.75rem;
}

.recipe-health--good {
  color: var(--success);
}

.recipe-health--medium {
  color: #fbbc04;
}

.recipe-health--bad {
  color: var(--danger);
}

.recipe-detail-health {
  display: flex;
  justify-content: flex-end;
  padding: 0 1rem 0.25rem;
  min-height: 1.75rem;
}

.recipe-detail-health:empty {
  display: none;
}

.recipe-row-chevron {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--muted);
}

.recipe-row-chevron svg {
  width: 1.125rem;
  height: 1.125rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  margin: 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background: var(--surface-hover);
  font-size: 1.375rem;
  margin-bottom: 0.875rem;
  line-height: 1;
}

.empty-state-title {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 500;
}

.empty-state-text {
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 16rem;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
  font-size: 0.9375rem;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  z-index: 100;
}

.bottom-nav-inner {
  flex: 0 0 auto;
  max-width: 28rem;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: var(--nav-inner-h);
  padding: 0;
}

.bottom-nav-spacer {
  flex: 0 0 auto;
  width: 100%;
  height: var(--nav-spacer-h);
  min-height: 1.125rem;
  background: var(--bg-elevated);
}

.fab {
  position: fixed;
  z-index: 110;
  right: max(1.25rem, calc((100vw - 28rem) / 2 + 1.25rem));
  bottom: calc(var(--nav-total-h) + 1rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, transform 0.12s ease;
}

.fab:active {
  background: var(--accent-hover);
  transform: scale(0.96);
}

.nav-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  margin: 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.nav-label {
  display: block;
  line-height: 1;
  white-space: nowrap;
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active .nav-icon-wrap {
  background: transparent;
  color: var(--accent);
}

.nav-link:active {
  transform: scale(0.94);
  transition: transform 0.08s ease;
}

.nav-link.active:active {
  transform: scale(0.96);
}

body.app-nav-pending .page {
  opacity: 0.72;
  pointer-events: none;
}

body.app-nav-pending .bottom-nav {
  pointer-events: auto;
}

body.app-nav-pending .page::before {
  content: "";
  position: fixed;
  top: calc(var(--top-bar-h, 3.5rem) + 1rem);
  left: 50%;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: -0.875rem;
  border: 2px solid rgba(134, 150, 160, 0.35);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: app-nav-spin 0.7s linear infinite;
  z-index: 90;
}

@keyframes app-nav-spin {
  to {
    transform: rotate(360deg);
  }
}

.nav-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 0;
  color: inherit;
}

.nav-icon-wrap svg {
  width: 1.375rem;
  height: 1.375rem;
}

.nav-link--add {
  justify-content: center;
  gap: 0.15rem;
  padding: 0;
}

.nav-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.nav-link--add.active {
  color: var(--accent);
}

.nav-link--add.active .nav-fab {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
}

.pwa-install {
  margin-bottom: 0.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pwa-install-title {
  margin: 0 0 0.35rem;
  font-size: 1.0625rem;
  font-weight: 500;
}

.pwa-install-text {
  margin: 0 0 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--muted);
}

.pwa-install-help {
  width: min(22rem, calc(100vw - 2rem));
  margin: auto;
  padding: 1.25rem 1rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  color: var(--text);
}

.pwa-install-help::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.pwa-install-help-title {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 500;
}

.pwa-install-help-steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

.pwa-install-help-steps li + li {
  margin-top: 0.5rem;
}

.pwa-install-help-steps strong {
  color: var(--text);
  font-weight: 500;
}

.family-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0.5rem;
}

.family-card {
  margin-bottom: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.family-card-head {
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.family-card-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  min-width: 0;
}

.family-invite-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.875rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-md);
  background: var(--accent);
}

.family-invite-link:active {
  background: var(--accent-hover);
}

.family-members-label {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.family-language-form {
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.family-language-select {
  display: block;
  width: 100%;
  margin: 0.35rem 0 0.75rem;
}

.family-language-save {
  width: 100%;
}

.family-members {
  margin: 0;
  padding: 0;
  list-style: none;
}

.family-member {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.family-member:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.family-member:first-child {
  padding-top: 0.25rem;
}

.family-member-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.family-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
}

.family-member-name {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-you {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.shop-add-item {
  margin: 0;
  padding: 0.875rem 1rem 0.875rem calc(1rem + 1.125rem + 0.75rem);
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.shop-section-label {
  margin: 0;
  padding: 0.75rem 1rem 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  background: var(--bg);
}

.shop-list {
  margin: 0;
  padding: 0 1rem;
  list-style: none;
  background: var(--surface-solid);
}

.shop-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

.shop-item:last-child {
  border-bottom: none;
}

.shop-toggle-form,
.shop-edit-form,
.shop-delete-form {
  margin: 0;
}

.shop-toggle-form {
  flex-shrink: 0;
  width: 1.125rem;
}

.shop-toggle-form--compose {
  pointer-events: none;
}

.shop-item-body {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.shop-edit-form {
  flex: 1;
  min-width: 0;
}

.shop-delete-form[hidden] {
  display: none;
}

.shop-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.shop-delete-btn:active {
  color: var(--danger);
}

.shop-checkbox {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1.5px solid rgba(233, 237, 239, 0.72);
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
}

.shop-checkbox:checked {
  border-color: var(--accent);
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.875rem;
}

.shop-checkbox:focus {
  outline: none;
  box-shadow: none;
}

.shop-checkbox:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.shop-checkbox--compose {
  pointer-events: none;
  cursor: default;
}

.shop-item--compose .shop-compose-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
  font-family: inherit;
  min-height: auto;
}

.shop-item--compose .shop-compose-input:focus {
  outline: none;
  box-shadow: none;
}

.shop-compose-form {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.shop-item-text {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
  word-break: break-word;
  cursor: text;
  border-bottom: 1px solid transparent;
  box-sizing: border-box;
}

.shop-item-text[hidden] {
  display: none;
}

.shop-edit-input {
  display: none;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
  font-family: inherit;
  min-height: auto;
  box-sizing: border-box;
}

.shop-edit-input:not([hidden]) {
  display: block;
}

.shop-edit-input:focus {
  outline: none;
  box-shadow: none;
}

.menu-scroll-wrap {
  display: flex;
  flex-direction: column;
}

.menu-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.menu-week-block {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  scroll-margin-top: calc(var(--top-bar-h) + 0.75rem);
  padding: 1.75rem 0 0.25rem;
}

.menu-week-block:first-child {
  padding-top: 0.75rem;
}

.menu-week-block + .menu-week-block {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.menu-week-head {
  padding: 0 1rem 0.375rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.menu-week.card {
  margin-bottom: 0;
  padding: 0 1rem;
  background: var(--surface-solid);
  border: none;
  border-radius: 0;
}

.menu-week-heading {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}

.menu-week-block.is-current .menu-week-heading {
  color: var(--accent);
}

.menu-week-health {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.75rem;
  padding: 0 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}

.menu-week-health--good {
  background: var(--success);
}

.menu-week-health--medium {
  background: #fbbc04;
}

.menu-week-health--bad {
  background: var(--danger);
}

.menu-day {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head head"
    "meal link";
  column-gap: 0.5rem;
  row-gap: 0.25rem;
  padding: 0.75rem 0;
  background: transparent;
}

.menu-day-head {
  grid-area: head;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.menu-meal-row {
  display: contents;
}

.menu-meal-row .menu-meal {
  grid-area: meal;
}

.menu-meal-row .menu-recipe-link {
  grid-area: link;
}

.menu-recipe-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-top: 0.125rem;
  border-radius: var(--radius-sm);
  color: var(--accent);
  text-decoration: none;
  flex-shrink: 0;
}

.menu-recipe-link:active {
  background: var(--accent-soft);
}

.menu-recipe-link-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.menu-day--today {
  margin-inline: -0.25rem;
  padding: 0.75rem 0.5rem 0.75rem 0.625rem;
  background: linear-gradient(
    90deg,
    var(--accent-soft) 0%,
    rgba(0, 168, 132, 0.05) 100%
  );
  border-radius: var(--radius-md);
  box-shadow: inset 3px 0 0 var(--accent);
  scroll-margin-top: calc(var(--top-bar-h) + 0.5rem);
}

.menu-day--today .menu-day-label,
.menu-day--today .menu-day-date {
  color: var(--accent);
  font-weight: 600;
}

.menu-day-label,
.menu-day-date {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
}

.menu-meal {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
  cursor: text;
}

.menu-meal--empty {
  min-height: 1.35rem;
}

.menu-meal--empty:not(.menu-meal--hint)::before {
  content: "—";
  color: rgba(134, 150, 160, 0.35);
}

.menu-meal--hint {
  color: var(--muted);
  font-size: 0.9375rem;
}

.menu-meal[hidden] {
  display: none;
}

.menu-week-label,
.menu-week-badge {
  display: none;
}

.menu-days {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-day-date {
  flex-shrink: 0;
}

.menu-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}

.menu-meal-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  font-family: inherit;
  min-height: auto;
}

.menu-meal-input::placeholder {
  color: var(--muted);
}

.menu-meal-input:focus {
  outline: none;
  box-shadow: none;
}

.menu-meal-editor {
  position: relative;
}

.suggest-wrap {
  position: relative;
}

.recipe-detail-body-wrap {
  position: relative;
}

.menu-meal-editor[hidden] {
  display: none;
}

.menu-meal-suggestions {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 11rem;
  overflow-y: auto;
}

.menu-meal-suggestions[hidden] {
  display: none;
}

.menu-meal-suggestions--caret {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 200;
  max-width: calc(100vw - 1.5rem);
}

.menu-meal-suggestion {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
}

.menu-meal-suggestion.is-active,
.menu-meal-suggestion:active {
  background: var(--surface-hover);
}

.idea-row-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.recipe-avatar--lg {
  width: 3rem;
  height: 3rem;
  font-size: 1.25rem;
}

.idea-detail {
  padding: 1.25rem 1rem 1rem;
}

.idea-detail-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.idea-detail-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
}

.idea-section-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.idea-scores-note {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.idea-score-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.idea-score-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2.25rem;
  align-items: center;
  gap: 0.5rem;
}

.idea-score-label {
  font-size: 0.8125rem;
  color: var(--text);
}

.idea-score-bar {
  height: 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(134, 150, 160, 0.18);
  overflow: hidden;
}

.idea-score-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.idea-ingredient-list {
  margin: 0 0 1.5rem;
  padding-left: 1.1rem;
  color: var(--text);
  line-height: 1.55;
}

.idea-detail-body {
  margin: 0 0 1.5rem;
  line-height: 1.55;
  color: var(--text);
}

.idea-copy-form {
  margin-top: 0.5rem;
}

.idea-copy-btn {
  width: 100%;
}

.idea-copy-hint {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}

.recipe-category-field {
  margin: 0 0 1.25rem;
}

.recipe-category-select {
  width: 100%;
}

.recipe-filter-bar {
  position: sticky;
  top: calc(var(--top-bar-h) + env(safe-area-inset-top, 0px));
  z-index: 89;
  background: transparent;
  max-width: 28rem;
  margin: 0 auto;
}

.recipe-filter-pills {
  display: flex;
  gap: 0.75rem;
  padding: 0.375rem 1rem 0.625rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.recipe-filter-pills::-webkit-scrollbar {
  display: none;
}

.recipe-filter-pill {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.recipe-filter-pill.is-active {
  background: var(--accent-soft);
  border-color: rgba(0, 168, 132, 0.35);
  color: var(--accent);
}

.recipe-filter-panel-option {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.recipe-filter-panel-option.is-active {
  background: var(--accent-soft);
  border-color: rgba(0, 168, 132, 0.35);
  color: var(--accent);
}

.recipe-filter-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.recipe-filter-panel {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.recipe-filter-panel[hidden] {
  display: none;
}

.recipe-filter-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.recipe-filter-panel-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 28rem;
  margin: 0 auto;
  background: var(--bg-elevated);
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

.recipe-filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.recipe-filter-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.recipe-filter-panel-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.recipe-filter-panel-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recipe-filter-empty {
  margin: 1.5rem 1rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
}

body.menu-add-open {
  overflow: hidden;
}

.menu-add-panel-hint {
  margin: 0 0 0.875rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.menu-add-panel-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: min(60vh, 28rem);
  overflow-y: auto;
}

.menu-add-week-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.menu-add-days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.menu-add-day {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-add-day:active:not(:disabled) {
  background: var(--accent-soft);
  border-color: rgba(0, 168, 132, 0.35);
}

.menu-add-day--today {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
}

.menu-add-day-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.menu-add-day-date {
  font-size: 0.8125rem;
  color: var(--muted);
}

.menu-add-day-meal {
  flex: 1 1 100%;
  font-size: 0.8125rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-add-panel-success {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.menu-add-panel-success-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.menu-add-panel-success-link {
  text-align: center;
  text-decoration: none;
}

.recipe-filter-empty[hidden],
.recipe-filter-item[hidden] {
  display: none;
}

body.recipe-filter-panel-open {
  overflow: hidden;
}

