:root {
  color-scheme: light;
  --primary: #3c63dd;
  --primary-dark: #2948a6;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #64748b;
  --line: #e5e7eb;
  --danger: #dc2626;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

.appbar {
  height: 64px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
}

.appbar-inner {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
}

.logo {
  height: 28px;
  max-width: 128px;
  object-fit: contain;
  display: block;
}

.logo-fallback {
  display: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

main {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.state {
  margin-top: 16px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.hero-card,
.section-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card {
  margin-bottom: 16px;
}

.hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: none;
  background: #eef2ff;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 2px 12px;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--primary);
}

.recipe-header {
  padding: 22px 20px 20px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text);
}

.description {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.meta-item {
  min-width: 0;
  border: 1px solid rgba(60, 99, 221, 0.16);
  background: rgba(60, 99, 221, 0.06);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.meta-value {
  display: block;
  margin-top: 2px;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 800;
}

.section-card {
  margin-top: 16px;
}

.section-title {
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(60, 99, 221, 0.09), rgba(60, 99, 221, 0.02));
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  flex: 0 0 auto;
}

h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.section-body {
  padding: 18px 20px 20px;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

li:first-child {
  padding-top: 0;
}

li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.bullet,
.step-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(60, 99, 221, 0.1);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
}

.step-number {
  background: var(--primary);
  color: #fff;
}

.source-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(60, 99, 221, 0.05);
  border: 1px solid rgba(60, 99, 221, 0.16);
}

.source-row a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.hidden {
  display: none;
}

@media (min-width: 900px) {
  main {
    padding-top: 28px;
  }
}

@media (max-width: 560px) {
  .appbar {
    height: 58px;
  }

  main {
    padding: 12px 12px 32px;
  }

  .recipe-header,
  .section-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-title {
    padding-left: 16px;
    padding-right: 16px;
  }

  .meta {
    grid-template-columns: 1fr;
  }
}
/* Save-in-Dishly CTA (creator detail pages; unused on the share page) */
.save-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: #fff;
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}
