/* ============== SOUPER ============== */
:root {
  --bg: #EDE4D3;          /* warm stage behind phones */
  --cream: #F4EDE2;       /* app canvas */
  --milk: #FBF7F0;        /* cards / surfaces */
  --milk-2: #F7F1E6;
  --clay: #2A211C;        /* near-black, warm */
  --clay-70: rgba(42, 33, 28, 0.72);
  --clay-50: rgba(42, 33, 28, 0.55);
  --clay-30: rgba(42, 33, 28, 0.30);
  --clay-12: rgba(42, 33, 28, 0.12);
  --clay-06: rgba(42, 33, 28, 0.06);
  --terracotta: #4A6B3F;
  --terracotta-soft: #7B8B5E;
  --slate: #8FA0AB;
  --hairline: rgba(42, 33, 28, 0.08);
  --serif: "Instrument Serif", "Newsreader", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html, body {
  margin: 0;
  background: var(--bg);
  font-family: var(--sans);
  color: var(--clay);
  min-height: 100vh;
}

/* ============== STAGE ============== */
.stage {
  min-height: 100vh;
  padding: 56px 32px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}
.stage-header {
  width: 100%;
  max-width: 1320px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
}
.stage-mark {
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: -0.01em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.stage-mark::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--terracotta);
  display: inline-block;
  transform: translateY(-2px);
}
.stage-mark em { font-style: normal; color: var(--clay-50); font-family: var(--sans); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-left: 8px; }
.stage-meta { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay-50); }

.phones {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 56px;
  align-items: start;
}
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.phone-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay-50);
}
.phone-label b { color: var(--clay); font-weight: 500; letter-spacing: 0.14em; }

/* ============== PHONE FRAME ============== */
.phone {
  width: 390px;
  height: 844px;
  background: var(--clay);
  border-radius: 54px;
  padding: 12px;
  box-shadow:
    0 60px 80px -40px rgba(42, 33, 28, 0.45),
    0 30px 60px -30px rgba(42, 33, 28, 0.30),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  position: relative;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--cream);
  border-radius: 42px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 32px;
  background: var(--clay);
  border-radius: 999px;
  z-index: 10;
}
.status-bar {
  height: 52px;
  flex: 0 0 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px 0 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--clay);
  position: relative;
  z-index: 11;
}
.status-bar .right { display: flex; gap: 6px; align-items: center; }
.status-bar svg { display: block; }

.screen-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ============== SCREEN 1 — RATING ============== */
.rate-screen { background: var(--cream); }

.rate-hero {
  position: relative;
  height: var(--hero-h, 380px);
  flex: 0 0 var(--hero-h, 380px);
  overflow: hidden;
}
.rate-hero-slot {
  position: absolute;
  inset: 0;
  background: var(--milk-2);
}
.rate-hero-img {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 70% 30%, #E5A074 0%, #B86344 40%, #6B3120 100%);
  filter: saturate(0.92);
}
.rate-hero-grain {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.10) 0%, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.20) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(0,0,0,0.25) 0%, transparent 50%);
  mix-blend-mode: multiply;
}
.rate-hero-noise {
  position: absolute; inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.10 0 0 0 0 0.05 0 0 0 1 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}
.rate-hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(244,237,226,0.0) 70%, var(--cream) 100%);
}
.rate-hero-caption {
  position: absolute;
  bottom: 18px;
  left: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.rate-hero-counter {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.85);
  background: rgba(42,33,28,0.35);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: 999px;
}

.rate-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 28px 22px;
  gap: 14px;
  min-height: 0;
}
.rate-name {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--clay);
  margin: 0;
  text-wrap: balance;
}
.rate-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--clay-12);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--clay-70);
}
.pill .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--clay-30); }

/* Heat slider */
.heat {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.heat-feel {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--clay-50);
  transition: color 200ms ease;
  text-transform: lowercase;
  text-align: center;
}

.heat-track-wrap { position: relative; margin-top: 72px; padding: 12px 0 6px; user-select: none; touch-action: none; cursor: grab; }
.heat-track-wrap:active { cursor: grabbing; }

.heat-bubble {
  position: absolute;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  transition: left 110ms cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: "DM Serif Display", "Newsreader", Georgia, serif;
  font-size: 64px;
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--clay);
  font-feature-settings: "tnum";
  white-space: nowrap;
  pointer-events: none;
  display: flex;
  align-items: baseline;
}
.heat-bubble .of {
  font-family: "DM Serif Display", "Newsreader", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  color: var(--clay-30);
  letter-spacing: -0.02em;
  margin-left: 3px;
}
.heat-value-num {
  display: inline-block;
  animation: heatPop 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: 50% 90%;
}
@keyframes heatPop {
  0%   { transform: translateY(3px) scale(0.88); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.heat-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    #4A78B5 0%,
    #7E94A8 28%,
    #9A9A9A 50%,
    #B87878 72%,
    #C24545 100%);
  position: relative;
  box-shadow: inset 0 1px 2px rgba(42,33,28,0.18);
}
.heat-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 7px;
  pointer-events: none;
}
.heat-tick {
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.55);
  opacity: 0.8;
}
.heat-thumb {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FBF7F0;
  transform: translate(-50%, -50%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 -1px 0 rgba(42,33,28,0.06) inset,
    0 6px 16px rgba(42,33,28,0.18),
    0 2px 4px rgba(42,33,28,0.10);
  transition: transform 120ms ease, box-shadow 200ms ease, left 110ms cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.heat-thumb::after {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--terracotta);
  opacity: 0.6;
  transition: background 200ms ease;
}
.heat-track-wrap.dragging .heat-thumb {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 8px 22px rgba(42,33,28,0.28),
    0 2px 6px rgba(42,33,28,0.14);
}
.heat-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-30);
  margin-top: 2px;
}

.rate-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
}
.btn-primary {
  height: 56px;
  border-radius: 18px;
  background: var(--clay);
  color: var(--milk);
  border: none;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 100ms ease, background 200ms ease;
}
.btn-primary:hover { background: #1F1814; }
.btn-primary:active { transform: scale(0.985); }
.btn-primary svg { transform: translateY(0); }
.btn-ghost {
  height: 36px;
  background: transparent;
  border: none;
  color: var(--clay-50);
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--clay-12);
  text-underline-offset: 4px;
}
.btn-ghost:hover { color: var(--clay-70); }

/* ============== SCREEN 2 — FEED ============== */
.feed-screen { background: var(--cream); }
.feed-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 100px;
  scrollbar-width: none;
}
.feed-scroll::-webkit-scrollbar { display: none; }

.feed-greeting {
  padding: 18px 4px 28px;
}
.feed-day {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay-50);
  margin-bottom: 12px;
}
.feed-headline {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--clay);
  margin: 0;
  text-wrap: balance;
}
.feed-headline em { color: var(--terracotta); font-style: italic; }

.feed-section { margin-bottom: 30px; }
.feed-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 2px;
}
.feed-section-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--clay);
  letter-spacing: -0.005em;
}
.feed-section-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--clay-30);
}

.meal-card {
  background: var(--milk);
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--hairline);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.meal-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -16px rgba(42,33,28,0.18);
}
.meal-card-img {
  height: 168px;
  position: relative;
  overflow: hidden;
}
.meal-card-img .label {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}
.meal-card-body {
  padding: 14px 16px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.meal-card-text { flex: 1; min-width: 0; }
.meal-card-name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--clay);
  margin: 0 0 8px;
  text-wrap: balance;
}
.meal-card-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.meal-card .save-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--clay-12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--clay-50);
  transition: all 180ms ease;
  flex-shrink: 0;
}
.meal-card .save-btn:hover { color: var(--clay); border-color: var(--clay-30); }
.meal-card .save-btn.saved {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--milk);
}
.meal-card .save-btn svg { display: block; }

/* Tab bar */
.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 88px;
  padding: 12px 32px 28px;
  background: linear-gradient(180deg, rgba(244,237,226,0.0) 0%, rgba(244,237,226,0.85) 30%, var(--cream) 60%);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  z-index: 5;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--clay-30);
  background: none;
  border: none;
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 200ms ease;
}
.tab.active { color: var(--clay); }
.tab svg { display: block; }
.tab.active .tab-dot { background: var(--terracotta); }
.tab-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: transparent;
  transition: background 200ms ease;
  margin-top: -1px;
}

/* ============== SCREEN 3 — SAVED ============== */
.saved-screen { background: var(--cream); }
.saved-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 100px;
  scrollbar-width: none;
}
.saved-scroll::-webkit-scrollbar { display: none; }
.saved-header { padding: 18px 4px 28px; }
.saved-title {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--clay);
  margin: 0 0 6px;
}
.saved-sub {
  font-size: 13px;
  color: var(--clay-50);
  letter-spacing: 0.01em;
}

.saved-section { margin-bottom: 26px; }
.saved-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 2px 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}
.saved-section-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--clay);
}
.saved-section-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-30);
}

.saved-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.saved-row:last-child { border-bottom: none; }
.saved-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.saved-text { flex: 1; min-width: 0; }
.saved-name {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: var(--clay);
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saved-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.saved-pill {
  font-size: 11px;
  color: var(--clay-50);
  letter-spacing: 0.01em;
}
.saved-pill + .saved-pill::before {
  content: "·";
  margin-right: 6px;
  color: var(--clay-30);
}
.remove-btn {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--clay-30);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 180ms ease;
}
.remove-btn:hover { color: var(--terracotta); background: var(--clay-06); }

.empty {
  background: var(--milk);
  border: 1px dashed var(--clay-12);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.empty-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--cream);
  border: 1px solid var(--clay-12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
}
.empty-text {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
  color: var(--clay);
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0;
}
.empty-cta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--terracotta);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}
.empty-cta:hover { color: #A04E2D; }

/* ============== SCREEN 4 — PROFILE / PLAN ============== */
.profile-screen { background: var(--cream); }
.profile-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 100px;
  scrollbar-width: none;
}
.profile-scroll::-webkit-scrollbar { display: none; }
.profile-header { padding: 18px 4px 22px; }
.profile-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay-50);
  margin-bottom: 8px;
}
.profile-name {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--clay);
  margin: 0 0 6px;
}
.profile-meta { font-size: 12px; color: var(--clay-50); letter-spacing: 0.02em; }

/* Free plan card */
.plan-card {
  background: var(--milk);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 14px;
}
.plan-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}
.plan-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--clay);
}
.plan-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.plan-status.muted { color: var(--clay-30); }
.plan-usage { margin-bottom: 14px; }
.plan-usage:last-of-type { margin-bottom: 16px; }
.usage-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.usage-row .label { font-size: 13px; color: var(--clay-70); letter-spacing: 0.01em; }
.usage-row .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--clay);
  letter-spacing: 0.02em;
  font-feature-settings: "tnum";
}
.usage-row .count .inf { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--terracotta); }
.progress {
  height: 4px;
  background: var(--clay-06);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--terracotta);
  border-radius: 999px;
  transition: width 300ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
.progress-bar.warn { background: #C26A4A; }
.plan-note {
  font-size: 12px;
  color: var(--clay-50);
  letter-spacing: 0.01em;
  font-style: italic;
  font-family: var(--serif);
}

/* Plus upgrade card */
.plus-card {
  background: var(--clay);
  color: var(--milk);
  border-radius: 22px;
  padding: 24px 22px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.plus-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--terracotta);
  opacity: 0.18;
  filter: blur(10px);
}
.plus-mark {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta-soft);
  margin-bottom: 14px;
}
.plus-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: var(--milk);
  text-wrap: balance;
}
.plus-features {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plus-features li {
  font-size: 13px;
  letter-spacing: 0.01em;
  color: rgba(251, 247, 240, 0.78);
  padding-left: 16px;
  position: relative;
}
.plus-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
}
.plus-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}
.plus-amount {
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: -0.015em;
  color: var(--milk);
}
.plus-period { font-size: 12px; color: rgba(251, 247, 240, 0.55); letter-spacing: 0.02em; }
.btn-upgrade {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: var(--milk);
  color: var(--clay);
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.btn-upgrade:hover { background: #FFFFFF; }

.profile-list {
  border-top: 1px solid var(--hairline);
  margin-top: 4px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 2px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--clay);
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: left;
}
.list-row .chevron {
  color: var(--clay-30);
  font-size: 18px;
  font-family: var(--serif);
}
.list-row:hover { color: var(--clay); }
.list-row.muted { color: var(--clay-50); }

/* Language row — segmented control inside the same chrome as
 * Notifications / Help / Sign-out so it reads as native settings.
 * Four taps surface all languages at once: no nested screen, no popover. */
.lang-row {
  cursor: default;
  gap: 12px;
}
.lang-row:hover { color: var(--clay); }
.lang-row-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--clay);
}
.lang-row-icon {
  display: inline-flex;
  color: var(--clay-50);
}
.lang-seg {
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(42, 33, 28, 0.05);
  box-shadow: inset 0 0 0 1px rgba(42, 33, 28, 0.06);
}
.lang-seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 6px 10px;
  min-width: 34px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-50);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 200ms ease;
}
.lang-seg-btn:hover { color: var(--clay); }
.lang-seg-btn.active {
  background: #FBF7F0;
  color: var(--clay);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 1px 2px rgba(42,33,28,0.10),
    0 2px 6px rgba(42,33,28,0.06);
}

.profile-footer {
  text-align: center;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-30);
}

/* Saved screen: subtle upgrade nudge when near limit */
.saved-upgrade {
  background: var(--milk);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 16px 18px;
  margin: 20px 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.saved-upgrade-text {
  flex: 1;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.3;
  color: var(--clay);
  letter-spacing: -0.005em;
}
.saved-upgrade-text small {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  color: var(--clay-50);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.btn-upgrade-pill {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--clay);
  color: var(--milk);
  border: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============== IMAGE PLACEHOLDERS ============== */
/* Each .ph-* is a moody gradient block standing in for editorial food photography. */
.ph { position: absolute; inset: 0; }
.ph-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 30% 20%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(60% 60% at 70% 80%, rgba(0,0,0,0.30), transparent 60%);
  mix-blend-mode: multiply;
}
.ph-noise {
  position: absolute; inset: 0;
  opacity: 0.12;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.7'/></svg>");
}
.ph-1 { background: radial-gradient(120% 80% at 70% 30%, #E5A074 0%, #B86344 40%, #6B3120 100%); }
.ph-2 { background: radial-gradient(120% 80% at 30% 30%, #D9C49A 0%, #A88654 45%, #5A3F1F 100%); }
.ph-3 { background: radial-gradient(120% 80% at 50% 40%, #C7B98C 0%, #8B7A3F 50%, #3D3110 100%); }
.ph-4 { background: radial-gradient(120% 80% at 60% 30%, #E0B597 0%, #B07E5B 45%, #5C2E1A 100%); }
.ph-5 { background: radial-gradient(120% 80% at 40% 40%, #D8C4A6 0%, #9A7E5A 50%, #4A331E 100%); }
.ph-6 { background: radial-gradient(120% 80% at 50% 40%, #CFB694 0%, #876B45 45%, #3E2C1A 100%); }
.ph-7 { background: radial-gradient(120% 80% at 60% 50%, #C9A47A 0%, #885A37 45%, #3C1F0E 100%); }
.ph-8 { background: radial-gradient(120% 80% at 50% 30%, #DCC59E 0%, #9F8253 45%, #4C351B 100%); }

/* ============== SCROLL HINT ============== */
.scroll-hint {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay-30);
  pointer-events: none;
}

/* ============== RECIPE MODAL ==============
   Copyright-safe detail view: photo + name + source + short blurb + counts,
   then a button that opens the original recipe page. Added by the merge of
   the real-recipe pipeline into the v0 visual UI. */
.recipe-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(42, 33, 28, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: rm-fade 160ms ease;
}
@keyframes rm-fade { from { opacity: 0; } to { opacity: 1; } }
.recipe-modal {
  position: relative;
  width: 100%; max-width: 380px; max-height: 86vh; overflow: hidden;
  background: var(--milk); color: var(--clay);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(42, 33, 28, 0.35);
  display: flex; flex-direction: column;
  animation: rm-rise 200ms cubic-bezier(.3,.7,.4,1);
}
@keyframes rm-rise { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.recipe-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(251, 247, 240, 0.9); color: var(--clay);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(42,33,28,0.18);
}
.recipe-modal-close:hover { background: #fff; }
.recipe-modal-hero { width: 100%; height: 210px; flex-shrink: 0; background: var(--milk-2); }
.recipe-modal-hero image-slot { width: 100%; height: 100%; }
.recipe-modal-body { padding: 18px 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.recipe-modal-name { font-family: var(--serif); font-size: 26px; line-height: 1.1; margin: 0; }
.recipe-modal-source { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--clay-50); }
.recipe-modal-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.recipe-modal-desc { font-size: 14px; line-height: 1.5; color: var(--clay-70); margin: 0; }
.recipe-modal-counts { display: flex; gap: 16px; font-size: 12px; color: var(--clay-50); }
.recipe-modal-cta { margin-top: 4px; width: 100%; justify-content: center; }
.recipe-modal-cta:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============== AUTH / LOGIN SCREEN ============== */
.auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 380px; background: var(--milk); color: var(--clay);
  border-radius: 22px; padding: 32px 28px;
  box-shadow: 0 16px 50px rgba(42, 33, 28, 0.16);
  display: flex; flex-direction: column; gap: 6px;
}
.auth-brand {
  font-family: var(--serif); font-size: 22px; color: var(--terracotta); margin-bottom: 6px;
}
.auth-title { font-family: var(--serif); font-size: 30px; line-height: 1.05; margin: 0; }
.auth-sub { font-size: 14px; color: var(--clay-70); margin: 0 0 14px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-input {
  height: 46px; padding: 0 14px; border-radius: 12px; font-size: 15px;
  border: 1px solid var(--hairline); background: var(--cream); color: var(--clay);
  outline: none; font-family: var(--sans);
}
.auth-input:focus { border-color: var(--terracotta); }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-error { font-size: 13px; color: #b24a3f; }
.auth-info { font-size: 13px; color: var(--terracotta); }
.auth-toggle {
  margin-top: 14px; background: none; border: 0; color: var(--clay-70);
  font-size: 13px; cursor: pointer; font-family: var(--sans); text-decoration: underline;
}
.auth-toggle:hover { color: var(--clay); }

/* ============== ERROR BOUNDARY FALLBACKS ============== */
.screen-error {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 32px; text-align: center; background: var(--cream); color: var(--clay-70);
}
.screen-error-mark {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--clay-06); color: var(--terracotta); font-weight: 700; font-size: 20px;
}
.screen-error-text { font-size: 14px; margin: 0; max-width: 220px; }
.app-crash {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg);
}
.app-crash-card {
  width: 100%; max-width: 360px; background: var(--milk); border-radius: 22px; padding: 32px 28px;
  text-align: center; box-shadow: 0 16px 50px rgba(42, 33, 28, 0.16); display: flex; flex-direction: column; gap: 8px;
}
.app-crash-card .auth-submit { margin-top: 12px; }
