@layer sections {
/* ── Recipe detail ─────────────────────────────────────── */
.recipe-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}
.detail-bar {
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.detail-bar-spacer { flex: 1; }

/* Recipe quick-actions dropdown (Edit / Share / Add note / Delete) */
.actions-menu { position: relative; }
.actions-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.actions-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 184px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 24px oklch(var(--shadow-color) / 0.12);
  z-index: 250;
  padding: 4px 0;
  overflow: hidden;
  animation: menuUp 0.16s cubic-bezier(.22,.68,0,1.1) both;
}
.actions-menu-dropdown form { margin: 0; }
.actions-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none;
}
.actions-menu-item:hover { background: var(--bg); }
.actions-menu-item .icon { color: var(--faint); flex-shrink: 0; }
.actions-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.actions-menu-item--danger { color: var(--danger-fg); }
.actions-menu-item--danger:hover { background: var(--danger-bg); }
.actions-menu-item--danger .icon { color: oklch(60% 0.1 8); }

.back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 5px 12px;
  cursor: pointer;
  transition: background var(--t);
}
.back-btn:hover { background: var(--bg); }
.breadcrumb-sep { font-size: 12px; color: var(--faint); }
.detail-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.detail-left {
  width: 340px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  flex-shrink: 0;
  overflow-y: auto;
}
.detail-meta {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.detail-name {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 8px;
}
.detail-stats { display: flex; gap: 20px; margin-bottom: 14px; }
.stat-label { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.stat-value { font-size: 16px; font-weight: 500; color: var(--text); }
.stat-breakdown { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.stat-breakdown span { font-size: 11px; color: var(--muted); }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

.source-credit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--r);
}
.source-credit--own { background: var(--sage-bg); }
.source-icon {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
}
.source-icon--own {
  background: var(--sage-dot);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 12px;
}
.source-label { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1px; }
.source-name { font-size: 12px; font-weight: 500; color: var(--sage-fg); }
.source-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 3px;
}
.source-link:hover { text-decoration: underline; }
}
