.public-recipes-page,
.recipe-public-page {
  background: var(--bg);
}

.public-recipes-page > .container,
.recipe-page-shell {
  width: min(var(--max-content), calc(100% - (var(--gutter) * 2)));
  max-width: none;
  margin: 0 auto;
  padding: 48px 0 24px;
}

.public-recipes-header {
  max-width: 760px;
  margin-bottom: 40px;
}

.eyebrow,
.public-recipes-header .eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 18px;
  text-transform: uppercase;
}

.public-recipes-header p {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 29px;
}

.public-recipes-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  max-width: 560px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0 6px 0 14px;
}

.public-recipes-search-submit {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 18px;
}

.public-recipes-search svg {
  flex: 0 0 auto;
  color: var(--text-muted);
}

.public-recipes-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 20px;
  padding: 12px 0;
}

.public-recipes-search input:focus {
  outline: none;
}

.public-recipes-search input::-webkit-search-cancel-button {
  display: none;
}

.public-recipes-search-clear {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
}

.public-recipes-actions {
  margin-top: 24px;
}

.directory-count {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 19px;
}

.public-recipe-card {
  display: grid;
  gap: 10px;
  color: var(--text);
  text-decoration: none !important;
}

.public-recipe-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 14px;
  object-fit: cover;
}

.recipe-card-category,
.recipe-card-meta {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.public-recipe-card h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 23px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.public-recipe-card p {
  display: none;
}

.directory-load-more {
  display: grid;
  min-height: 120px;
  place-items: center;
}

.directory-end {
  margin: 40px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

.public-recipes-loading {
  display: grid;
  min-height: 50vh;
  place-items: center;
}

.recipe-reader {
  background: var(--surface);
}

.recipe-public-page .recipe-reader {
  overflow: hidden;
  border-radius: 24px;
}

.recipe-breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 24px 32px 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 18px;
}

.recipe-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.recipe-public-media {
  position: relative;
}

.recipe-public-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

.recipe-detail-favorite-button {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--primary);
  box-shadow: var(--shadow-floating);
}

.recipe-detail-favorite-button:disabled {
  cursor: wait;
  opacity: .72;
}

.recipe-detail-favorite-button .heart {
  width: 22px;
  height: 22px;
}

.recipe-detail-actions {
  display: flex;
  justify-content: flex-end;
}

.recipe-detail-favorite-button.no-image {
  position: static;
}

.recipe-reader-content {
  display: grid;
  gap: 28px;
  padding: 32px;
}

.recipe-reader-content .eyebrow {
  margin-bottom: -8px;
}

.recipe-reader h1 {
  max-width: 900px;
  margin: 0;
  font-size: 38px;
  line-height: 42px;
}

.recipe-public-description {
  max-width: 760px;
  margin: -12px 0 0;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 27px;
}

.recipe-public-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-public-meta span {
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 18px;
}

.recipe-section {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.recipe-section h2 {
  margin: 0;
  font-size: 28px;
  line-height: 34px;
}

.recipe-public-ingredients {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipe-public-ingredients li {
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  color: var(--text);
  font-size: 16px;
  line-height: 27px;
}

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

.recipe-public-steps {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipe-public-steps li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
}

.recipe-public-steps span {
  color: var(--accent);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 32px;
}

.recipe-public-steps p {
  margin: 0;
  font-size: 16px;
  line-height: 27px;
}

.recipe-mobile-return {
  display: none;
}

.recipe-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
}

.recipe-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16, 20, 18, .46);
}

.recipe-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(760px, 55vw);
  height: 100vh;
  overflow-y: auto;
  background: var(--surface);
  box-shadow: var(--shadow-drawer);
}

.recipe-drawer-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  box-shadow: var(--shadow-floating);
}

.drawer-mode .recipe-reader-content {
  padding: 32px;
}

.recipe-detail-skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, var(--skeleton), #F7F2EA, var(--skeleton));
  background-size: 220% 100%;
  animation: skeletonPulse 1.3s ease-in-out infinite;
}

.recipe-detail-skeleton.image {
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

.recipe-detail-skeleton.title {
  width: 70%;
  height: 40px;
  margin: 32px;
}

.recipe-detail-skeleton.line {
  width: calc(100% - 64px);
  height: 18px;
  margin: 0 32px 12px;
}

.recipe-detail-skeleton.short {
  width: 52%;
}

@keyframes skeletonPulse {
  0% { background-position: 180% 0; }
  100% { background-position: -180% 0; }
}

.recipe-column-media,
.recipe-column-info {
  display: contents;
}

.recipe-reader-content .recipe-public-media,
.recipe-reader-content .recipe-detail-actions {
  order: 1;
}

.recipe-reader-content .eyebrow {
  order: 2;
}

.recipe-reader-content h1 {
  order: 3;
}

.recipe-reader-content .recipe-public-description {
  order: 4;
}

.recipe-reader-content .recipe-public-meta {
  order: 5;
}

.recipe-reader-content .recipe-ingredients-section {
  order: 6;
}

.recipe-reader-content .recipe-steps-section {
  order: 7;
}

@media (min-width: 900px) {
  .recipe-public-page .recipe-reader-content {
    grid-template-columns: 4fr 8fr;
    column-gap: 40px;
    align-items: start;
  }

  .recipe-public-page .recipe-column-media,
  .recipe-public-page .recipe-column-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
}

@media (max-width: 899px) {
  .public-recipes-page > .container,
  .recipe-page-shell {
    padding-top: 32px;
  }

  .recipe-overlay {
    position: fixed;
    overflow-y: auto;
    background: var(--surface);
  }

  .recipe-backdrop,
  .recipe-drawer-close {
    display: none;
  }

  .recipe-drawer {
    position: static;
    width: 100%;
    min-height: 100vh;
    overflow: visible;
    box-shadow: none;
  }

  .recipe-public-page .recipe-reader {
    border-radius: 16px;
  }

  .recipe-mobile-return {
    position: sticky;
    top: 0;
    z-index: 4;
    display: block;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
  }

  .recipe-mobile-return button {
    display: inline-flex;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 0 20px;
    color: var(--text);
    font-weight: 800;
  }

  .recipe-breadcrumb {
    display: none;
  }

  .recipe-reader h1 {
    font-size: 30px;
    line-height: 34px;
  }

  .recipe-reader-content,
  .drawer-mode .recipe-reader-content {
    padding: 24px 20px;
  }

  .recipe-detail-favorite-button {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 599px) {
  .public-recipe-card h2 {
    font-size: 15px;
    line-height: 20px;
  }

  .recipe-public-steps li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
  }
}
