:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #edf5f2;
  --surface-strong: #e2efeb;
  --text: #172033;
  --text-2: #5f6d79;
  --text-3: #8a96a0;
  --primary: #0f766e;
  --primary-2: #115e59;
  --primary-soft: #dff3ee;
  --apricot: #f2a66f;
  --apricot-soft: #ffeadb;
  --lavender: #8a79b8;
  --lavender-soft: #ece7f8;
  --berry: #b95f80;
  --berry-soft: #f7e4eb;
  --yellow: #d6a635;
  --yellow-soft: #fff3ce;
  --danger: #b94f4f;
  --danger-soft: #fde8e8;
  --border: #dce5e1;
  --shadow-sm: 0 2px 10px rgba(28, 45, 40, 0.06);
  --shadow-md: 0 12px 32px rgba(28, 45, 40, 0.12);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --nav-height: 76px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }

#app { min-height: 100vh; }
.app-shell { min-height: 100vh; padding-bottom: calc(var(--nav-height) + 28px + env(safe-area-inset-bottom)); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--primary), #3e9f8e);
  color: white;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.23);
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-title { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.brand-sub { margin-top: 3px; color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  border: 3px solid var(--bg);
}
.avatar.olli { background: var(--primary); }
.avatar.partner { background: var(--berry); margin-left: -10px; }
.avatar-stack { display: flex; align-items: center; padding-left: 4px; }

.content { width: min(100%, 1180px); margin: 0 auto; padding: 17px 16px 0; }
.page-head { margin: 2px 2px 18px; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.page-title { margin: 5px 0 4px; font-size: clamp(26px, 7vw, 36px); line-height: 1.08; letter-spacing: -0.045em; }
.page-subtitle { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }

.quick-add {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #dff3ee 0%, #eef8f5 50%, #ffeadb 140%);
  border: 1px solid #cee7e0;
}
.quick-add::after {
  content: '';
  position: absolute;
  width: 115px;
  height: 115px;
  right: -38px;
  top: -46px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
}
.quick-copy { position: relative; z-index: 1; min-width: 0; }
.quick-title { font-size: 17px; font-weight: 700; letter-spacing: -0.025em; }
.quick-text { margin-top: 4px; color: var(--text-2); font-size: 13px; line-height: 1.35; }
.primary-btn, .secondary-btn, .ghost-btn, .danger-btn {
  border: 0;
  border-radius: 14px;
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.primary-btn { background: var(--primary); color: white; box-shadow: 0 8px 18px rgba(15,118,110,.2); }
.primary-btn:hover { background: var(--primary-2); }
.secondary-btn { background: var(--surface-soft); color: var(--primary-2); border: 1px solid #cee4dd; }
.ghost-btn { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.danger-btn { background: var(--danger-soft); color: var(--danger); }
.small-btn { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.button-icon { width: 18px; height: 18px; }

.search-row { display: flex; gap: 9px; margin-bottom: 14px; }
.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 47px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.search-box svg { width: 19px; height: 19px; color: var(--text-3); flex: 0 0 auto; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-box input::placeholder { color: var(--text-3); }
.filter-btn { width: 47px; height: 47px; border-radius: 15px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.filter-btn svg { width: 20px; height: 20px; }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 5px;
  margin-bottom: 15px;
  border-radius: 15px;
  background: #e9efec;
}
.segmented button {
  position: relative;
  border: 0;
  border-radius: 11px;
  min-height: 40px;
  padding: 0 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 3px 12px rgba(38,54,48,.08); }
.count-pill { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 4px; padding: 0 5px; border-radius: 10px; background: var(--surface-soft); color: var(--primary-2); font-size: 10px; }
.segmented button.active .count-pill { background: var(--primary-soft); }

.section-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 16px 2px 11px; }
.section-title { margin: 0; font-size: 18px; letter-spacing: -0.025em; }
.section-meta { color: var(--text-3); font-size: 12px; white-space: nowrap; }

.recipe-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.recipe-card {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 128px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.recipe-card:active { transform: scale(.988); }
.card-media { position: relative; min-height: 128px; overflow: hidden; background: #dce9e5; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media.placeholder { display: grid; place-items: center; }
.card-media.placeholder svg { width: 34px; height: 34px; color: rgba(23,32,51,.32); }
.card-media.sage { background: linear-gradient(145deg,#cfe8df,#eef7f4); }
.card-media.apricot { background: linear-gradient(145deg,#ffe0c8,#fff2e8); }
.card-media.lavender { background: linear-gradient(145deg,#e1daf4,#f5f1ff); }
.card-media.berry { background: linear-gradient(145deg,#f3dbe4,#fff0f5); }
.source-dot {
  position: absolute;
  top: 8px;
  left: 8px;
  height: 25px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 9px;
  background: rgba(255,255,255,.9);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
}
.source-dot svg { width: 13px; height: 13px; }
.card-body { min-width: 0; padding: 13px 13px 12px; display: flex; flex-direction: column; }
.card-top { display: flex; align-items: flex-start; gap: 8px; }
.card-title { margin: 0; min-width: 0; flex: 1; font-size: 16px; line-height: 1.18; letter-spacing: -0.025em; }
.favorite-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--bg); color: var(--text-3); cursor: pointer; flex: 0 0 auto; }
.favorite-btn.active { color: var(--berry); background: var(--berry-soft); }
.favorite-btn svg { width: 17px; height: 17px; }
.card-note { margin: 5px 0 9px; color: var(--text-2); font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-2);
  font-size: 10px;
  font-weight: 700;
}
.chip.apricot { background: var(--apricot-soft); color: #915525; }
.chip.lavender { background: var(--lavender-soft); color: #64518c; }
.chip.berry { background: var(--berry-soft); color: #8e4260; }
.chip.yellow { background: var(--yellow-soft); color: #8d6814; }
.chip.muted { background: #edf0f2; color: var(--text-2); }
.chip svg { width: 12px; height: 12px; }
.rating-inline { margin-left: auto; color: var(--yellow); font-size: 11px; font-weight: 700; }

.empty-state { padding: 34px 20px; text-align: center; border: 1px dashed #cbdad5; border-radius: var(--radius-lg); background: rgba(255,255,255,.55); }
.empty-icon { width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 20px; background: var(--primary-soft); color: var(--primary); }
.empty-icon svg { width: 29px; height: 29px; }
.empty-state h3 { margin: 0 0 6px; font-size: 18px; }
.empty-state p { margin: 0 auto 17px; max-width: 320px; color: var(--text-2); font-size: 13px; line-height: 1.45; }

.bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(205,221,215,.92);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 42px rgba(27,45,39,.16);
}
.nav-item { height: 60px; border: 0; border-radius: 18px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-3); font-size: 10px; font-weight: 700; cursor: pointer; }
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { background: var(--primary-soft); color: var(--primary-2); }

.fab {
  position: fixed;
  right: 20px;
  bottom: calc(var(--nav-height) + 20px + env(safe-area-inset-bottom));
  z-index: 29;
  width: 57px;
  height: 57px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 19px;
  background: var(--primary);
  color: white;
  box-shadow: 0 14px 28px rgba(15,118,110,.28);
  cursor: pointer;
}
.fab svg { width: 25px; height: 25px; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(16,25,32,.38); backdrop-filter: blur(3px); animation: fadeIn .16s ease; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
  border-radius: 27px 27px 0 0;
  background: var(--surface);
  box-shadow: 0 -20px 50px rgba(20,31,27,.18);
  animation: slideUp .22s ease;
}
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 17px; border-radius: 5px; background: #d6dfdc; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.sheet-title { margin: 0; font-size: 22px; letter-spacing: -0.035em; }
.sheet-sub { margin: 5px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.4; }
.close-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--bg); cursor: pointer; flex: 0 0 auto; }
.close-btn svg { width: 19px; height: 19px; }
.add-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.add-option { min-height: 116px; padding: 15px; text-align: left; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); cursor: pointer; }
.add-option:active { background: var(--bg); }
.option-icon { width: 39px; height: 39px; display: grid; place-items: center; margin-bottom: 11px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); }
.option-icon.apricot { background: var(--apricot-soft); color: #9c5c29; }
.option-icon.lavender { background: var(--lavender-soft); color: #65518f; }
.option-icon.berry { background: var(--berry-soft); color: #914563; }
.option-icon svg { width: 20px; height: 20px; }
.option-title { font-weight: 700; font-size: 14px; }
.option-text { margin-top: 4px; color: var(--text-3); font-size: 11px; line-height: 1.3; }

.form-grid { display: grid; gap: 13px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 12px; font-weight: 700; color: var(--text-2); }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}
.field input, .field select { min-height: 46px; }
.field textarea { min-height: 94px; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #71b8aa; box-shadow: 0 0 0 3px var(--primary-soft); }
.form-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 9px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.meal-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.meal-option { border: 1px solid var(--border); border-radius: 999px; background: var(--surface); min-height: 37px; padding: 0 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.meal-option.active { background: var(--primary-soft); color: var(--primary-2); border-color: #b8ddd3; }

.detail-page { min-height: 100vh; padding-bottom: 30px; background: var(--bg); }
.detail-hero { position: relative; height: 275px; overflow: hidden; background: linear-gradient(145deg,#cfe8df,#f8eee6); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(12,24,20,.18), transparent 35%, rgba(12,24,20,.55)); }
.detail-back, .detail-fav { position: absolute; top: calc(12px + env(safe-area-inset-top)); width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); cursor: pointer; }
.detail-back { left: 14px; }
.detail-fav { right: 14px; }
.detail-back svg, .detail-fav svg { width: 20px; height: 20px; }
.detail-fav.active { color: var(--berry); }
.detail-hero-copy { position: absolute; left: 18px; right: 18px; bottom: 18px; color: white; }
.detail-hero-copy h1 { margin: 7px 0 0; font-size: 28px; line-height: 1.05; letter-spacing: -0.045em; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.detail-content { width: min(100%, 820px); margin: -1px auto 0; padding: 17px 16px 0; }
.detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.meta-box { padding: 12px 8px; text-align: center; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.meta-value { display: block; font-size: 15px; font-weight: 700; }
.meta-label { display: block; margin-top: 3px; color: var(--text-3); font-size: 10px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 15px; }
.detail-section { margin-bottom: 13px; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.detail-section h2 { margin: 0 0 12px; font-size: 18px; letter-spacing: -0.025em; }
.ingredients { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ingredients li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 13px; line-height: 1.4; }
.ingredient-check { width: 20px; height: 20px; margin-top: -1px; border: 2px solid #c6d8d2; border-radius: 7px; flex: 0 0 auto; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 15px; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.step-num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary-2); font-size: 12px; font-weight: 700; }
.source-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg); text-decoration: none; }
.source-link-copy { min-width: 0; }
.source-link-title { font-size: 13px; font-weight: 700; }
.source-link-url { margin-top: 3px; color: var(--text-3); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-link svg { width: 18px; height: 18px; color: var(--primary); flex: 0 0 auto; }

.week-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.week-title { margin: 0; font-size: 23px; letter-spacing: -0.035em; }
.week-switch { display: flex; align-items: center; gap: 5px; }
.week-switch button { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; }
.week-switch svg { width: 18px; height: 18px; }
.day-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(58px, 1fr); gap: 7px; overflow-x: auto; padding: 1px 1px 8px; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-btn { min-height: 66px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.day-btn .dow { font-size: 10px; font-weight: 700; text-transform: uppercase; }
.day-btn .date { font-size: 17px; font-weight: 700; color: var(--text); }
.day-btn.active { background: var(--primary); color: rgba(255,255,255,.76); border-color: var(--primary); box-shadow: 0 9px 20px rgba(15,118,110,.18); }
.day-btn.active .date { color: white; }
.selected-day { margin: 14px 2px 10px; font-size: 20px; letter-spacing: -0.025em; }
.meal-stack { display: grid; gap: 12px; }
.meal-slot { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.meal-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.meal-name { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; }
.meal-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }
.meal-icon.apricot { background: var(--apricot-soft); color: #9a5928; }
.meal-icon.lavender { background: var(--lavender-soft); color: #67538d; }
.meal-icon svg { width: 17px; height: 17px; }
.slot-add { width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); cursor: pointer; }
.slot-add svg { width: 17px; height: 17px; }
.planned-recipe { display: flex; align-items: center; gap: 11px; padding: 9px; border-radius: 14px; background: var(--bg); cursor: pointer; }
.planned-thumb { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--surface-strong); flex: 0 0 auto; }
.planned-thumb img { width: 100%; height: 100%; object-fit: cover; }
.planned-thumb svg { width: 22px; height: 22px; color: var(--text-3); }
.planned-copy { min-width: 0; flex: 1; }
.planned-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planned-meta { margin-top: 4px; color: var(--text-3); font-size: 10px; }
.planned-remove { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--text-3); cursor: pointer; }
.planned-remove svg { width: 17px; height: 17px; }
.empty-slot { min-height: 58px; display: flex; align-items: center; justify-content: center; border: 1px dashed #cddbd6; border-radius: 14px; color: var(--text-3); font-size: 12px; cursor: pointer; }

.recipe-picker { display: grid; gap: 9px; }
.picker-item { display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); cursor: pointer; }
.picker-thumb { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); flex: 0 0 auto; overflow: hidden; }
.picker-thumb img { width: 100%; height: 100%; object-fit: cover; }
.picker-thumb svg { width: 22px; height: 22px; color: var(--primary); }
.picker-copy { min-width: 0; flex: 1; }
.picker-title { font-size: 14px; font-weight: 700; }
.picker-meta { margin-top: 4px; color: var(--text-3); font-size: 11px; }
.picker-check { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-soft); color: var(--primary); }
.picker-check svg { width: 16px; height: 16px; }

.rating-stars { display: flex; gap: 7px; }
.star-btn { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: #c8ced1; cursor: pointer; }
.star-btn.active { background: var(--yellow-soft); border-color: #ead797; color: var(--yellow); }
.star-btn svg { width: 20px; height: 20px; }

.more-grid { display: grid; gap: 11px; }
.profile-card { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.profile-avatars { display: flex; align-items: center; }
.profile-copy { min-width: 0; }
.profile-title { font-weight: 700; }
.profile-sub { margin-top: 3px; color: var(--text-3); font-size: 12px; }
.setting-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.setting-row { width: 100%; min-height: 58px; padding: 0 15px; border: 0; border-bottom: 1px solid var(--border); background: transparent; display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer; }
.setting-row:last-child { border-bottom: 0; }
.setting-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary); flex: 0 0 auto; }
.setting-icon svg { width: 18px; height: 18px; }
.setting-copy { min-width: 0; flex: 1; }
.setting-title { font-size: 13px; font-weight: 700; }
.setting-sub { margin-top: 3px; color: var(--text-3); font-size: 10px; }
.setting-row > svg { width: 17px; height: 17px; color: var(--text-3); }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-height) + 32px + env(safe-area-inset-bottom)); z-index: 80; transform: translateX(-50%); min-width: 220px; max-width: calc(100% - 32px); padding: 12px 15px; border-radius: 13px; background: #172033; color: white; text-align: center; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-md); animation: toastIn .2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastIn { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

@media (min-width: 700px) {
  .content { padding: 24px 24px 0; }
  .topbar { padding-left: 26px; padding-right: 26px; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe-card { grid-template-columns: 124px minmax(0,1fr); }
  .add-options { grid-template-columns: repeat(4, 1fr); }
  .sheet { left: 50%; right: auto; width: min(620px, calc(100% - 32px)); bottom: 18px; transform: translateX(-50%); border-radius: 27px; padding-bottom: 22px; }
  @keyframes slideUp { from { transform: translate(-50%, 24px); opacity: .6; } to { transform: translate(-50%, 0); opacity: 1; } }
  .bottom-nav { left: 50%; right: auto; width: 560px; transform: translateX(-50%); }
  .fab { right: calc(50% - 280px + 12px); }
}

@media (min-width: 1020px) {
  .app-shell { padding-bottom: 110px; }
  .recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recipe-card { grid-template-columns: 1fr; min-height: 320px; }
  .card-media { min-height: 178px; }
  .card-body { min-height: 142px; }
  .week-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
  .week-layout .day-strip { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow: visible; }
  .day-btn { flex-direction: row; justify-content: space-between; min-height: 55px; padding: 0 16px; }
  .selected-day { margin-top: 0; }
}
