/* ===== DESIGN TOKENS ===== */
:root {
  --bg-dark: #0F0F13;
  --bg: #13111A;
  --surface: #1C1926;
  --surface2: #2D2840;
  --card: #1C1926;
  --cta: #E2C46D;
  --cta-text: #1A1510;
  --light-orange: #E2A76D;
  --heading-text: #F2F2F2;
  --text1: #F0ECF5;
  --secondary-text: #BEB7D4;
  --muted-text: #8880A0;
  --white: #FFFDF5;

  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Figtree', sans-serif;

  --radius-card: 16px;
  --radius-featured: 20px;
  --radius-btn: 16px;
  --radius-pill: 20px;
  --radius-tag: 8px;
  --radius-search: 14px;
  --radius-info: 12px;
}

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px 0;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ===== MOBILE BREAKPOINT: ditch the phone frame ===== */
@media (max-width: 500px) {
  body {
    padding: 0;
    background: var(--bg-dark);
  }

  .phone-frame {
    width: 100% !important;
    height: 100vh !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: var(--bg-dark) !important;
  }

  .phone-notch {
    display: none !important;
  }

  .phone-screen {
    border-radius: 0 !important;
  }

  .status-bar {
    display: none !important;
  }
}

/* ===== PHONE FRAME ===== */
.phone-frame {
  width: 393px;
  height: 852px;
  background: #000;
  border-radius: 50px;
  padding: 12px;
  position: relative;
  box-shadow:
    0 0 0 2px #333,
    0 0 0 4px #1a1a1a,
    0 20px 60px rgba(0,0,0,0.5);
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 34px;
  background: #000;
  border-radius: 0 0 20px 20px;
  z-index: 100;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  background: var(--bg-dark);
}

/* ===== STATUS BAR ===== */
.status-bar {
  position: absolute;
  top: 12px;
  left: 28px;
  right: 28px;
  height: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 90;
  pointer-events: none;
}

.status-time {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text1);
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text1);
}

/* ===== PAGES ===== */
.page {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg-dark);
}

.page.active {
  display: flex;
}

.page-fixed-header {
  flex-shrink: 0;
  padding: 56px 16px 0;
  background: var(--bg-dark);
  position: relative;
  z-index: 2;
}

.page-fixed-header::after {
  content: '';
  position: absolute;
  bottom: -56px;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(to bottom, var(--bg-dark) 0%, rgba(15, 15, 19, 0.6) 30%, rgba(15, 15, 19, 0.2) 65%, rgba(15, 15, 19, 0) 100%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-fixed-header.scrolled::after {
  opacity: 1;
}

.page-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 95px;
  -webkit-overflow-scrolling: touch;
}

/* Pages without a fixed header still need top padding */
.page-scroll:first-child {
  padding-top: 56px;
}

.page-scroll::-webkit-scrollbar {
  display: none;
}

/* ===== NAV BAR ===== */
.nav-bar {
  display: flex;
  background: rgba(32, 28, 46, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 0 20px;
  border-radius: 24px 24px 0 0;
  box-shadow:
    0 -6px 32px rgba(15, 15, 19, 0.85),
    inset 0 4px 16px rgba(136, 128, 160, 0.06);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-item svg {
  color: var(--secondary-text);
  width: 24px;
  height: 24px;
}

.nav-item span {
  color: var(--muted-text);
}

.nav-item.active svg {
  color: var(--cta);
}

.nav-item.active span {
  color: var(--light-orange);
}


/* ===== HOME PAGE ===== */
.home-header {
  margin-bottom: 16px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.brand-icon {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 28px;
  color: var(--cta);
}

.greeting {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  color: var(--heading-text);
  margin-bottom: 4px;
}

.greeting-sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--secondary-text);
}

/* ===== PILLS ===== */
.category-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-pills::-webkit-scrollbar { display: none; }

.pill {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--surface2);
  background: transparent;
  color: var(--muted-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.pill.active {
  background: var(--surface2);
  color: var(--text1);
  border-color: var(--surface2);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  color: var(--heading-text);
  margin-bottom: 14px;
}

/* ===== RECIPE GRID ===== */
.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== RECIPE CARD ===== */
.recipe-card {
  background: var(--card);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.recipe-card:active:not(:has(.card-heart:active)) {
  transform: scale(0.97);
}

.card-heart svg {
  transition: transform 0.2s ease;
}

.card-heart:active svg,
.detail-heart:active svg {
  transform: scale(0.75);
}

@keyframes heart-pop {
  0% { transform: scale(0.75); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.card-heart.pop svg,
.detail-heart.pop svg {
  animation: heart-pop 0.3s ease;
}

.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.85;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface2);
}

.card-img-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(15, 15, 19, 0.75) 0%, rgba(15, 15, 19, 0.4) 40%, rgba(15, 15, 19, 0.1) 70%, rgba(15, 15, 19, 0) 85%);
  border-radius: inherit;
  pointer-events: none;
}

.card-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.3));
}

.card-heart .heart-filled { display: none; }
.card-heart.favorited .heart-outline { display: none; }
.card-heart.favorited .heart-filled { display: block; }

.card-body {
  padding: 10px 10px 12px;
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--heading-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 8px;
}

.card-stars .star {
  color: var(--cta);
  font-size: 12px;
}

.card-stars .star.empty {
  color: var(--muted-text);
}

.card-rating {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  color: var(--light-orange);
  margin-left: 4px;
}

.card-meta {
  display: flex;
  gap: 8px;
}

.card-tag {
  padding: 4px 10px;
  border-radius: var(--radius-tag);
  background: var(--surface2);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10px;
  color: var(--muted-text);
}

/* ===== SEARCH PAGE ===== */
.page-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 28px;
  color: var(--cta);
  margin-bottom: 20px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius-search);
  padding: 14px 16px;
  margin-bottom: 24px;
}

.search-bar svg {
  color: var(--muted-text);
  flex-shrink: 0;
}

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text1);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  width: 100%;
}

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

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
}

.category-btn {
  padding: 16px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-card);
  color: var(--text1);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.category-btn:active {
  background: var(--surface2);
}

.recent-searches {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--muted-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}



.search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-result-card {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 10px;
  cursor: pointer;
}

.search-result-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.search-result-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--heading-text);
}

.search-result-meta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  color: var(--muted-text);
}

/* ===== SAVED PAGE ===== */
.saved-count {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--muted-text);
  margin-bottom: 16px;
  margin-top: -8px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-state h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  color: var(--heading-text);
}

.empty-state-gif {
  width: 240px;
  height: auto;
  margin: 4px 0;
}

.empty-state p {
  color: var(--secondary-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

.empty-saved {
  text-align: center;
  padding: 60px 20px;
}

.empty-saved p {
  color: var(--secondary-text);
  font-size: 16px;
  margin-bottom: 8px;
}

.empty-saved .muted {
  color: var(--muted-text);
  font-size: 14px;
}

/* ===== PROFILE PAGE ===== */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.avatar-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 12px;
}

.avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cta);
}

.avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: var(--cta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cta-text);
  cursor: pointer;
}

.profile-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  color: var(--heading-text);
}

.profile-subtitle {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--muted-text);
}

.settings-section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  color: var(--heading-text);
  margin-bottom: 10px;
}

.settings-group {
  background: var(--surface);
  border-radius: var(--radius-card);
  margin-bottom: 20px;
  overflow: hidden;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--surface2);
}

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

.settings-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--text1);
}

.settings-value {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--muted-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chevron {
  font-size: 18px;
  color: var(--muted-text);
}

.toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle.on {
  background: var(--cta);
}

.toggle.off {
  background: var(--surface2);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 2px;
  transition: left 0.2s;
}

.toggle.on::after {
  left: 22px;
  background: var(--bg-dark);
}

.toggle.off::after {
  left: 2px;
}

.profile-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.profile-btn.sign-out {
  background: var(--surface);
  border: none;
  color: var(--text1);
  margin-top: 8px;
  margin-bottom: 10px;
}

.profile-btn.sign-out:active {
  background: var(--surface2);
}

.profile-btn.delete-account {
  background: transparent;
  border: 1px solid #E93F50;
  color: #E93F50;
  margin-bottom: 16px;
}

.profile-btn.delete-account:active {
  background: rgba(233, 63, 80, 0.1);
}

/* ===== RECIPE DETAIL PAGE ===== */
#page-recipe {
  position: absolute;
  inset: 0;
}

.recipe-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 92px;
  background: var(--bg-dark);
  z-index: 25;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.recipe-top-bar.visible {
  opacity: 1;
}

.back-btn {
  position: absolute;
  top: 48px;
  left: 16px;
  width: 36px;
  height: 36px;
  background: var(--surface2);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text1);
  cursor: pointer;
  z-index: 30;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.3));
}

.back-btn:active {
  background: var(--surface);
}

.detail-heart {
  position: absolute;
  top: 48px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 30;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.3));
}

.detail-heart svg {
  width: 32px;
  height: 32px;
}

.detail-heart .heart-filled { display: none; }
.detail-heart.favorited .heart-outline { display: none; }
.detail-heart.favorited .heart-filled { display: block; }

/* Single scroll container */
.recipe-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.recipe-scroll::-webkit-scrollbar {
  display: none;
}

/* Fixed hero image background */
.recipe-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  z-index: 0;
  overflow: hidden;
}

.recipe-hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(15, 15, 19, 0.85) 0%, rgba(15, 15, 19, 0.5) 35%, rgba(15, 15, 19, 0.2) 65%, rgba(15, 15, 19, 0.05) 90%, rgba(15, 15, 19, 0) 100%);
  pointer-events: none;
}

.recipe-hero-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--surface2);
}

/* Two-container layout */
.recipe-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
  padding-top: 92px;
}

/* Header — collapses but never scrolls */
.recipe-header {
  flex-shrink: 0;
  overflow: hidden;
}

.recipe-hero-spacer {
  height: 164px;
  transition: height 0.35s ease;
}

.recipe-hero-spacer.collapsed {
  height: 0;
}

.recipe-header-inner {
  padding: 16px 16px 0;
  background: var(--bg-dark);
  border-radius: 24px 24px 0 0;
}

.recipe-title-divider {
  border-bottom: 1px solid var(--surface);
  margin-bottom: 12px;
}

/* Description + info bar collapse */
.recipe-description-wrap {
  margin-bottom: 8px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin-bottom 0.3s ease;
}

.recipe-description-wrap.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-bottom: 0;
}

/* Gradient fade at top of content scroll area */

/* Scrollable content — completely independent of header */
.recipe-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 95px;
  background: var(--bg-dark);
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.recipe-content-scroll::before {
  content: '';
  position: sticky;
  top: 0;
  display: block;
  height: 32px;
  margin-bottom: -32px;
  background: linear-gradient(to bottom, var(--bg-dark) 0%, rgba(15, 15, 19, 0.6) 30%, rgba(15, 15, 19, 0.2) 65%, rgba(15, 15, 19, 0) 100%);
  pointer-events: none;
  z-index: 2;
}

.recipe-content-scroll::-webkit-scrollbar {
  display: none;
}

.recipe-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.recipe-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  color: var(--heading-text);
}

.recipe-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.stars {
  display: flex;
  gap: 2px;
}

.stars .star-icon {
  color: var(--cta);
  font-size: 16px;
}

.stars .star-icon.empty {
  color: var(--muted-text);
}

.rating-num {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--light-orange);
  margin-left: 4px;
}

.recipe-header-inner .rating-num {
  font-size: 18px;
}

.recipe-header-inner .star-svg {
  width: 18px;
  height: 18px;
}

/* Info bar */
.info-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-info);
  padding: 14px 0;
  margin-bottom: 14px;
}

.info-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.info-value {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--heading-text);
}

.info-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  color: var(--muted-text);
  text-transform: capitalize;
}

.info-divider {
  width: 1px;
  height: 28px;
  background: var(--surface2);
}

/* Description — snaps closed via class toggle */
.recipe-description-wrap {
  margin-bottom: 8px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin-bottom 0.3s ease;
}

.recipe-description-wrap.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-bottom: 0;
}

.recipe-description {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--secondary-text);
  line-height: 1.5;
  margin-bottom: 10px;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.recipe-tag {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  color: var(--muted-text);
}

/* Tab bar */
.tab-bar {
  display: flex;
  background: var(--surface);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
  position: relative;
}

.tab-bar-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: var(--surface2);
  border-radius: 999px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  left: 4px;
  z-index: 0;
}

.tab-bar-indicator.right {
  left: calc(50% + 0px);
}

.tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.25s ease;
  background: transparent;
  color: var(--muted-text);
  position: relative;
  z-index: 1;
}

.tab.active {
  color: var(--heading-text);
}

/* Tab content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Servings */
.servings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 0 12px 0;
  border-bottom: 1px solid var(--surface);
}

.servings-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text1);
  margin-right: auto;
}

.serving-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: var(--surface);
  color: var(--cta);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.serving-btn:active {
  background: var(--surface2);
}

.serving-count {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--heading-text);
  width: 28px;
  text-align: center;
}

/* Ingredients section header */
.ingredient-section-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--light-orange);
  padding: 12px 0;
  margin-top: 4px;
}

/* Ingredient rows */
.ingredient-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.ingredient-row.checked {
  background: rgba(28, 25, 38, 0.5);
}

.ingredient-row.checked .ingredient-name,
.ingredient-row.checked .ingredient-qty {
  text-decoration: line-through;
  opacity: 0.5;
}

.ingredient-checkbox {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ingredient-checkbox .cb-unchecked {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--muted-text);
}

.ingredient-checkbox .cb-checked {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--cta);
  display: none;
  align-items: center;
  justify-content: center;
}

.ingredient-checkbox .cb-checked svg {
  color: var(--cta-text);
}

.ingredient-row.checked .cb-unchecked { display: none; }
.ingredient-row.checked .cb-checked { display: flex; }

.ingredient-name {
  flex: 1;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--text1);
}

.ingredient-qty {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--light-orange);
  white-space: nowrap;
}

/* Timer */
.timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--surface);
}

.timer-btn {
  width: 88px;
  padding: 10px 0;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  text-align: center;
}

.timer-btn.reset {
  background: var(--surface);
  color: var(--text1);
}

.timer-btn.start {
  background: var(--cta);
  color: var(--cta-text);
}

.timer-btn.start.running {
  background: #E93F50;
  color: white;
}

.timer-display {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 32px;
  color: var(--heading-text);
}

/* Step progress */
.step-progress-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.step-progress-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--light-orange);
}

.step-progress-pct {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--light-orange);
}

.progress-bar-track {
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--cta);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

/* Steps */
.step-item {
  display: flex;
  gap: 14px;
  padding: 12px 0 2px;
  cursor: pointer;
}

.step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: var(--muted-text);
  transition: all 0.2s;
}

.step-item.completed .step-circle {
  background: var(--light-orange);
  color: var(--cta-text);
}

.step-item.active-step .step-circle {
  background: var(--cta);
  color: var(--cta-text);
}

.step-line {
  width: 2px;
  flex: 1;
  background: var(--surface2);
  margin-top: 6px;
  margin-bottom: -4px;
  min-height: 24px;
  border-radius: 1px;
}

.step-item.completed .step-line {
  background: var(--light-orange);
}

.step-item:last-child .step-line {
  display: none;
}

.step-right {
  flex: 1;
  padding-top: 4px;
}

.step-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--heading-text);
  margin-bottom: 4px;
  transition: color 0.2s;
}

.step-item.completed .step-title {
  color: var(--muted-text);
  text-decoration: line-through;
}

.step-text {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--secondary-text);
  line-height: 1.5;
  transition: color 0.2s;
}

.step-item.completed .step-text {
  color: var(--muted-text);
  text-decoration: line-through;
}

/* Star SVGs for ratings */
.star-svg {
  width: 14px;
  height: 14px;
}

.star-svg.small {
  width: 12px;
  height: 12px;
}
